Commit b35caef2 authored by Liang Ding's avatar Liang Ding

Merge remote-tracking branch 'refs/remotes/origin/1.9.0-dev'

parents cb7b2364 6e342d37
...@@ -16,5 +16,5 @@ ...@@ -16,5 +16,5 @@
src/main/webapp/skins/* src/main/webapp/skins/*
!src/main/webapp/skins/mobile !src/main/webapp/skins/mobile
!src/main/webapp/skins/next !src/main/webapp/skins/9IPHP
**/.DS_Store **/.DS_Store
...@@ -25,7 +25,7 @@ import org.json.JSONObject; ...@@ -25,7 +25,7 @@ import org.json.JSONObject;
* This class defines option model relevant keys. * This class defines option model relevant keys.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.0.3, Nov 8, 2016 * @version 1.3.0.4, Feb 17, 2017
* @since 0.6.0 * @since 0.6.0
*/ */
public final class Option { public final class Option {
...@@ -355,7 +355,7 @@ public final class Option { ...@@ -355,7 +355,7 @@ public final class Option {
/** /**
* Default skin directory name. * Default skin directory name.
*/ */
public static final String DEFAULT_SKIN_DIR_NAME = "next"; public static final String DEFAULT_SKIN_DIR_NAME = "9IPHP";
/** /**
* Default language. * Default language.
......
...@@ -57,7 +57,7 @@ import org.jsoup.safety.Whitelist; ...@@ -57,7 +57,7 @@ import org.jsoup.safety.Whitelist;
* Comment management service. * Comment management service.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.2.8, May 10, 2016 * @version 1.3.2.10, Feb 18, 2017
* @since 0.3.5 * @since 0.3.5
*/ */
@Service @Service
...@@ -399,7 +399,13 @@ public class CommentMgmtService { ...@@ -399,7 +399,13 @@ public class CommentMgmtService {
* "commentThumbnailURL": "", * "commentThumbnailURL": "",
* "commentSharpURL": "", * "commentSharpURL": "",
* "commentContent": "", // processed XSS HTML * "commentContent": "", // processed XSS HTML
* "commentName": "" // processed XSS * "commentName": "", // processed XSS
* "commentURL": "", // optional
* "isReply": boolean,
* "page": {},
* "commentOriginalCommentId": "" // optional
* "commentable": boolean,
* "permalink": "" // page.pagePermalink
* } * }
* </pre> * </pre>
* *
...@@ -407,18 +413,21 @@ public class CommentMgmtService { ...@@ -407,18 +413,21 @@ public class CommentMgmtService {
*/ */
public JSONObject addPageComment(final JSONObject requestJSONObject) throws ServiceException { public JSONObject addPageComment(final JSONObject requestJSONObject) throws ServiceException {
final JSONObject ret = new JSONObject(); final JSONObject ret = new JSONObject();
ret.put(Common.IS_REPLY, false);
final Transaction transaction = commentRepository.beginTransaction(); final Transaction transaction = commentRepository.beginTransaction();
try { try {
final String pageId = requestJSONObject.getString(Keys.OBJECT_ID); final String pageId = requestJSONObject.getString(Keys.OBJECT_ID);
final JSONObject page = pageRepository.get(pageId); final JSONObject page = pageRepository.get(pageId);
ret.put(Page.PAGE, page);
final String commentName = requestJSONObject.getString(Comment.COMMENT_NAME); final String commentName = requestJSONObject.getString(Comment.COMMENT_NAME);
final String commentEmail = requestJSONObject.getString(Comment.COMMENT_EMAIL).trim().toLowerCase(); final String commentEmail = requestJSONObject.getString(Comment.COMMENT_EMAIL).trim().toLowerCase();
final String commentURL = requestJSONObject.optString(Comment.COMMENT_URL); final String commentURL = requestJSONObject.optString(Comment.COMMENT_URL);
final String commentContent = requestJSONObject.getString(Comment.COMMENT_CONTENT); final String commentContent = requestJSONObject.getString(Comment.COMMENT_CONTENT);
final String originalCommentId = requestJSONObject.optString(Comment.COMMENT_ORIGINAL_COMMENT_ID); final String originalCommentId = requestJSONObject.optString(Comment.COMMENT_ORIGINAL_COMMENT_ID);
ret.put(Comment.COMMENT_ORIGINAL_COMMENT_ID, originalCommentId);
// Step 1: Add comment // Step 1: Add comment
final JSONObject comment = new JSONObject(); final JSONObject comment = new JSONObject();
...@@ -436,6 +445,11 @@ public class CommentMgmtService { ...@@ -436,6 +445,11 @@ public class CommentMgmtService {
comment.put(Comment.COMMENT_DATE, date); comment.put(Comment.COMMENT_DATE, date);
ret.put(Comment.COMMENT_DATE, DateFormatUtils.format(date, "yyyy-MM-dd HH:mm:ss")); ret.put(Comment.COMMENT_DATE, DateFormatUtils.format(date, "yyyy-MM-dd HH:mm:ss"));
ret.put("commentDate2", date);
ret.put(Common.COMMENTABLE, preference.getBoolean(Option.ID_C_COMMENTABLE) && page.getBoolean(Page.PAGE_COMMENTABLE));
ret.put(Common.PERMALINK, page.getString(Page.PAGE_PERMALINK));
if (!Strings.isEmptyOrNull(originalCommentId)) { if (!Strings.isEmptyOrNull(originalCommentId)) {
originalComment = commentRepository.get(originalCommentId); originalComment = commentRepository.get(originalCommentId);
if (null != originalComment) { if (null != originalComment) {
...@@ -444,6 +458,8 @@ public class CommentMgmtService { ...@@ -444,6 +458,8 @@ public class CommentMgmtService {
comment.put(Comment.COMMENT_ORIGINAL_COMMENT_NAME, originalCommentName); comment.put(Comment.COMMENT_ORIGINAL_COMMENT_NAME, originalCommentName);
ret.put(Comment.COMMENT_ORIGINAL_COMMENT_NAME, originalCommentName); ret.put(Comment.COMMENT_ORIGINAL_COMMENT_NAME, originalCommentName);
ret.put(Common.IS_REPLY, true);
} else { } else {
LOGGER.log(Level.WARN, "Not found orginal comment[id={0}] of reply[name={1}, content={2}]", originalCommentId, LOGGER.log(Level.WARN, "Not found orginal comment[id={0}] of reply[name={1}, content={2}]", originalCommentId,
commentName, commentContent); commentName, commentContent);
...@@ -462,6 +478,7 @@ public class CommentMgmtService { ...@@ -462,6 +478,7 @@ public class CommentMgmtService {
ret.put(Comment.COMMENT_NAME, commentName); ret.put(Comment.COMMENT_NAME, commentName);
ret.put(Comment.COMMENT_CONTENT, commentContent); ret.put(Comment.COMMENT_CONTENT, commentContent);
ret.put(Comment.COMMENT_URL, commentURL);
ret.put(Comment.COMMENT_SHARP_URL, commentSharpURL); ret.put(Comment.COMMENT_SHARP_URL, commentSharpURL);
comment.put(Comment.COMMENT_SHARP_URL, commentSharpURL); comment.put(Comment.COMMENT_SHARP_URL, commentSharpURL);
...@@ -519,7 +536,13 @@ public class CommentMgmtService { ...@@ -519,7 +536,13 @@ public class CommentMgmtService {
* "commentThumbnailURL": "", * "commentThumbnailURL": "",
* "commentSharpURL": "", * "commentSharpURL": "",
* "commentContent": "", // processed XSS HTML * "commentContent": "", // processed XSS HTML
* "commentName": "" // processed XSS * "commentName": "", // processed XSS
* "commentURL": "", // optional
* "isReply": boolean,
* "article": {},
* "commentOriginalCommentId": "", // optional
* "commentable": boolean,
* "permalink": "" // article.articlePermalink
* } * }
* </pre> * </pre>
* *
...@@ -527,18 +550,21 @@ public class CommentMgmtService { ...@@ -527,18 +550,21 @@ public class CommentMgmtService {
*/ */
public JSONObject addArticleComment(final JSONObject requestJSONObject) throws ServiceException { public JSONObject addArticleComment(final JSONObject requestJSONObject) throws ServiceException {
final JSONObject ret = new JSONObject(); final JSONObject ret = new JSONObject();
ret.put(Common.IS_REPLY, false);
final Transaction transaction = commentRepository.beginTransaction(); final Transaction transaction = commentRepository.beginTransaction();
try { try {
final String articleId = requestJSONObject.getString(Keys.OBJECT_ID); final String articleId = requestJSONObject.getString(Keys.OBJECT_ID);
final JSONObject article = articleRepository.get(articleId); final JSONObject article = articleRepository.get(articleId);
ret.put(Article.ARTICLE, article);
final String commentName = requestJSONObject.getString(Comment.COMMENT_NAME); final String commentName = requestJSONObject.getString(Comment.COMMENT_NAME);
final String commentEmail = requestJSONObject.getString(Comment.COMMENT_EMAIL).trim().toLowerCase(); final String commentEmail = requestJSONObject.getString(Comment.COMMENT_EMAIL).trim().toLowerCase();
final String commentURL = requestJSONObject.optString(Comment.COMMENT_URL); final String commentURL = requestJSONObject.optString(Comment.COMMENT_URL);
final String commentContent = requestJSONObject.getString(Comment.COMMENT_CONTENT); final String commentContent = requestJSONObject.getString(Comment.COMMENT_CONTENT);
final String originalCommentId = requestJSONObject.optString(Comment.COMMENT_ORIGINAL_COMMENT_ID); final String originalCommentId = requestJSONObject.optString(Comment.COMMENT_ORIGINAL_COMMENT_ID);
ret.put(Comment.COMMENT_ORIGINAL_COMMENT_ID, originalCommentId);
// Step 1: Add comment // Step 1: Add comment
final JSONObject comment = new JSONObject(); final JSONObject comment = new JSONObject();
...@@ -558,9 +584,14 @@ public class CommentMgmtService { ...@@ -558,9 +584,14 @@ public class CommentMgmtService {
comment.put(Comment.COMMENT_DATE, date); comment.put(Comment.COMMENT_DATE, date);
ret.put(Comment.COMMENT_DATE, DateFormatUtils.format(date, "yyyy-MM-dd HH:mm:ss")); ret.put(Comment.COMMENT_DATE, DateFormatUtils.format(date, "yyyy-MM-dd HH:mm:ss"));
ret.put("commentDate2", date);
ret.put(Common.COMMENTABLE, preference.getBoolean(Option.ID_C_COMMENTABLE) && article.getBoolean(Article.ARTICLE_COMMENTABLE));
ret.put(Common.PERMALINK, article.getString(Article.ARTICLE_PERMALINK));
ret.put(Comment.COMMENT_NAME, commentName); ret.put(Comment.COMMENT_NAME, commentName);
ret.put(Comment.COMMENT_CONTENT, commentContent); ret.put(Comment.COMMENT_CONTENT, commentContent);
ret.put(Comment.COMMENT_URL, commentURL);
if (!Strings.isEmptyOrNull(originalCommentId)) { if (!Strings.isEmptyOrNull(originalCommentId)) {
originalComment = commentRepository.get(originalCommentId); originalComment = commentRepository.get(originalCommentId);
...@@ -570,6 +601,8 @@ public class CommentMgmtService { ...@@ -570,6 +601,8 @@ public class CommentMgmtService {
comment.put(Comment.COMMENT_ORIGINAL_COMMENT_NAME, originalCommentName); comment.put(Comment.COMMENT_ORIGINAL_COMMENT_NAME, originalCommentName);
ret.put(Comment.COMMENT_ORIGINAL_COMMENT_NAME, originalCommentName); ret.put(Comment.COMMENT_ORIGINAL_COMMENT_NAME, originalCommentName);
ret.put(Common.IS_REPLY, true);
} else { } else {
LOGGER.log(Level.WARN, "Not found orginal comment[id={0}] of reply[name={1}, content={2}]", LOGGER.log(Level.WARN, "Not found orginal comment[id={0}] of reply[name={1}, content={2}]",
new String[]{originalCommentId, commentName, commentContent}); new String[]{originalCommentId, commentName, commentContent});
......
...@@ -49,7 +49,7 @@ import org.json.JSONObject; ...@@ -49,7 +49,7 @@ import org.json.JSONObject;
* Comment query service. * Comment query service.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.0.8, Jun 28, 2016 * @version 1.3.0.9, Feb 18, 2017
* @since 0.3.5 * @since 0.3.5
*/ */
@Service @Service
...@@ -234,6 +234,7 @@ public class CommentQueryService { ...@@ -234,6 +234,7 @@ public class CommentQueryService {
for (final JSONObject comment : comments) { for (final JSONObject comment : comments) {
comment.put(Comment.COMMENT_TIME, ((Date) comment.get(Comment.COMMENT_DATE)).getTime()); comment.put(Comment.COMMENT_TIME, ((Date) comment.get(Comment.COMMENT_DATE)).getTime());
comment.put("commentDate2", comment.get(Comment.COMMENT_DATE)); // 1.9.0 向后兼容
comment.put(Comment.COMMENT_NAME, comment.getString(Comment.COMMENT_NAME)); comment.put(Comment.COMMENT_NAME, comment.getString(Comment.COMMENT_NAME));
String url = comment.getString(Comment.COMMENT_URL); String url = comment.getString(Comment.COMMENT_URL);
if (StringUtils.contains(url, "<")) { // legacy issue https://github.com/b3log/solo/issues/12091 if (StringUtils.contains(url, "<")) { // legacy issue https://github.com/b3log/solo/issues/12091
......
...@@ -16,12 +16,14 @@ ...@@ -16,12 +16,14 @@
# #
# Description: Solo language configurations(en_US). # Description: Solo language configurations(en_US).
# Version: 2.7.2.12, Nov 8, 2016 # Version: 2.8.2.12, Feb 18, 2017
# Author: Liang Ding # Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# Author: Dongxu Wang # Author: Dongxu Wang
# #
searchLabel=Search
dynamicLabel=Dynamic
APILabel=Open API APILabel=Open API
exportSQLLabel=Export SQL file exportSQLLabel=Export SQL file
notAllowRegisterLabel=Not allow register notAllowRegisterLabel=Not allow register
...@@ -37,7 +39,7 @@ qiniuLabel=Qiniu ...@@ -37,7 +39,7 @@ qiniuLabel=Qiniu
contributorsLabel=Contributors contributorsLabel=Contributors
developersLabel=Developers developersLabel=Developers
staticErrorLabel=<h1>Latke Configuraton Error</h1>\ staticErrorLabel=<h1>Latke Configuraton Error</h1>\
<br>Please visit <a target='_blank' href='https://hacpai.com/article/1474087427032'>Latke \u914d\u7f6e\u5256\u6790</a> to solve it. <br>Please visit <a target='_blank' href='https://hacpai.com/article/1474087427032'>Latke \u914D\u7F6E\u5256\u6790</a> to solve it.
markdownHelpLabel=<dl><dt>Headings</dt><dd> # First-level heading</dd><dd> #### Fourth-level heading</dd></dl>\ markdownHelpLabel=<dl><dt>Headings</dt><dd> # First-level heading</dd><dd> #### Fourth-level heading</dd></dl>\
<dl><dt>Link</dt><dd>[link text here](link.address.here)</dd></dl>\ <dl><dt>Link</dt><dd>[link text here](link.address.here)</dd></dl>\
<dl><dt>Emphasized text</dt><dd>*italics* or _italics_</dd><dd>**boldface** or __boldface__</dd><dd>***boldface+italics*** or ___boldface+italics___</dd></dl>\ <dl><dt>Emphasized text</dt><dd>*italics* or _italics_</dd><dd>**boldface** or __boldface__</dd><dd>***boldface+italics*** or ___boldface+italics___</dd></dl>\
...@@ -71,7 +73,7 @@ aboutContentLabel=<p><a href="https://github.com/b3log/solo" target="_blank">Sol ...@@ -71,7 +73,7 @@ aboutContentLabel=<p><a href="https://github.com/b3log/solo" target="_blank">Sol
is an open source (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">Apache License 2.0</a>) blogging program, which can run on a standard Servlet container.</p>\ is an open source (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">Apache License 2.0</a>) blogging program, which can run on a standard Servlet container.</p>\
<p><a href="http://b3log.org" target="_blank">B3log</a> advocates the rights of equality, freedom and passion, and we are trying to create a bran-new experience about individual blogging + community. Sound interesting? <a href="https://github.com/b3log/solo/wiki/Join_us" target="_blank">Join us</a>!</p>\ <p><a href="http://b3log.org" target="_blank">B3log</a> advocates the rights of equality, freedom and passion, and we are trying to create a bran-new experience about individual blogging + community. Sound interesting? <a href="https://github.com/b3log/solo/wiki/Join_us" target="_blank">Join us</a>!</p>\
<a target="blank" href="http://b3log.org/donate.html">\ <a target="blank" href="http://b3log.org/donate.html">\
<div class="ico-alipay-me" alt="Alipay B3log" title="\u901a\u8fc7\u652f\u4ed8\u5b9d\u8fdb\u884c\u6350\u8d60"></div></a> <div class="ico-alipay-me" alt="Alipay B3log" title="\u901A\u8FC7\u652F\u4ED8\u5B9D\u8FDB\u884C\u6350\u8D60"></div></a>
confirmLabel=Confirm confirmLabel=Confirm
adminConsoleLabel=Admin adminConsoleLabel=Admin
adminIndexLabel=Admin Index adminIndexLabel=Admin Index
...@@ -287,9 +289,9 @@ Your posts and comments can <i>maintain bisynchronous</i> in the community and t ...@@ -287,9 +289,9 @@ Your posts and comments can <i>maintain bisynchronous</i> in the community and t
killBrowserLabel=<h2>Let's kill outdated and insecure browser!</h2><p>Let's kill outdated and insecure browser for browser evolution, human progress and better experience.</p><p>You can download</p><ul><li><a href="http://www.mozilla.com/" target="_blank">Firefox</a></li><li><a href="http://www.google.com/chrome" target="_blank">Chrome</a></li><li><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">IE8 / IE9</a></li><li><a href="http://www.maxthon.com/" target="_blank">Maxthon</a> and <a href="http://www.google.com" target="_blank">so on</a>.</li></ul><span style="font-size: 10px">Tip: Remove "Util.killIE();" in /js/common.js can support all browser.</span> killBrowserLabel=<h2>Let's kill outdated and insecure browser!</h2><p>Let's kill outdated and insecure browser for browser evolution, human progress and better experience.</p><p>You can download</p><ul><li><a href="http://www.mozilla.com/" target="_blank">Firefox</a></li><li><a href="http://www.google.com/chrome" target="_blank">Chrome</a></li><li><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">IE8 / IE9</a></li><li><a href="http://www.maxthon.com/" target="_blank">Maxthon</a> and <a href="http://www.google.com" target="_blank">so on</a>.</li></ul><span style="font-size: 10px">Tip: Remove "Util.killIE();" in /js/common.js can support all browser.</span>
closeLabel=Close closeLabel=Close
closeForeverLabel=Close Forever closeForeverLabel=Close Forever
readmoreLabel=Read more\u00bb readmoreLabel=Read more\u00BB
readmore2Label=Read more readmore2Label=Read more
replyLabel=Reply\u00bb replyLabel=Reply\u00BB
homeLabel=Home homeLabel=Home
enableArticleUpdateHint1Label=Enable Article Update Hint: enableArticleUpdateHint1Label=Enable Article Update Hint:
allowVisitDraftViaPermalink1Label=Allow Visit Draft Via Link: allowVisitDraftViaPermalink1Label=Allow Visit Draft Via Link:
......
This diff is collapsed.
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<label for="userPassword">${userPassword1Label}</label> <label for="userPassword">${userPassword1Label}</label>
</th> </th>
<td> <td>
<input id="userPassword" type="password"/> <input id="userPassword" type="password" autocomplete="new-password"/>
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -583,10 +583,11 @@ $.extend(Page.prototype, { ...@@ -583,10 +583,11 @@ $.extend(Page.prototype, {
contentType: "application/json", contentType: "application/json",
data: JSON.stringify(requestJSONObject), data: JSON.stringify(requestJSONObject),
success: function (result) { success: function (result) {
$("#submitCommentButton" + state).removeAttr("disabled");
if (!result.sc) { if (!result.sc) {
$("#commentErrorTip" + state).html(result.msg); $("#commentErrorTip" + state).html(result.msg);
$("#comment" + state).val("").focus(); $("#commentValidate" + state).val('');
$("#submitCommentButton" + state).removeAttr("disabled"); $("#captcha" + state).click();
if (!Util.isLoggedIn()) { if (!Util.isLoggedIn()) {
$("#captcha" + state).attr("src", latkeConfig.servePath + "/captcha.do?code=" + Math.random()); $("#captcha" + state).attr("src", latkeConfig.servePath + "/captcha.do?code=" + Math.random());
} }
...@@ -613,8 +614,11 @@ $.extend(Page.prototype, { ...@@ -613,8 +614,11 @@ $.extend(Page.prototype, {
result.userName = Util.getUserName(); result.userName = Util.getUserName();
} }
that.addCommentAjax(addComment(result, state), state); if (typeof(addComment) === "undefined") { // https://github.com/b3log/solo/issues/12246
$("#submitCommentButton" + state).removeAttr("disabled"); that.addCommentAjax(result.cmtTpl, state);
} else { // 1.9.0 向后兼容
that.addCommentAjax(addComment(result, state), state);
}
} }
}); });
} }
......
This diff is collapsed.
...@@ -9,24 +9,26 @@ ...@@ -9,24 +9,26 @@
</head> </head>
<body> <body>
<#include "header.ftl"> <#include "header.ftl">
<main class="main wrapper"> <div class="wrapper">
<div class="content page-archive"> <div class="main-wrap">
<section class="posts-collapse"> <main>
<span class="archive-move-on"></span> <div class="title">
<span class="archive-page-counter"> <h2 style="border-bottom:0">
${ohLabel}..! <i class="icon-inbox"></i>
<#if "en" == localeString?substring(0, 2)> &nbsp;
${archiveDate.archiveDateMonth} ${archiveDate.archiveDateYear} <#if "en" == localeString?substring(0, 2)>
<#else> ${archiveDate.archiveDateMonth} ${archiveDate.archiveDateYear}
${archiveDate.archiveDateYear} ${yearLabel} ${archiveDate.archiveDateMonth} ${monthLabel} <#else>
</#if> ${archiveDate.archiveDateYear} ${yearLabel} ${archiveDate.archiveDateMonth} ${monthLabel}
${sumLabel} ${archiveDate.archiveDatePublishedArticleCount} ${fightLabel} </#if>
</span> - ${archiveDate.archiveDatePublishedArticleCount} ${articleLabel}
</section> </h2>
<#include "article-list.ftl"> </div>
<#include "article-list.ftl">
</main>
<#include "side.ftl">
</div> </div>
<#include "side.ftl"> </div>
</main>
<#include "footer.ftl"> <#include "footer.ftl">
</body> </body>
</html> </html>
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${blogTitle}">
<meta name="keywords" content="${metaKeywords},${archiveLabel}"/>
<meta name="description" content="${metaDescription},${archiveLabel}"/>
</@head>
</head>
<body>
<#include "header.ftl">
<div class="wrapper">
<div class="main-wrap">
<main class="other">
<span class="title">
<h2><i class="icon-inbox"></i>
&nbsp;${statistic.statisticPublishedBlogArticleCount} ${articleLabel}</h2>
</span>
<#if 0 != archiveDates?size>
<ul class="list">
<#list archiveDates as archiveDate>
<li>
<#if "en" == localeString?substring(0, 2)>
<a class="post-title" href="${servePath}/archives/${archiveDate.archiveDateYear}/${archiveDate.archiveDateMonth}">
${archiveDate.monthName} ${archiveDate.archiveDateYear}(${archiveDate.archiveDatePublishedArticleCount})
</a>
<#else>
<a class="post-title" href="${servePath}/archives/${archiveDate.archiveDateYear}/${archiveDate.archiveDateMonth}">
${archiveDate.archiveDateYear} ${yearLabel} ${archiveDate.archiveDateMonth} ${monthLabel}(${archiveDate.archiveDatePublishedArticleCount})
</a>
</#if>
</li>
</#list>
</ul>
</#if>
</main>
<#include "side.ftl">
</div>
</div>
<#include "footer.ftl">
</body>
</html>
<div>
<#list articles as article>
<article class="post">
<header>
<h1>
<a rel="bookmark" href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
<#if article.articlePutTop>
<sup>
${topArticleLabel}
</sup>
</#if>
<#if article.hasUpdated>
<sup>
${updatedLabel}
</sup>
</#if>
</h1>
<div class="meta">
<span class="tooltipped tooltipped-n" aria-label="${createDateLabel}">
<i class="icon-date"></i>
<time>
${article.articleCreateDate?string("yyyy-MM-dd")}
</time>
</span>
&nbsp; | &nbsp;
<span class="tooltipped tooltipped-n" aria-label="${commentCountLabel}">
<i class="icon-comments"></i>
<a href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount} ${commentLabel}</a>
</span>
&nbsp; | &nbsp;
<span class="tooltipped tooltipped-n" aria-label="${viewCountLabel}">
<i class="icon-views"></i>
${article.articleViewCount} ${viewLabel}
</span>
</div>
</header>
<div class="content-reset">
${article.articleAbstract}
</div>
<footer class="fn-clear tags">
<#list article.articleTags?split(",") as articleTag>
<a class="tag" rel="tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">
${articleTag}</a>
</#list>
<a href="${servePath}${article.articlePermalink}#more" rel="contents" class="fn-right">
${readLabel} &raquo;
</a>
</footer>
</article>
</#list>
<#if 0 != paginationPageCount>
<div class="fn-clear">
<nav class="pagination fn-right">
<#if 1 != paginationPageNums?first>
<a href="${servePath}${path}/${paginationPreviousPageNum}" class="page-number">&laquo;</a>
<a class="page-number" href="${servePath}${path}/1">1</a> <span class="page-number">...</span>
</#if>
<#list paginationPageNums as paginationPageNum>
<#if paginationPageNum == paginationCurrentPageNum>
<span class="page-number current">${paginationPageNum}</span>
<#else>
<a class="page-number" href="${servePath}${path}/${paginationPageNum}">${paginationPageNum}</a>
</#if>
</#list>
<#if paginationPageNums?last != paginationPageCount> <span class="page-number">...</span>
<a href="${servePath}${path}/${paginationPageCount}" class="page-number">${paginationPageCount}</a>
<a href="${servePath}${path}/${paginationNextPageNum}" class="page-number">&raquo;</a>
</#if>
</nav>
</div>
</#if>
</div>
\ No newline at end of file
<#include "macro-head.ftl">
<#include "macro-comments.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${article.articleTitle} - ${blogTitle}">
<meta name="keywords" content="${article.articleTags}" />
<meta name="description" content="${article.articleAbstract?html}" />
</@head>
</head>
<body>
<#include "header.ftl">
<div class="wrapper">
<div class="main-wrap">
<main>
<article class="post">
<header>
<h1>
<a rel="bookmark" href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
<#if article.articlePutTop>
<sup>
${topArticleLabel}
</sup>
</#if>
<#if article.hasUpdated>
<sup>
${updatedLabel}
</sup>
</#if>
</h1>
<div class="meta">
<span class="tooltipped tooltipped-n" aria-label="${createDateLabel}">
<i class="icon-date"></i>
<time>
${article.articleCreateDate?string("yyyy-MM-dd")}
</time>
</span>
&nbsp; | &nbsp;
<span class="tooltipped tooltipped-n" aria-label="${commentCountLabel}">
<i class="icon-comments"></i>
<a href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount} ${commentLabel}</a>
</span>
&nbsp; | &nbsp;
<span class="tooltipped tooltipped-n" aria-label="${viewCountLabel}">
<i class="icon-views"></i>
${article.articleViewCount} ${viewLabel}
</span>
</div>
</header>
<div class="content-reset">
${article.articleContent}
<#if "" != article.articleSign.signHTML?trim>
<div>
${article.articleSign.signHTML}
</div>
</#if>
</div>
<footer class="tags">
<#list article.articleTags?split(",") as articleTag>
<a class="tag" rel="tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">
${articleTag}</a>
</#list>
<#-- div class="copyright">
${articleCP1Label}
<a rel="bookmark" href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a> -
<a href="${servePath}">
${blogTitle}
</a>
</div -->
<div class="rel fn-clear">
<#if previousArticlePermalink??>
<a href="${servePath}${previousArticlePermalink}" rel="prev"
class="fn-left tooltipped tooltipped-n"
aria-label="${previousArticleTitle}">
${previousArticleLabel}
</a>
</#if>
<#if nextArticlePermalink??>
<a href="${servePath}${nextArticlePermalink}" rel="next"
class="fn-right tooltipped tooltipped-n"
aria-label="${nextArticleTitle}">
${nextArticleLabel}
</a>
</#if>
</div>
</footer>
<div id="externalRelevantArticles" class="list"></div>
<@comments commentList=articleComments article=article></@comments>
</article>
</main>
<#include "side.ftl">
</div>
</div>
<#include "footer.ftl">
<@comment_script oId=article.oId>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != externalRelevantArticlesDisplayCount>
page.loadExternalRelevantArticles("<#list article.articleTags?split(",") as articleTag>${articleTag}<#if articleTag_has_next>,</#if></#list>"
, "<header class='title'><h2>${externalRelevantArticlesLabel}</h2></header>");
</#if>
</@comment_script>
</body>
</html>
<li id="${comment.oId}">
<div>
<div class="avatar tooltipped tooltipped-n" aria-label="${comment.commentName}"
style="background-image: url(${comment.commentThumbnailURL})"></div>
<main>
<div class="fn-clear">
<#if "http://" == comment.commentURL>
${comment.commentName}
<#else>
<a class="user-name" href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
</#if>
<#if comment.isReply>
@<a class="user-name" href="${servePath}${article.permalink}#${comment.commentOriginalCommentId}"
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 23);"
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')"
>${comment.commentOriginalCommentName}</a>
</#if>
<time class="ft-gray">${comment.commentDate2?string("yyyy-MM-dd HH:mm")}</time>
<#if article.commentable>
<a class="reply-btn" href="javascript:replyTo('${comment.oId}')">${replyLabel}</a>
</#if>
</div>
<div class="content-reset">
${comment.commentContent}
</div>
</main>
</div>
</li>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${blogTitle}">
<meta name="keywords" content="${metaKeywords},${dynamicLabel}"/>
<meta name="description" content="${metaDescription},${dynamicLabel}"/>
</@head>
</head>
<body>
<#include "header.ftl">
<div class="wrapper">
<div class="main-wrap">
<main class="post">
<#if 0 != recentComments?size>
<ul class="comments" id="comments">
<#list recentComments as comment>
<li id="${comment.oId}">
<div>
<div class="avatar tooltipped tooltipped-n" aria-label="${comment.commentName}"
style="background-image: url(${comment.commentThumbnailURL})"></div>
<main>
<div class="fn-clear">
<#if "http://" == comment.commentURL>
${comment.commentName}
<#else>
<a class="user-name" href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
</#if>
<time class="ft-gray">${comment.commentDate?string("yyyy-MM-dd HH:mm")}</time>
<a class="reply-btn" href="${servePath}${comment.commentSharpURL}">${viewLabel}»</a>
</div>
<div class="content-reset">
${comment.commentContent}
</div>
</main>
</div>
</li>
</#list>
</ul>
</#if>
</main>
<#include "side.ftl">
</div>
</div>
<#include "footer.ftl">
<script>
var $commentContents = $(".comments .content-reset");
for (var i = 0; i < $commentContents.length; i++) {
var str = $commentContents[i].innerHTML;
$commentContents[i].innerHTML = Util.replaceEmString(str);
}
</script>
</body>
</html>
<footer class="footer"> <footer class="footer fn-clear">
<div class="wrapper fn-clear"> &copy; ${year}
<a href="${servePath}">${blogTitle}</a> • ${footerContent}
${onlineVisitor1Label}${onlineVisitorCnt} <br/> <a href="${servePath}">${blogTitle}</a> &nbsp; • &nbsp;
&copy; ${year} <a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version} <br/>
${footerContent}
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a> • Powered by <a href="http://b3log.org" target="_blank">B3log</a> 开源 &nbsp;
<a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version} <span class="ft-warn">&heartsuit;</span>
Theme by <a href="https://github.com/9IPHP/9IPHP" target="_blank">9IPHP</a> & <a href="http://vanessa.b3log.org" target="_blank">Vanessa</a>
<div class="fn-right">Theme by <a href="http://iissnan.com/" target="_blank">IIssNan</a> & <a href="http://vanessa.b3log.org" target="_blank">Vanessa</a>.</div>
</div>
</footer> </footer>
<div class="back-to-top" onclick="Util.goTop()"></div> <div class="icon-up" onclick="Util.goTop()"></div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
var latkeConfig = { var latkeConfig = {
"servePath": "${servePath}", "servePath": "${servePath}",
...@@ -39,9 +37,7 @@ ...@@ -39,9 +37,7 @@
"em11Label": "${em11Label}", "em11Label": "${em11Label}",
"em12Label": "${em12Label}", "em12Label": "${em12Label}",
"em13Label": "${em13Label}", "em13Label": "${em13Label}",
"em14Label": "${em14Label}", "em14Label": "${em14Label}"
"tocLabel": "${tocLabel}",
"siteViewLabel": "${siteViewLabel}"
}; };
</script> </script>
${plugins} ${plugins}
<header>
<div class="banner">
<div class="fn-clear wrapper">
<h1 class="fn-inline">
<a href="${servePath}" rel="start">
${blogTitle}
</a>
</h1>
<small> &nbsp; ${blogSubtitle}</small>
<div class="fn-right">
<#if isLoggedIn>
<a href="${servePath}/admin-index.do#main" title="${adminLabel}">
<i class="icon-setting"></i> ${adminLabel}
</a>
<a href="${logoutURL}">
<i class="icon-logout"></i> ${logoutLabel}
</a>
<#else>
<a href="${loginURL}">
<i class="icon-login"></i> ${loginLabel}
</a>
<a href="${servePath}/register">
<i class="icon-register"></i> ${registerLabel}
</a>
</#if>
</div>
</div>
</div>
<div class="navbar">
<div class="fn-clear wrapper">
<nav class="fn-left">
<a href="${servePath}">
<i class="icon-home"></i>
${indexLabel}
</a>
<#list pageNavigations as page>
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}" rel="section">
${page.pageTitle}
</a>
</#list>
<a href="${servePath}/dynamic.html" rel="section">
<i class="icon-refresh"></i> ${dynamicLabel}
</a>
<a href="${servePath}/tags.html" rel="section">
<i class="icon-tags"></i> ${allTagsLabel}
</a>
<a href="${servePath}/archives.html">
<i class="icon-inbox"></i> ${archiveLabel}
</a>
<a rel="archive" href="${servePath}/links.html">
<i class="icon-link"></i> ${linkLabel}
</a>
<a rel="alternate" href="${servePath}/blog-articles-rss.do" rel="section">
<i class="icon-rss"></i> RSS
</a>
</nav>
<div class="fn-right">
<form class="form" target="_blank" action="http://zhannei.baidu.com/cse/site">
<input placeholder="${searchLabel}" id="search" type="text" name="q"/>
<button type="submit"><i class="icon-search"></i></button>
<input type="hidden" name="cc" value="${serverHost}">
</form>
</div>
</div>
</div>
</header>
<div class="responsive fn-none">
<i class="icon-list"></i>
<ul class="list">
<#if isLoggedIn>
<li>
<a href="${servePath}/admin-index.do#main" title="${adminLabel}">
<i class="icon-setting"></i> ${adminLabel}
</a>
</li>
<li>
<a href="${logoutURL}">
<i class="icon-logout"></i> ${logoutLabel}
</a>
</li>
<#else>
<li>
<a href="${loginURL}">
<i class="icon-login"></i> ${loginLabel}
</a>
</li>
<li>
<a href="${servePath}/register">
<i class="icon-register"></i> ${registerLabel}
</a>
</li>
</#if>
<li>
<a href="${servePath}">
<i class="icon-home"></i>
${indexLabel}
</a>
</li>
<#list pageNavigations as page>
<li>
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}" rel="section">
${page.pageTitle}
</a>
</li>
</#list>
<li>
<a href="${servePath}/dynamic.html" rel="section">
<i class="icon-refresh"></i> ${dynamicLabel}
</a>
</li>
<li>
<a href="${servePath}/tags.html" rel="section">
<i class="icon-tags"></i> ${allTagsLabel}
</a>
</li>
<li>
<a href="${servePath}/archives.html">
<i class="icon-inbox"></i> ${archiveLabel}
</a>
</li>
<li>
<a rel="archive" href="${servePath}/links.html">
<i class="icon-link"></i> ${linkLabel}
</a>
</li>
<li>
<a rel="alternate" href="${servePath}/blog-articles-rss.do" rel="section">
<i class="icon-rss"></i> RSS
</a>
</li>
</ul>
</div>
\ No newline at end of file
...@@ -13,12 +13,14 @@ ...@@ -13,12 +13,14 @@
</head> </head>
<body> <body>
<#include "header.ftl"> <#include "header.ftl">
<main class="main wrapper"> <div class="wrapper">
<div class="content"> <div class="main-wrap">
<#include "article-list.ftl"> <main>
<#include "article-list.ftl">
</main>
<#include "side.ftl">
</div> </div>
<#include "side.ftl"> </div>
</main>
<#include "footer.ftl"> <#include "footer.ftl">
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -17,79 +17,63 @@ ...@@ -17,79 +17,63 @@
* @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.2.1.0, Sep 6, 2016 * @version 0.1.0.0, Feb 17, 2017
*/ */
/** /**
* @description next 皮肤脚本 * @description 皮肤脚本
* @static * @static
*/ */
var NexT = { var Skin = {
init: function () { _initCommon: function ($goTop) {
$('.sidebar-toggle').click(function () { $('body').on('click', '.content-reset img', function () {
var $sidebar = $('.sidebar'); window.open(this.src);
if ($(this).hasClass('sidebar-active')) { });
$(this).removeClass('sidebar-active');
var $banner = $('header .banner'),
$navbar = $('header .navbar');
$('body').animate({ $(window).scroll(function () {
'padding-right': 0 if ($(window).scrollTop() > 125) {
}); $goTop.show();
$sidebar.animate({
right: -320
});
$sidebar.find('section').css('opacity', 0);
} else { } else {
$(this).addClass('sidebar-active'); $goTop.hide();
$('body').animate({
'padding-right': 320
});
$sidebar.animate({
right: 0
}, function () {
$sidebar.find('section:first').animate({
'opacity': 1
});
});
} }
});
$('.site-nav-toggle').click(function () { if ($(window).width() < 701) {
$('.site-nav').slideToggle(); return false;
}); }
$(document).ready(function () { if ($(window).scrollTop() > $banner.height()) {
setTimeout(function () { $navbar.addClass('pin');
// logo animate $('.main-wrap').parent().css('margin-top', '86px')
$('.logo-wrap').css('opacity', 1); } else {
$('.logo-line-before i').animate({ $navbar.removeClass('pin');
'left': '0' $('.main-wrap').parent().css('margin-top', '0')
}, function () { }
$('.site-title').css('opacity', 1).animate({ });
'top': 0 },
}, function () { init: function () {
$('.menu').css('opacity', 1).animate({ this._initCommon($('.icon-up'));
'margin-top': '15px'
});
$('.main').css('opacity', 1).animate({
'top': '0'
}, function () {
// 当有文章页面有目录时,回调不放这里,侧边栏就会一片空白
if ($('.b3-solo-list li').length > 0 && $(window).width() > 1000) {
$('.sidebar-toggle').click();
}
});
});
$('.navbar nav a').each(function () {
if (this.href === location.href) {
this.className = 'current'
}
});
}); $('.responsive .list a').each(function () {
if (this.href === location.href) {
$(this).parent().addClass('current');
}
});
$('.logo-line-after i').animate({ $('.responsive .icon-list').click(function () {
'right': '0' $('.responsive .list').slideToggle();
});
}, 500);
}); });
}, },
initArticle: function () { _initArticleCommon: function () {
// TOC
if ($('.b3-solo-list li').length > 0 && $(window).width() > 1000) { if ($('.b3-solo-list li').length > 0 && $(window).width() > 1000) {
// add color to sidebar menu // add color to sidebar menu
$('.sidebar-toggle').addClass('has-toc'); $('.sidebar-toggle').addClass('has-toc');
...@@ -129,6 +113,9 @@ var NexT = { ...@@ -129,6 +113,9 @@ var NexT = {
$(this).addClass('current'); $(this).addClass('current');
}); });
} }
},
initArticle: function () {
this._initArticleCommon();
} }
}; };
NexT.init(); Skin.init();
\ No newline at end of file \ No newline at end of file
/*
* Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var Skin={_initCommon:function(i){$("body").on("click",".content-reset img",function(){window.open(this.src)});var t=$("header .banner"),n=$("header .navbar");$(window).scroll(function(){return $(window).scrollTop()>125?i.show():i.hide(),!($(window).width()<701)&&void($(window).scrollTop()>t.height()?(n.addClass("pin"),$(".main-wrap").parent().css("margin-top","86px")):(n.removeClass("pin"),$(".main-wrap").parent().css("margin-top","0")))})},init:function(){this._initCommon($(".icon-up")),$(".navbar nav a").each(function(){this.href===location.href&&(this.className="current")}),$(".responsive .list a").each(function(){this.href===location.href&&$(this).parent().addClass("current")}),$(".responsive .icon-list").click(function(){$(".responsive .list").slideToggle()})},_initArticleCommon:function(){if($(".b3-solo-list li").length>0&&$(window).width()>1e3){$(".sidebar-toggle").addClass("has-toc");var i='<ul><li class="current" data-tab="toc">'+Label.tocLabel+'</li><li data-tab="site">'+Label.siteViewLabel+"</li></ul><section></section>";$(".sidebar").prepend(i);var t=$(".sidebar section:first").html($(".b3-solo-list")),n=$(".sidebar section:last");t.height($(window).height()-90),$(".sidebar > ul > li").click(function(){"toc"===$(this).data("tab")?n.animate({opacity:"0",top:"-50px"},300,function(){t.show().css("top","-50px"),t.animate({opacity:"1",top:"0"},300)}):t.animate({opacity:"0",top:"-50px"},300,function(){t.hide().css("top","-50px"),n.animate({opacity:"1",top:"0"},300)}),$(".sidebar > ul > li").removeClass("current"),$(this).addClass("current")})}},initArticle:function(){this._initArticleCommon()}};Skin.init();
\ No newline at end of file
This diff is collapsed.
#
# Copyright (c) 2010-2017, b3log.org & hacpai.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Description: B3log Solo language configurations(en_US).
# Version: 1.0.0.0, Feb 17, 2017
# Author: Liyuan Li
#
onlineVisitorLabel=Visitor
tocLabel=Article ToC
readLabel=Read More
nextArticleLabel=Next
previousArticleLabel=Previous
articleCP1Label=Please indicate the source:
viewCountLabel=View Count
\ No newline at end of file
#
# Copyright (c) 2010-2017, b3log.org & hacpai.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Description: B3log Solo default language configurations(zh_CN).
# Version: 1.0.0.0, Feb 17, 2017
# Author: Liyuan Li
#
onlineVisitorLabel=\u8BBF\u5BA2
tocLabel=\u6587\u7AE0\u76EE\u5F55
readLabel=\u9605\u8BFB\u5168\u6587
nextArticleLabel=\u65B0\u4E00\u7BC7
previousArticleLabel=\u65E7\u4E00\u7BC7
articleCP1Label=\u8F6C\u8F7D\u8BF7\u6CE8\u660E\u6765\u6E90\uFF1A
viewCountLabel=\u6D4F\u89C8\u6570
\ No newline at end of file
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${blogTitle}">
<meta name="keywords" content="${metaKeywords},${archiveLabel}"/>
<meta name="description" content="${metaDescription},${archiveLabel}"/>
</@head>
</head>
<body>
<#include "header.ftl">
<div class="wrapper">
<div class="main-wrap">
<main class="other">
<div class="title">
<h2><i class="icon-link"></i>
&nbsp;${linkLabel}</h2>
</div>
<#if 0 != links?size>
<ul class="list">
<#list links as link>
<li>
<a rel="friend" href="${link.linkAddress}" title="${link.linkDescription}" target="_blank">
${link.linkTitle}
</a>
</li>
</#list>
</ul>
</#if>
</main>
<#include "side.ftl">
</div>
</div>
<#include "footer.ftl">
</body>
</html>
<#macro comments commentList article>
<header class='title'><h2>${commentLabel}</h2></header>
<ul class="comments" id="comments">
<#list commentList as comment>
<#include 'common-comment.ftl'/>
</#list>
</ul>
<#if article.commentable>
<header class='title'><h2>${postCommentsLabel}</h2></header>
<table id="commentForm" class="form">
<tbody>
<#if !isLoggedIn>
<tr>
<td>
<input placeholder="${commentNameLabel}" type="text" class="normalInput" id="commentName"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentEmailLabel}" type="email" class="normalInput" id="commentEmail"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentURLLabel}" type="url" id="commentURL"/>
</td>
</tr>
</#if>
<tr>
<td id="emotions" class="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td>
<textarea rows="5" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input style="width:50%" placeholder="${captchaLabel}" type="text" class="normalInput" id="commentValidate"/>
<img class="captcha" id="captcha" alt="validate" src="${servePath}/captcha.do" />
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<span class="error-msg" id="commentErrorTip"></span>
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</#if>
</#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
"nameTooLongLabel": "${nameTooLongLabel}",
"mailCannotEmptyLabel": "${mailCannotEmptyLabel}",
"mailInvalidLabel": "${mailInvalidLabel}",
"commentContentCannotEmptyLabel": "${commentContentCannotEmptyLabel}",
"captchaCannotEmptyLabel": "${captchaCannotEmptyLabel}",
"loadingLabel": "${loadingLabel}",
"oId": "${oId}",
"skinDirName": "${skinDirName}",
"blogHost": "${blogHost}",
"randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
});
var replyTo = function (id) {
var commentFormHTML = "<table class='form comment-reply' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
};
(function () {
page.load();
Skin.initArticle();
// emotions
page.replaceCommentsEm("#comments .comment-content");
<#nested>
})();
</script>
</#macro>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<meta name="revised" content="${blogTitle?html}, ${year}" /> <meta name="revised" content="${blogTitle?html}, ${year}" />
<meta name="copyright" content="B3log" /> <meta name="copyright" content="B3log" />
<meta http-equiv="Window-target" content="_top" /> <meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/${skinDirName}${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" /> <link type="text/css" rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base${miniPostfix}.css?${staticResourceVersion}" charset="utf-8" />
<link href="${servePath}/blog-articles-rss.do" title="RSS" type="application/rss+xml" rel="alternate" /> <link href="${servePath}/blog-articles-rss.do" title="RSS" type="application/rss+xml" rel="alternate" />
<link rel="icon" type="image/png" href="${servePath}/favicon.png" /> <link rel="icon" type="image/png" href="${servePath}/favicon.png" />
${htmlHead} ${htmlHead}
......
...@@ -10,15 +10,17 @@ ...@@ -10,15 +10,17 @@
</head> </head>
<body> <body>
<#include "header.ftl"> <#include "header.ftl">
<main class="main wrapper"> <div class="wrapper">
<div class="content"> <div class="main-wrap">
<article class="post-body"> <main>
${page.pageContent} <article class="post">
</article> ${page.pageContent}
<@comments commentList=pageComments article=page></@comments> <@comments commentList=pageComments article=page></@comments>
</article>
</main>
<#include "side.ftl">
</div> </div>
<#include "side.ftl"> </div>
</main>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=page.oId></@comment_script> <@comment_script oId=page.oId></@comment_script>
</body> </body>
......
<aside>
<#if noticeBoard??>
<div class="ad content-reset">
${noticeBoard}
</div>
</#if>
<#if 0 != mostUsedTags?size>
<div class="module">
<header><h2>${popTagsLabel}</h2></header>
<main>
<#list mostUsedTags as tag>
<a rel="tag" title="${tag.tagTitle}(${tag.tagPublishedRefCount})"
href="${servePath}/tags/${tag.tagTitle?url('UTF-8')}"
class="tag tooltipped tooltipped-n" aria-label="${tag.tagPublishedRefCount} ${countLabel}${articleLabel}">
${tag.tagTitle}</a>
</#list>
</main>
</div>
</#if>
<div class="module meta">
<header>
<h2>${adminUser.userName}</h2>
</header>
<main class="fn-clear">
<img src="${adminUser.userAvatar}" aria-label="${adminUser.userName}"/>
<div class="fn-right">
<a href="${servePath}/archives.html">
${statistic.statisticPublishedBlogArticleCount}
<span class="ft-gray">${articleLabel}</span></a><br/>
<a href="${servePath}/dynamic.html">
${statistic.statisticPublishedBlogCommentCount}
<span class="ft-gray">${commentLabel}</span></a><br/>
${statistic.statisticBlogViewCount} <span class="ft-gray">${viewLabel}</span><br/>
${onlineVisitorCnt} <span class="ft-gray">${onlineVisitorLabel}</span>
</div>
</main>
</div>
<#if 0 != mostCommentArticles?size>
<div class="module">
<header><h2>${mostCommentArticlesLabel}</h2></header>
<main class="list">
<ul>
<#list mostCommentArticles as article>
<li>
<a rel="nofollow" aria-label="${article.articleCommentCount} ${commentLabel}"
class="tooltipped tooltipped-e"
href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
</li>
</#list>
</ul>
</main>
</div>
</#if>
<#if 0 != mostViewCountArticles?size>
<div class="module">
<header><h2>${mostViewCountArticlesLabel}</h2></header>
<main class="list">
<ul>
<#list mostViewCountArticles as article>
<li>
<a rel="nofollow" aria-label="${article.articleCommentCount} ${commentLabel}"
class="tooltipped tooltipped-e"
href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
</li>
</#list>
</ul>
</main>
</div>
</#if>
</aside>
\ No newline at end of file
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
# #
# #
# Description: next skin. # Description: Spaces skin.
# Version: 0.1.1.0, Jun 29, 2016 # Version: 1.0.0.0, Feb 17, 2017
# Author: Liyuan Li # Author: Liyuan Li
# #
name=next name=9IPHP
version=1.0.0 version=1.0.0
forSolo=1.8.0 forSolo=1.9.0
memo=https://github.com/iissnan/hexo-theme-next memo=https://github.com/9IPHP
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${tag.tagTitle} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${tag.tagTitle}"/>
<meta name="description" content="<#list articles as article>${article.articleTitle}<#if article_has_next>,</#if></#list>"/>
</@head>
</head>
<body>
<#include "header.ftl">
<div class="wrapper">
<div class="main-wrap">
<main class="other">
<div class="title">
<h2><i class="icon-tags"></i>
&nbsp;${tag.tagTitle}
<small>${tagLabel}</small>
</div>
<ul class="list">
<#list articles as article>
<li>
<a class="post-title" href="${servePath}${article.articlePermalink}">
<span>${article.articleTitle}</span>
<#if article.articlePutTop>
<sup>
${topArticleLabel}
</sup>
</#if>
<#if article.hasUpdated>
<sup>
${updatedLabel}
</sup>
</#if>
<time class="fn-right">
<i class="icon-date"></i> ${article.articleCreateDate?string("yyyy-MM-dd")}
</time>
</a>
</li>
</#list>
</ul>
<#if 0 != paginationPageCount>
<div class="fn-clear">
<nav class="pagination fn-right">
<#if 1 != paginationPageNums?first>
<a href="${servePath}${path}/${paginationPreviousPageNum}" class="page-number">&laquo;</a>
<a class="page-number" href="${servePath}${path}/1">1</a> <span class="page-number">...</span>
</#if>
<#list paginationPageNums as paginationPageNum>
<#if paginationPageNum == paginationCurrentPageNum>
<span class="page-number current">${paginationPageNum}</span>
<#else>
<a class="page-number" href="${servePath}${path}/${paginationPageNum}">${paginationPageNum}</a>
</#if>
</#list>
<#if paginationPageNums?last != paginationPageCount> <span class="page-number">...</span>
<a href="${servePath}${path}/${paginationPageCount}" class="page-number">${paginationPageCount}</a>
<a href="${servePath}${path}/${paginationNextPageNum}" class="page-number">&raquo;</a>
</#if>
</nav>
</div>
</#if>
</main>
<#include "side.ftl">
</div>
</div>
<#include "footer.ftl">
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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