Commit 5f6ecbff authored by D's avatar D Committed by GitHub

Merge pull request #12139 from b3log/1.5.0-dev

1.5.0 dev
parents f61bd1d3 3bcdb8d2
...@@ -16,3 +16,4 @@ src/main/webapp/skins/* ...@@ -16,3 +16,4 @@ src/main/webapp/skins/*
!src/main/webapp/skins/mobile !src/main/webapp/skins/mobile
!src/main/webapp/skins/yilia !src/main/webapp/skins/yilia
!src/main/webapp/skins/next !src/main/webapp/skins/next
**/.DS_Store
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
Description: Solo POM. Description: Solo POM.
Version: 3.11.1.23, Jul 7, 2016 Version: 3.12.1.25, Aug 10, 2016
Author: <a href="http://88250.b3log.org">Liang Ding</a> Author: <a href="http://88250.b3log.org">Liang Ding</a>
Author: <a href="http://www.annpeter.cn">Ann Peter</a> Author: <a href="http://www.annpeter.cn">Ann Peter</a>
--> -->
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.b3log.latke.version>2.2.6</org.b3log.latke.version> <org.b3log.latke.version>2.2.10</org.b3log.latke.version>
<servlet.version>3.1.0</servlet.version> <servlet.version>3.1.0</servlet.version>
<slf4j.version>1.7.5</slf4j.version> <slf4j.version>1.7.5</slf4j.version>
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
<jetty.version>9.2.13.v20150730</jetty.version> <jetty.version>9.2.13.v20150730</jetty.version>
<commons-cli.version>1.3.1</commons-cli.version> <commons-cli.version>1.3.1</commons-cli.version>
<emoji-java.version>3.0.0</emoji-java.version> <emoji-java.version>3.0.0</emoji-java.version>
<jodd.version>3.6.6</jodd.version>
<!-- maven plugin --> <!-- maven plugin -->
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
...@@ -215,6 +216,12 @@ ...@@ -215,6 +216,12 @@
<artifactId>commons-cli</artifactId> <artifactId>commons-cli</artifactId>
<version>${commons-cli.version}</version> <version>${commons-cli.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.jodd</groupId>
<artifactId>jodd-http</artifactId>
<version>${jodd.version}</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -16,15 +16,25 @@ ...@@ -16,15 +16,25 @@
package org.b3log.solo.processor.console; package org.b3log.solo.processor.console;
import com.qiniu.util.Auth; import com.qiniu.util.Auth;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.Calendar; import java.util.Calendar;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.TimeZone; import java.util.TimeZone;
import java.util.UUID;
import javax.inject.Inject; import javax.inject.Inject;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jodd.io.ZipUtil;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.b3log.latke.Keys; import org.b3log.latke.Keys;
import org.b3log.latke.Latkes; import org.b3log.latke.Latkes;
import org.b3log.latke.RuntimeDatabase;
import org.b3log.latke.event.Event; import org.b3log.latke.event.Event;
import org.b3log.latke.event.EventException; import org.b3log.latke.event.EventException;
import org.b3log.latke.event.EventManager; import org.b3log.latke.event.EventManager;
...@@ -40,6 +50,7 @@ import org.b3log.latke.servlet.HTTPRequestMethod; ...@@ -40,6 +50,7 @@ import org.b3log.latke.servlet.HTTPRequestMethod;
import org.b3log.latke.servlet.annotation.RequestProcessing; import org.b3log.latke.servlet.annotation.RequestProcessing;
import org.b3log.latke.servlet.annotation.RequestProcessor; import org.b3log.latke.servlet.annotation.RequestProcessor;
import org.b3log.latke.servlet.renderer.freemarker.AbstractFreeMarkerRenderer; import org.b3log.latke.servlet.renderer.freemarker.AbstractFreeMarkerRenderer;
import org.b3log.latke.util.Execs;
import org.b3log.latke.util.Strings; import org.b3log.latke.util.Strings;
import org.b3log.solo.SoloServletListener; import org.b3log.solo.SoloServletListener;
import org.b3log.solo.model.Common; import org.b3log.solo.model.Common;
...@@ -58,7 +69,7 @@ import org.json.JSONObject; ...@@ -58,7 +69,7 @@ import org.json.JSONObject;
* Admin console render processing. * Admin console render processing.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.2.1.8, Nov 20, 2015 * @version 1.3.1.9, Jul 28, 2016
* @since 0.4.1 * @since 0.4.1
*/ */
@RequestProcessor @RequestProcessor
...@@ -222,6 +233,8 @@ public class AdminConsole { ...@@ -222,6 +233,8 @@ public class AdminConsole {
final Map<String, String> langs = langPropsService.getAll(locale); final Map<String, String> langs = langPropsService.getAll(locale);
final Map<String, Object> dataModel = renderer.getDataModel(); final Map<String, Object> dataModel = renderer.getDataModel();
dataModel.put("isMySQL", RuntimeDatabase.MYSQL == Latkes.getRuntimeDatabase());
dataModel.putAll(langs); dataModel.putAll(langs);
Keys.fillRuntime(dataModel); Keys.fillRuntime(dataModel);
...@@ -283,6 +296,82 @@ public class AdminConsole { ...@@ -283,6 +296,82 @@ public class AdminConsole {
fireFreeMarkerActionEvent(templateName, dataModel); fireFreeMarkerActionEvent(templateName, dataModel);
} }
/**
* Exports data as SQL file.
*
* @param request the specified HTTP servlet request
* @param response the specified HTTP servlet response
* @param context the specified HTTP request context
* @throws Exception exception
*/
@RequestProcessing(value = "/console/export/sql", method = HTTPRequestMethod.GET)
public void exportSQL(final HttpServletRequest request, final HttpServletResponse response, final HTTPRequestContext context)
throws Exception {
if (!userQueryService.isAdminLoggedIn(request)) {
response.sendError(HttpServletResponse.SC_FORBIDDEN);
return;
}
if (!Latkes.runsWithJDBCDatabase() || RuntimeDatabase.MYSQL != Latkes.getRuntimeDatabase()) {
context.renderJSON().renderMsg("Just support MySQL export now");
return;
}
final String dbUser = Latkes.getLocalProperty("jdbc.username");
final String dbPwd = Latkes.getLocalProperty("jdbc.password");
final String dbURL = Latkes.getLocalProperty("jdbc.URL");
String db = StringUtils.substringAfterLast(dbURL, "/");
db = StringUtils.substringBefore(db, "?");
String sql;
try {
if (StringUtils.isNotBlank(dbPwd)) {
sql = Execs.exec("mysqldump -u" + dbUser + " -p" + dbPwd + " --database " + db);
} else {
sql = Execs.exec("mysqldump -u" + dbUser + " --database " + db);
}
} catch (final Exception e) {
LOGGER.log(Level.ERROR, "Export failed", e);
context.renderJSON().renderMsg("Export failed, please check log");
return;
}
final String tmpDir = System.getProperty("java.io.tmpdir");
String localFilePath = tmpDir + "/b3_solo_" + UUID.randomUUID().toString() + ".sql";
LOGGER.info(localFilePath);
final File localFile = new File(localFilePath);
try {
final byte[] data = sql.getBytes("UTF-8");
OutputStream output = new FileOutputStream(localFile);
IOUtils.write(data, output);
IOUtils.closeQuietly(output);
final File zipFile = ZipUtil.zip(localFile);
final FileInputStream inputStream = new FileInputStream(zipFile);
final byte[] zipData = IOUtils.toByteArray(inputStream);
IOUtils.closeQuietly(inputStream);
response.setContentType("application/zip");
response.setHeader("Content-Disposition", "attachment; filename=\"solo.sql.zip\"");
final ServletOutputStream outputStream = response.getOutputStream();
outputStream.write(zipData);
outputStream.flush();
outputStream.close();
} catch (final Exception e) {
LOGGER.log(Level.ERROR, "Export failed", e);
context.renderJSON().renderMsg("Export failed, please check log");
return;
}
}
/** /**
* Fires FreeMarker action event with the host template name and data model. * Fires FreeMarker action event with the host template name and data model.
* *
......
...@@ -16,12 +16,13 @@ ...@@ -16,12 +16,13 @@
# #
# Description: Solo language configurations(en_US). # Description: Solo language configurations(en_US).
# Version: 2.5.2.10, Feb 20, 2016 # Version: 2.6.2.10, Jul 27, 2016
# Author: Liang Ding # Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# Author: Dongxu Wang # Author: Dongxu Wang
# #
exportSQLLabel=Export SQL file
notAllowRegisterLabel=Not allow register notAllowRegisterLabel=Not allow register
allowRegister1Label=Allow Register: allowRegister1Label=Allow Register:
footerContent1Label=Footer: footerContent1Label=Footer:
......
...@@ -16,12 +16,13 @@ ...@@ -16,12 +16,13 @@
# #
# Description: Solo default language configurations(zh_CN). # Description: Solo default language configurations(zh_CN).
# Version: 2.5.4.17, Feb 20, 2016 # Version: 2.6.4.17, Jul 27, 2016
# Author: Liang Ding # Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# Author: Dongxu Wang # Author: Dongxu Wang
# #
exportSQLLabel=\u5bfc\u51fa SQL \u6587\u4ef6
notAllowRegisterLabel=\u6682\u4e0d\u5f00\u653e\u6ce8\u518c\uff01 notAllowRegisterLabel=\u6682\u4e0d\u5f00\u653e\u6ce8\u518c\uff01
allowRegister1Label=\u5141\u8bb8\u6ce8\u518c\uff1a allowRegister1Label=\u5141\u8bb8\u6ce8\u518c\uff1a
footerContent1Label=\u9875\u811a\uff1a footerContent1Label=\u9875\u811a\uff1a
......
...@@ -21,20 +21,20 @@ ...@@ -21,20 +21,20 @@
# #
#### H2 runtime #### #### H2 runtime ####
runtimeDatabase=H2 #runtimeDatabase=H2
jdbc.username=root
jdbc.password=
jdbc.driver=org.h2.Driver
jdbc.URL=jdbc:h2:~/b3log_solo_h2/db
jdbc.pool=h2
#### MySQL runtime ####
#runtimeDatabase=MYSQL
#jdbc.username=root #jdbc.username=root
#jdbc.password= #jdbc.password=
#jdbc.driver=com.mysql.jdbc.Driver #jdbc.driver=org.h2.Driver
#jdbc.URL=jdbc:mysql://localhost:3306/b3log?useUnicode=yes&characterEncoding=utf8 #jdbc.URL=jdbc:h2:~/b3log_solo_h2/db
#jdbc.pool=druid #jdbc.pool=h2
#### MySQL runtime ####
runtimeDatabase=MYSQL
jdbc.username=root
jdbc.password=
jdbc.driver=com.mysql.jdbc.Driver
jdbc.URL=jdbc:mysql://localhost:3306/b3log?useUnicode=yes&characterEncoding=utf8
jdbc.pool=druid
# The minConnCnt MUST larger or equal to 3 # The minConnCnt MUST larger or equal to 3
jdbc.minConnCnt=5 jdbc.minConnCnt=5
......
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
</div> </div>
<div id="tabOthersPanel_other" class="none"> <div id="tabOthersPanel_other" class="none">
<button class="margin12" onclick="admin.others.removeUnusedTags();">${removeUnusedTagsLabel}</button> <button class="margin12" onclick="admin.others.removeUnusedTags();">${removeUnusedTagsLabel}</button>
<#if isMySQL>
<button class="margin12" onclick="admin.others.exportSQL();">${exportSQLLabel}</button>
</#if>
</div> </div>
</div> </div>
${plugins} ${plugins}
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.8, May 28, 2013 * @version 1.1.0.8, Jul 27, 2016
*/ */
/* oterhs 相关操作 */ /* oterhs 相关操作 */
...@@ -28,42 +28,61 @@ admin.others = { ...@@ -28,42 +28,61 @@ admin.others = {
*/ */
init: function () { init: function () {
$("#tabOthers").tabs(); $("#tabOthers").tabs();
$.ajax({ $.ajax({
url: latkeConfig.servePath + "/console/reply/notification/template", url: latkeConfig.servePath + "/console/reply/notification/template",
type: "GET", type: "GET",
cache: false, cache: false,
success: function(result, textStatus){ success: function (result, textStatus) {
$("#tipMsg").text(result.msg); $("#tipMsg").text(result.msg);
if (!result.sc) { if (!result.sc) {
$("#loadMsg").text(""); $("#loadMsg").text("");
return; return;
} }
$("#replayEmailTemplateTitle").val(result.replyNotificationTemplate.subject); $("#replayEmailTemplateTitle").val(result.replyNotificationTemplate.subject);
$("#replayEmailTemplateBody").val(result.replyNotificationTemplate.body); $("#replayEmailTemplateBody").val(result.replyNotificationTemplate.body);
$("#loadMsg").text(""); $("#loadMsg").text("");
} }
}); });
}, },
/* /*
* @description 移除未使用的标签。 * @description 移除未使用的标签。
*/ */
removeUnusedTags: function () { removeUnusedTags: function () {
$("#tipMsg").text(""); $("#tipMsg").text("");
$.ajax({ $.ajax({
url: latkeConfig.servePath + "/console/tag/unused", url: latkeConfig.servePath + "/console/tag/unused",
type: "DELETE", type: "DELETE",
cache: false, cache: false,
success: function(result, textStatus){ success: function (result, textStatus) {
$("#tipMsg").text(result.msg); $("#tipMsg").text(result.msg);
}
});
},
/*
* @description 移除未使用的标签。
*/
exportSQL: function () {
$("#tipMsg").text("");
$.ajax({
url: latkeConfig.servePath + "/console/export/sql",
type: "GET",
cache: false,
success: function (result, textStatus) {
// AJAX 下载文件的话这里会发两次请求,用 sc 来判断是否是文件,如果没有 sc 说明文件可以下载(实际上就是 result)
if (!result.sc) {
// 再发一次请求进行正式下载
window.location = latkeConfig.servePath + "/console/export/sql";
} else {
$("#tipMsg").text(result.msg);
}
} }
}); });
}, },
/* /*
* 获取未使用的标签。 * 获取未使用的标签。
* XXX: Not used this function yet. * XXX: Not used this function yet.
...@@ -73,13 +92,13 @@ admin.others = { ...@@ -73,13 +92,13 @@ admin.others = {
url: latkeConfig.servePath + "/console/tag/unused", url: latkeConfig.servePath + "/console/tag/unused",
type: "GET", type: "GET",
cache: false, cache: false,
success: function(result, textStatus){ success: function (result, textStatus) {
$("#tipMsg").text(result.msg); $("#tipMsg").text(result.msg);
if (!result.sc) { if (!result.sc) {
$("#loadMsg").text(""); $("#loadMsg").text("");
return; return;
} }
var unusedTags = result.unusedTags; var unusedTags = result.unusedTags;
if (0 === unusedTags.length) { if (0 === unusedTags.length) {
return; return;
...@@ -87,21 +106,20 @@ admin.others = { ...@@ -87,21 +106,20 @@ admin.others = {
} }
}); });
}, },
/* /*
* @description 跟新回复提醒邮件模版 * @description 跟新回复提醒邮件模版
*/ */
update: function () { update: function () {
$("#loadMsg").text(Label.loadingLabel); $("#loadMsg").text(Label.loadingLabel);
$("#tipMsg").text(""); $("#tipMsg").text("");
var requestJSONObject = { var requestJSONObject = {
"replyNotificationTemplate": { "replyNotificationTemplate": {
"subject": $("#replayEmailTemplateTitle").val(), "subject": $("#replayEmailTemplateTitle").val(),
"body": $("#replayEmailTemplateBody").val() "body": $("#replayEmailTemplateBody").val()
} }
}; };
$.ajax({ $.ajax({
url: latkeConfig.servePath + "/console/reply/notification/template", url: latkeConfig.servePath + "/console/reply/notification/template",
type: "PUT", type: "PUT",
...@@ -111,16 +129,16 @@ admin.others = { ...@@ -111,16 +129,16 @@ admin.others = {
$("#tipMsg").text(result.msg); $("#tipMsg").text(result.msg);
$("#loadMsg").text(""); $("#loadMsg").text("");
} }
}); });
} }
}; };
/* /*
* 注册到 admin 进行管理 * 注册到 admin 进行管理
*/ */
admin.register.others = { admin.register.others = {
"obj": admin.others, "obj": admin.others,
"init":admin.others.init, "init": admin.others.init,
"refresh": function () { "refresh": function () {
admin.clearTip(); admin.clearTip();
} }
......
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${archiveDate.archiveDateMonth} ${archiveDate.archiveDateYear} (${archiveDate.archiveDatePublishedArticleCount}) - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${archiveDate.archiveDateYear}${archiveDate.archiveDateMonth}"/>
<meta name="description" content="<#list articles as article>${article.articleTitle}<#if article_has_next>,</#if></#list>"/>
</@head>
</head>
<body>
<#include "header.ftl">
<main class="main wrapper">
<div class="content page-archive">
<section class="posts-collapse">
<span class="archive-move-on"></span>
<span class="archive-page-counter">
${ohLabel}..!
<#if "en" == localeString?substring(0, 2)>
${archiveDate.archiveDateMonth} ${archiveDate.archiveDateYear}
<#else>
${archiveDate.archiveDateYear} ${yearLabel} ${archiveDate.archiveDateMonth} ${monthLabel}
</#if>
${sumLabel} ${archiveDate.archiveDatePublishedArticleCount} ${fightLabel}
</span>
</section>
<#include "article-list.ftl">
</div>
<#include "side.ftl">
</main>
<#include "footer.ftl">
</body>
</html>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<section class="posts-collapse"> <section class="posts-collapse">
<span class="archive-move-on"></span> <span class="archive-move-on"></span>
<span class="archive-page-counter"> <span class="archive-page-counter">
嗯..! 目前共计 ${statistic.statisticPublishedBlogArticleCount} 篇日志。 继续努力。 ${ohLabel}..! ${sumLabel} ${statistic.statisticPublishedBlogArticleCount} ${fightLabel}
</span> </span>
<#if 0 != archiveDates?size> <#if 0 != archiveDates?size>
<#list archiveDates as archiveDate> <#list archiveDates as archiveDate>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="post-meta"> <div class="post-meta">
<span> <span>
发表于 ${postTimeLabel}
<time> <time>
${article.articleCreateDate?string("yyyy-MM-dd")} ${article.articleCreateDate?string("yyyy-MM-dd")}
</time> </time>
...@@ -28,15 +28,15 @@ ...@@ -28,15 +28,15 @@
<span> <span>
&nbsp; | &nbsp; &nbsp; | &nbsp;
<a href="${servePath}${article.articlePermalink}#comments"> <a href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount}条评论</a> ${article.articleCommentCount} ${cmtLabel}</a>
</span> </span>
&nbsp; | &nbsp;热度 ${article.articleViewCount}°C &nbsp; | &nbsp;${viewsLabel} ${article.articleViewCount}°C
</div> </div>
</header> </header>
${article.articleAbstract} ${article.articleAbstract}
<div class="post-more-link"> <div class="post-more-link">
<a href="${servePath}${article.articlePermalink}/#more" rel="contents"> <a href="${servePath}${article.articlePermalink}/#more" rel="contents">
阅读全文 &raquo; ${readLabel} &raquo;
</a> </a>
</div> </div>
</article> </article>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</h1> </h1>
<div class="post-meta"> <div class="post-meta">
<span class="post-time"> <span class="post-time">
发表于 ${postTimeLabel}
<time> <time>
${article.articleCreateDate?string("yyyy-MM-dd")} ${article.articleCreateDate?string("yyyy-MM-dd")}
</time> </time>
...@@ -37,14 +37,14 @@ ...@@ -37,14 +37,14 @@
<span class="post-comments-count"> <span class="post-comments-count">
&nbsp; | &nbsp; &nbsp; | &nbsp;
<a href="${servePath}${article.articlePermalink}#comments"> <a href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount}条评论</a> ${article.articleCommentCount} ${cmtLabel}</a>
</span> </span>
&nbsp; | &nbsp;热度 &nbsp; | &nbsp; ${viewsLabel}
${article.articleViewCount}°C ${article.articleViewCount}°C
</div> </div>
</header> </header>
<div class="post-body"> <div class="post-body article-body">
${article.articleContent} ${article.articleContent}
<#if "" != article.articleSign.signHTML?trim> <#if "" != article.articleSign.signHTML?trim>
<div> <div>
...@@ -61,16 +61,16 @@ ...@@ -61,16 +61,16 @@
</div> </div>
<div class="post-nav fn-clear"> <div class="post-nav fn-clear">
<#if previousArticlePermalink??> <#if previousArticlePermalink??>
<div class="post-nav-prev post-nav-item fn-left"> <div class="post-nav-prev post-nav-item fn-right">
<a href="${servePath}${previousArticlePermalink}" rel="next" title="${previousArticleTitle}"> <a href="${servePath}${previousArticlePermalink}" rel="next" title="${previousArticleTitle}">
< ${previousArticleTitle} ${previousArticleTitle} >
</a> </a>
</div> </div>
</#if> </#if>
<#if nextArticlePermalink??> <#if nextArticlePermalink??>
<div class="post-nav-next post-nav-item fn-right"> <div class="post-nav-next post-nav-item fn-left">
<a href="${servePath}${nextArticlePermalink}" rel="prev" title="${nextArticleTitle}"> <a href="${servePath}${nextArticlePermalink}" rel="prev" title="${nextArticleTitle}">
${nextArticleTitle} > < ${nextArticleTitle}
</a> </a>
</div> </div>
</#if> </#if>
......
This diff is collapsed.
...@@ -664,11 +664,13 @@ img { ...@@ -664,11 +664,13 @@ img {
text-align: center; text-align: center;
} }
.post-body {
word-wrap: break-word;
}
.post-body img { .post-body img {
box-sizing: border-box; box-sizing: border-box;
margin: auto; margin: auto;
padding: 3px;
border: 1px solid #ddd;
} }
.posts-expand .post-tags { .posts-expand .post-tags {
margin-top: 40px; margin-top: 40px;
...@@ -734,6 +736,7 @@ ul.comments .avatar-48 { ...@@ -734,6 +736,7 @@ ul.comments .avatar-48 {
ul.comments .comment-body { ul.comments .comment-body {
margin: 8px 0 0 60px; margin: 8px 0 0 60px;
min-height: 50px;
} }
ul.comments li.comment-body-ref { ul.comments li.comment-body-ref {
...@@ -925,7 +928,33 @@ ul.comments .comment-meta time { ...@@ -925,7 +928,33 @@ ul.comments .comment-meta time {
/* end archives */ /* end archives */
/* start responsive */ /* start responsive */
@media (max-width: 700px) {
.b3-solo-list {
margin: 0;
padding: 0;
}
.page-archive .posts-collapse .archive-move-on {
margin-left: 5px;
}
.posts-collapse {
margin-left: 10px;
}
}
@media (max-width: 500px) { @media (max-width: 500px) {
pre {
word-wrap: break-word;
word-break: break-all;
white-space: normal;
}
.page-archive .archive-page-counter {
margin-right: 10px;
}
.site-nav-toggle { .site-nav-toggle {
display: block; display: block;
margin-top: 16px; margin-top: 16px;
...@@ -953,11 +982,11 @@ ul.comments .comment-meta time { ...@@ -953,11 +982,11 @@ ul.comments .comment-meta time {
background-color: #ddd; background-color: #ddd;
display: none; display: none;
} }
.header .wrapper { .header .wrapper {
padding: 0 10px; padding: 0 10px;
} }
.logo-wrap .site-title { .logo-wrap .site-title {
margin-left: 10px; margin-left: 10px;
} }
......
This diff is collapsed.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</span> </span>
<a class="fn-right" href="${servePath}${comment.commentSharpURL}">${viewLabel}»</a> <a class="fn-right" href="${servePath}${comment.commentSharpURL}">${viewLabel}»</a>
</div> </div>
<div class="comment-content"> <div class="comment-content post-body article-body">
${comment.commentContent} ${comment.commentContent}
</div> </div>
</div> </div>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* @fileoverview util and every page should be used. * @fileoverview util and every page should be used.
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.0.0, Jan 11, 2016 * @version 0.1.1.0, Jul 30, 2016
*/ */
/** /**
...@@ -79,7 +79,7 @@ var NexT = { ...@@ -79,7 +79,7 @@ var NexT = {
}); });
}, },
initArticle: function () { initArticle: function () {
if ($('.b3-solo-list li').length > 0) { if ($('.b3-solo-list li').length > 0 && $(window).width() > 700) {
$('.sidebar').html($('.b3-solo-list')); $('.sidebar').html($('.b3-solo-list'));
$('.sidebar-toggle').click(); $('.sidebar-toggle').click();
} }
......
var NexT={init:function(){$(".sidebar-toggle").click(function(){var i=$(".sidebar");$(this).hasClass("sidebar-active")?($(this).removeClass("sidebar-active"),$("body").animate({"padding-right":0}),i.animate({right:-320})):($(this).addClass("sidebar-active"),$("body").animate({"padding-right":320}),i.animate({right:0}))}),$(".site-nav-toggle").click(function(){$(".site-nav").slideToggle()}),$(document).ready(function(){setTimeout(function(){$(".logo-wrap").css("opacity",1),$(".logo-line-before i").animate({left:"0"},function(){$(".site-title").css("opacity",1).animate({top:0},function(){$(".menu").css("opacity",1).animate({"margin-top":"15px"}),$(".main").css("opacity",1).animate({top:"0"})})}),$(".logo-line-after i").animate({right:"0"})},500)})},initArticle:function(){$(".b3-solo-list li").length>0&&$(window).width()>700&&($(".sidebar").html($(".b3-solo-list")),$(".sidebar-toggle").click())}};NexT.init();
\ No newline at end of file
...@@ -16,10 +16,16 @@ ...@@ -16,10 +16,16 @@
# #
# Description: B3log Solo language configurations(en_US). # Description: B3log Solo language configurations(en_US).
# Version: 1.0.0.1, Jun 19, 2015 # Version: 1.0.0.2, Jun 30, 2015
# Author: Liyuan Li # Author: Liyuan Li
# #
viewsLabel=Heat
cmtLabel\uff1d
postTimeLabel=Post At
readLabel=Read More
fightLabel=articles, fighting!
ohLabel=Oh
subscribeLabel=Subscribe subscribeLabel=Subscribe
dynamicLabel=Dynamic dynamicLabel=Dynamic
adminConsoleLabel=Admin adminConsoleLabel=Admin
......
...@@ -16,17 +16,23 @@ ...@@ -16,17 +16,23 @@
# #
# Description: B3log Solo default language configurations(zh_CN). # Description: B3log Solo default language configurations(zh_CN).
# Version: 0.1.0.0, Jun 29, 2016 # Version: 1.0.0.1, Jul 30, 2016
# Author: Liyuan Li # Author: Liyuan Li
# #
viewsLabel=\u70ed\u5ea6
cmtLabel=\u6761\u8bc4\u8bba
postTimeLabel=\u53d1\u8868\u4e8e
readLabel=\u9605\u8bfb\u5168\u6587
fightLabel=\u7bc7\u65e5\u5fd7\u3002 \u7ee7\u7eed\u52aa\u529b\u3002
ohLabel=\u55ef
searchLabel=\u641c\u7d22 searchLabel=\u641c\u7d22
subscribeLabel=\u8ba2\u9605 subscribeLabel=\u8ba2\u9605
dynamicLabel=\u52a8\u6001 dynamicLabel=\u52a8\u6001
adminConsoleLabel=\u540e\u53f0\u7ba1\u7406 adminConsoleLabel=\u540e\u53f0\u7ba1\u7406
adminIndexLabel=\u540e\u53f0\u9996\u9875 adminIndexLabel=\u540e\u53f0\u9996\u9875
postArticleLabel=\u53d1\u5e03\u6587\u7ae0 postArticleLabel=\u53d1\u5e03\u65e5\u5fd7
articleListLabel=\u6587\u7ae0\u7ba1\u7406 articleListLabel=\u65e5\u5fd7\u7ba1\u7406
commentListLabel=\u8bc4\u8bba\u7ba1\u7406 commentListLabel=\u8bc4\u8bba\u7ba1\u7406
draftListLabel=\u8349\u7a3f\u5939 draftListLabel=\u8349\u7a3f\u5939
userManageLabel=\u7528\u6237\u7ba1\u7406 userManageLabel=\u7528\u6237\u7ba1\u7406
...@@ -53,11 +59,11 @@ initLabel=\u521d\u59cb\u5316 ...@@ -53,11 +59,11 @@ initLabel=\u521d\u59cb\u5316
popTagsLabel=\u5206\u7c7b\u6807\u7b7e popTagsLabel=\u5206\u7c7b\u6807\u7b7e
tag1Label=\u6807\u7b7e\uff1a tag1Label=\u6807\u7b7e\uff1a
tags1Label=\u6807\u7b7e\uff1a tags1Label=\u6807\u7b7e\uff1a
recentArticlesLabel=\u6700\u65b0\u6587\u7ae0 recentArticlesLabel=\u6700\u65b0\u65e5\u5fd7
recentCommentsLabel=\u6700\u65b0\u8bc4\u8bba recentCommentsLabel=\u6700\u65b0\u8bc4\u8bba
postCommentsLabel=\u53d1\u8868\u8bc4\u8bba postCommentsLabel=\u53d1\u8868\u8bc4\u8bba
mostCommentArticlesLabel=\u8bc4\u8bba\u6700\u591a\u7684\u6587\u7ae0 mostCommentArticlesLabel=\u8bc4\u8bba\u6700\u591a\u7684\u65e5\u5fd7
mostViewCountArticlesLabel=\u8bbf\u95ee\u6700\u591a\u7684\u6587\u7ae0 mostViewCountArticlesLabel=\u8bbf\u95ee\u6700\u591a\u7684\u65e5\u5fd7
em00Label=\u5fae\u7b11 em00Label=\u5fae\u7b11
em01Label=\u5927\u7b11 em01Label=\u5927\u7b11
em02Label=\u9ad8\u5174 em02Label=\u9ad8\u5174
...@@ -121,7 +127,7 @@ statisticLabel=\u535a\u5ba2\u7edf\u8ba1 ...@@ -121,7 +127,7 @@ statisticLabel=\u535a\u5ba2\u7edf\u8ba1
viewLabel=\u6d4f\u89c8 viewLabel=\u6d4f\u89c8
countLabel=\u7bc7 countLabel=\u7bc7
viewCount1Label=\u6d4f\u89c8\u6b21\u6570\uff1a viewCount1Label=\u6d4f\u89c8\u6b21\u6570\uff1a
articleCount1Label=\u6587\u7ae0\u603b\u6570\uff1a articleCount1Label=\u65e5\u5fd7\u603b\u6570\uff1a
commentCountLabel=\u8bc4\u8bba\u6570 commentCountLabel=\u8bc4\u8bba\u6570
commentCount1Label=\u8bc4\u8bba\u603b\u6570\uff1a commentCount1Label=\u8bc4\u8bba\u603b\u6570\uff1a
commentEmotions1Label=\u8868\u60c5\uff1a commentEmotions1Label=\u8868\u60c5\uff1a
...@@ -135,12 +141,12 @@ commentURLLabel=URL ...@@ -135,12 +141,12 @@ commentURLLabel=URL
commentContent1Label=\u8bc4\u8bba\u5185\u5bb9\uff1a commentContent1Label=\u8bc4\u8bba\u5185\u5bb9\uff1a
commentContentLabel=\u8bc4\u8bba\u5185\u5bb9 commentContentLabel=\u8bc4\u8bba\u5185\u5bb9
getDateLabel=\u83b7\u53d6\u65e5\u671f getDateLabel=\u83b7\u53d6\u65e5\u671f
getArticleLabel=\u83b7\u53d6\u6587\u7ae0 getArticleLabel=\u83b7\u53d6\u65e5\u5fd7
selectDateLabel=\u9009\u62e9\u65e5\u671f selectDateLabel=\u9009\u62e9\u65e5\u671f
selectDate1Label=\u9009\u62e9\u65e5\u671f\uff1a selectDate1Label=\u9009\u62e9\u65e5\u671f\uff1a
importLabel=\u5bfc\u5165 importLabel=\u5bfc\u5165
chooseBlog1Label=\u8bf7\u9009\u62e9\u9700\u8981\u7ba1\u7406\u7684\u535a\u5ba2\uff1a chooseBlog1Label=\u8bf7\u9009\u62e9\u9700\u8981\u7ba1\u7406\u7684\u535a\u5ba2\uff1a
blogArticleImportLabel=\u6587\u7ae0\u5bfc\u5165 blogArticleImportLabel=\u65e5\u5fd7\u5bfc\u5165
blogSyncMgmtLabel=\u535a\u5ba2\u540c\u6b65\u7ba1\u7406 blogSyncMgmtLabel=\u535a\u5ba2\u540c\u6b65\u7ba1\u7406
syncMgmtLabel=\u540c\u6b65\u7ba1\u7406\u535a\u5ba2 syncMgmtLabel=\u540c\u6b65\u7ba1\u7406\u535a\u5ba2
userName1Label=\u7528\u6237\u540d\uff1a userName1Label=\u7528\u6237\u540d\uff1a
...@@ -153,15 +159,15 @@ noticeBoard1Label=\u516c\u544a\uff1a ...@@ -153,15 +159,15 @@ noticeBoard1Label=\u516c\u544a\uff1a
noticeBoardLabel=\u516c\u544a noticeBoardLabel=\u516c\u544a
htmlhead1Label=HTML head\uff1a htmlhead1Label=HTML head\uff1a
indexTagDisplayCnt1Label= \u9996\u9875\u6807\u7b7e\u663e\u793a\u6570\uff1a indexTagDisplayCnt1Label= \u9996\u9875\u6807\u7b7e\u663e\u793a\u6570\uff1a
indexRecentArticleDisplayCnt1Label=\u6700\u65b0\u6587\u7ae0\u663e\u793a\u6570\u76ee\uff1a indexRecentArticleDisplayCnt1Label=\u6700\u65b0\u65e5\u5fd7\u663e\u793a\u6570\u76ee\uff1a
indexRecentCommentDisplayCnt1Label=\u6700\u65b0\u8bc4\u8bba\u663e\u793a\u6570\u76ee\uff1a indexRecentCommentDisplayCnt1Label=\u6700\u65b0\u8bc4\u8bba\u663e\u793a\u6570\u76ee\uff1a
indexMostCommentArticleDisplayCnt1Label=\u8bc4\u8bba\u6700\u591a\u6587\u7ae0\u663e\u793a\u6570\u76ee\uff1a indexMostCommentArticleDisplayCnt1Label=\u8bc4\u8bba\u6700\u591a\u65e5\u5fd7\u663e\u793a\u6570\u76ee\uff1a
indexMostViewArticleDisplayCnt1Label=\u8bbf\u95ee\u6700\u591a\u6700\u591a\u6587\u7ae0\u663e\u793a\u6570\u76ee\uff1a indexMostViewArticleDisplayCnt1Label=\u8bbf\u95ee\u6700\u591a\u6700\u591a\u65e5\u5fd7\u663e\u793a\u6570\u76ee\uff1a
relevantArticlesDisplayCnt1Label=\u76f8\u5173\u9605\u8bfb\u663e\u793a\u6570\u76ee\uff1a relevantArticlesDisplayCnt1Label=\u76f8\u5173\u9605\u8bfb\u663e\u793a\u6570\u76ee\uff1a
randomArticlesDisplayCnt1Label=\u968f\u673a\u9605\u8bfb\u663e\u793a\u6570\u76ee\uff1a randomArticlesDisplayCnt1Label=\u968f\u673a\u9605\u8bfb\u663e\u793a\u6570\u76ee\uff1a
externalRelevantArticlesDisplayCnt1Label=\u7ad9\u5916\u76f8\u5173\u9605\u8bfb\u663e\u793a\u6570\u76ee\uff1a externalRelevantArticlesDisplayCnt1Label=\u7ad9\u5916\u76f8\u5173\u9605\u8bfb\u663e\u793a\u6570\u76ee\uff1a
windowSize1Label=\u5206\u9875\u9875\u7801\u6700\u5927\u5bbd\u5ea6\uff1a windowSize1Label=\u5206\u9875\u9875\u7801\u6700\u5927\u5bbd\u5ea6\uff1a
pageSize1Label=\u5206\u9875\u6bcf\u9875\u663e\u793a\u6587\u7ae0\u6570\uff1a pageSize1Label=\u5206\u9875\u6bcf\u9875\u663e\u793a\u65e5\u5fd7\u6570\uff1a
blogTitle1Label=\u535a\u5ba2\u6807\u9898\uff1a blogTitle1Label=\u535a\u5ba2\u6807\u9898\uff1a
blogSubtitle1Label=\u535a\u5ba2\u5b50\u6807\u9898\uff1a blogSubtitle1Label=\u535a\u5ba2\u5b50\u6807\u9898\uff1a
blogHost1Label=\u535a\u5ba2\u5730\u5740\uff1a blogHost1Label=\u535a\u5ba2\u5730\u5740\uff1a
...@@ -188,7 +194,7 @@ returnTo1Label=\u8fd4\u56de\uff1a ...@@ -188,7 +194,7 @@ returnTo1Label=\u8fd4\u56de\uff1a
tencentLabel=\u817e\u8baf tencentLabel=\u817e\u8baf
appKey1Label=App Key: appKey1Label=App Key:
appSecret1Label=App Secret: appSecret1Label=App Secret:
postToTencentMicroblogWhilePublishArticleLabel=\u53d1\u6587\u7ae0\u65f6\u540c\u6b65\u5230\u817e\u8baf\u5fae\u535a\uff1a postToTencentMicroblogWhilePublishArticleLabel=\u53d1\u65e5\u5fd7\u65f6\u540c\u6b65\u5230\u817e\u8baf\u5fae\u535a\uff1a
postToCommunityLabel=\u53d1\u5e03\u5230\u793e\u533a\uff1a postToCommunityLabel=\u53d1\u5e03\u5230\u793e\u533a\uff1a
authorizeTencentMicroblog1Label=\u70b9\u51fb\u56fe\u6807\u8fdb\u884c\u6388\u6743: authorizeTencentMicroblog1Label=\u70b9\u51fb\u56fe\u6807\u8fdb\u884c\u6388\u6743:
googleLabel=Google googleLabel=Google
...@@ -209,16 +215,16 @@ readmoreLabel=\u9605\u8bfb\u66f4\u591a\u00bb ...@@ -209,16 +215,16 @@ readmoreLabel=\u9605\u8bfb\u66f4\u591a\u00bb
readmore2Label=\u9605\u8bfb\u66f4\u591a readmore2Label=\u9605\u8bfb\u66f4\u591a
replyLabel=\u56de\u590d\u00bb replyLabel=\u56de\u590d\u00bb
homeLabel=\u9996\u9875 homeLabel=\u9996\u9875
enableArticleUpdateHint1Label=\u542f\u7528\u6587\u7ae0\u66f4\u65b0\u63d0\u793a\uff1a enableArticleUpdateHint1Label=\u542f\u7528\u65e5\u5fd7\u66f4\u65b0\u63d0\u793a\uff1a
allowVisitDraftViaPermalink1Label=\u5141\u8bb8\u901a\u8fc7\u94fe\u63a5\u8bbf\u95ee\u8349\u7a3f\uff1a allowVisitDraftViaPermalink1Label=\u5141\u8bb8\u901a\u8fc7\u94fe\u63a5\u8bbf\u95ee\u8349\u7a3f\uff1a
author1Label=\u4f5c\u8005\uff1a author1Label=\u4f5c\u8005\uff1a
authorLabel=\u4f5c\u8005 authorLabel=\u4f5c\u8005
keyOfSolo1Label=Solo Key\uff1a keyOfSolo1Label=Solo Key\uff1a
articleLabel=\u6587\u7ae0 articleLabel=\u65e5\u5fd7
tagArticlesLabel=\u6807\u7b7e\u6587\u7ae0\u5217\u8868 tagArticlesLabel=\u6807\u7b7e\u65e5\u5fd7\u5217\u8868
dateArticlesLabel=\u5b58\u6863\u6587\u7ae0\u5217\u8868 dateArticlesLabel=\u5b58\u6863\u65e5\u5fd7\u5217\u8868
authorArticlesLabel=\u4f5c\u8005\u6587\u7ae0\u5217\u8868 authorArticlesLabel=\u4f5c\u8005\u65e5\u5fd7\u5217\u8868
indexArticleLabel=\u9996\u9875\u6587\u7ae0\u5217\u8868 indexArticleLabel=\u9996\u9875\u65e5\u5fd7\u5217\u8868
allTagsLabel=\u6807\u7b7e\u5899 allTagsLabel=\u6807\u7b7e\u5899
customizedPageLabel=\u81ea\u5b9a\u4e49\u9875\u9762 customizedPageLabel=\u81ea\u5b9a\u4e49\u9875\u9762
killBrowserPageLabel=Kill Browser Page killBrowserPageLabel=Kill Browser Page
...@@ -255,7 +261,7 @@ gotoLabel=\u8df3\u8f6c ...@@ -255,7 +261,7 @@ gotoLabel=\u8df3\u8f6c
nameEmptyLabel=\u59d3\u540d\u4e0d\u80fd\u4e3a\u7a7a\uff01 nameEmptyLabel=\u59d3\u540d\u4e0d\u80fd\u4e3a\u7a7a\uff01
passwordEmptyLabel=\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a\uff01 passwordEmptyLabel=\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a\uff01
blogEmptyLabel=\u8bf7\u9009\u62e9\u535a\u5ba2\u670d\u52a1\uff01 blogEmptyLabel=\u8bf7\u9009\u62e9\u535a\u5ba2\u670d\u52a1\uff01
blogArticleEmptyLabel=\u8bf7\u9009\u62e9\u9700\u8981\u5bfc\u5165\u7684\u6587\u7ae0 blogArticleEmptyLabel=\u8bf7\u9009\u62e9\u9700\u8981\u5bfc\u5165\u7684\u65e5\u5fd7
nameTooLongLabel=\u59d3\u540d\u53ea\u80fd\u4e3a 2 \u5230 20 \u4e2a\u5b57\u7b26\uff01 nameTooLongLabel=\u59d3\u540d\u53ea\u80fd\u4e3a 2 \u5230 20 \u4e2a\u5b57\u7b26\uff01
mailCannotEmptyLabel=\u90ae\u7bb1\u4e0d\u80fd\u4e3a\u7a7a\uff01 mailCannotEmptyLabel=\u90ae\u7bb1\u4e0d\u80fd\u4e3a\u7a7a\uff01
mailInvalidLabel=\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e\uff01 mailInvalidLabel=\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e\uff01
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<a class="fn-right" href="javascript:replyTo('${comment.oId}')">${replyLabel}</a> <a class="fn-right" href="javascript:replyTo('${comment.oId}')">${replyLabel}</a>
</#if> </#if>
</div> </div>
<div class="comment-content"> <div class="comment-content post-body article-body">
${comment.commentContent} ${comment.commentContent}
</div> </div>
</div> </div>
......
src/main/webapp/skins/next/preview.png

12.3 KB | W: | H:

src/main/webapp/skins/next/preview.png

7.24 KB | W: | H:

src/main/webapp/skins/next/preview.png
src/main/webapp/skins/next/preview.png
src/main/webapp/skins/next/preview.png
src/main/webapp/skins/next/preview.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -15,19 +15,19 @@ ...@@ -15,19 +15,19 @@
<div class="site-state-item"> <div class="site-state-item">
<a href="/archives"> <a href="/archives">
<span class="site-state-item-count">${statistic.statisticPublishedBlogArticleCount}</span> <span class="site-state-item-count">${statistic.statisticPublishedBlogArticleCount}</span>
<span class="site-state-item-name">日志</span> <span class="site-state-item-name">${articleLabel}</span>
</a> </a>
</div> </div>
<div class="site-state-item site-state-categories"> <div class="site-state-item site-state-categories">
<span class="site-state-item-count">${statistic.statisticBlogViewCount}</span> <span class="site-state-item-count">${statistic.statisticBlogViewCount}</span>
<span class="site-state-item-name">浏览</span> <span class="site-state-item-name">${viewLabel}</span>
</div> </div>
<div class="site-state-item site-state-tags"> <div class="site-state-item site-state-tags">
<a href="/tags"> <a href="/tags">
<span class="site-state-item-count">${statistic.statisticPublishedBlogCommentCount}</span> <span class="site-state-item-count">${statistic.statisticPublishedBlogCommentCount}</span>
<span class="site-state-item-name">评论</span> <span class="site-state-item-name">${commentLabel}</span>
</a> </a>
</div> </div>
</nav> </nav>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<main class="main wrapper"> <main class="main wrapper">
<div class="content"> <div class="content">
<div class="tag-cloud"> <div class="tag-cloud">
目前共计 ${tags?size} 个标签 ${sumLabel} ${tags?size} ${tagLabel}
<ul class="tag-cloud-tags fn-clear" id="tags"> <ul class="tag-cloud-tags fn-clear" id="tags">
<#list tags as tag> <#list tags as tag>
<li> <li>
......
src/main/webapp/skins/yilia/preview.png

12.3 KB | W: | H:

src/main/webapp/skins/yilia/preview.png

24.9 KB | W: | H:

src/main/webapp/skins/yilia/preview.png
src/main/webapp/skins/yilia/preview.png
src/main/webapp/skins/yilia/preview.png
src/main/webapp/skins/yilia/preview.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment