Commit f61bd1d3 authored by D's avatar D Committed by GitHub

Merge pull request #12129 from b3log/1.5.0-dev

1.5.0 dev
parents 0473873a ee5f2d0d
<?xml version="1.0" encoding="UTF-8"?>
<!--
Description: Solo POM.
Version: 3.11.1.22, Jun 28, 2016
Version: 3.11.1.23, Jul 7, 2016
Author: <a href="http://88250.b3log.org">Liang Ding</a>
Author: <a href="http://www.annpeter.cn">Ann Peter</a>
-->
......@@ -106,7 +106,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.b3log.latke.version>2.0.4</org.b3log.latke.version>
<org.b3log.latke.version>2.2.6</org.b3log.latke.version>
<servlet.version>3.1.0</servlet.version>
<slf4j.version>1.7.5</slf4j.version>
......
......@@ -203,7 +203,7 @@ var Util = {
}
}
// 按字母或者中文拼音进行排序
// 按字母或者中文拼音进行排序
$("#" + id).html($("#" + id + " li").get().sort(function(a, b) {
var valA = $(a).find("span").text().toLowerCase();
var valB = $(b).find("span").text().toLowerCase();
......
<#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 "side.ftl">
<main>
<h2 class="classify-name">
${archive1Label}
<#if "en" == localeString?substring(0, 2)>
${archiveDate.archiveDateMonth} ${archiveDate.archiveDateYear} (${archiveDate.archiveDatePublishedArticleCount})
<#else>
${archiveDate.archiveDateYear} ${yearLabel} ${archiveDate.archiveDateMonth} ${monthLabel} (${archiveDate.archiveDatePublishedArticleCount})
</#if>
</h2>
<#include "article-list.ftl">
<#include "footer.ftl">
</main>
</body>
</html>
......@@ -8,36 +8,37 @@
</@head>
</head>
<body>
<#include "side.ftl">
<main class="classify">
<article>
<header>
<h2>
<a rel="archive" href="${servePath}/archives.html">
${archiveLabel}
</a>
</h2>
</header>
<#if 0 != archiveDates?size>
<ul class="tags fn-clear">
<#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">
嗯..! 目前共计 ${statistic.statisticPublishedBlogArticleCount} 篇日志。 继续努力。
</span>
<#if 0 != archiveDates?size>
<#list archiveDates as archiveDate>
<li>
<#if "en" == localeString?substring(0, 2)>
<a class="tag" href="${servePath}/archives/${archiveDate.archiveDateYear}/${archiveDate.archiveDateMonth}"
title="${archiveDate.monthName} ${archiveDate.archiveDateYear}(${archiveDate.archiveDatePublishedArticleCount})">
${archiveDate.monthName} ${archiveDate.archiveDateYear}(${archiveDate.archiveDatePublishedArticleCount})</a>
<#else>
<a class="tag" href="${servePath}/archives/${archiveDate.archiveDateYear}/${archiveDate.archiveDateMonth}"
title="${archiveDate.archiveDateYear} ${yearLabel} ${archiveDate.archiveDateMonth} ${monthLabel}(${archiveDate.archiveDatePublishedArticleCount})">
${archiveDate.archiveDateYear} ${yearLabel} ${archiveDate.archiveDateMonth} ${monthLabel}(${archiveDate.archiveDatePublishedArticleCount})</a>
</#if>
</li>
<article>
<header class="post-header">
<h1>
<#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>
</h1>
</header>
</article>
</#list>
</ul>
</#if>
</article>
<#include "footer.ftl">
</#if>
</section>
</div>
<#include "side.ftl">
</main>
<#include "footer.ftl">
</body>
</html>
<#list articles as article>
<article>
<header>
<h2>
<a rel="bookmark" href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
<#if article.articlePutTop>
<sup>
${topArticleLabel}
</sup>
</#if>
<#if article.hasUpdated>
<sup>
${updatedLabel}
</sup>
</#if>
</h2>
<section class="posts-expand">
<#list articles as article>
<article class="post-item">
<header>
<h1>
<a class="post-title-link" rel="bookmark" href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
<#if article.articlePutTop>
<sup>
${topArticleLabel}
</sup>
</#if>
<#if article.hasUpdated>
<sup>
${updatedLabel}
</sup>
</#if>
</h1>
<time><span class="icon-date"></span> ${article.articleCreateDate?string("yyyy-MM-dd")}</time>
</header>
<section class="abstract">
<div class="post-meta">
<span>
发表于
<time>
${article.articleCreateDate?string("yyyy-MM-dd")}
</time>
</span>
<span>
&nbsp; | &nbsp;
<a href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount}条评论</a>
</span>
&nbsp; | &nbsp;热度 ${article.articleViewCount}°C
</div>
</header>
${article.articleAbstract}
</section>
<footer class="tags">
<span class="icon-tag"></span> &nbsp;
<#list article.articleTags?split(",") as articleTag>
<a class="tag" rel="tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">
${articleTag}</a>
</#list>
<a rel="nofollow" href="${servePath}/authors/${article.authorId}">
<img class="avatar" title="${article.authorName}" alt="${article.authorName}" src="${article.authorThumbnailURL}"/>
</a>
</footer>
</article>
</#list>
<div class="post-more-link">
<a href="${servePath}${article.articlePermalink}/#more" rel="contents">
阅读全文 &raquo;
</a>
</div>
</article>
</#list>
</section>
<#if 0 != paginationPageCount>
<nav class="pagination">
<#if 1 != paginationPageNums?first>
<a href="${servePath}${path}/${paginationPreviousPageNum}" class="extend">${previousPageLabel}</a>
<a class="page-num" href="${servePath}${path}/1">1</a> ...
</#if>
<#list paginationPageNums as paginationPageNum>
<#if paginationPageNum == paginationCurrentPageNum>
<span class="current page-num">${paginationPageNum}</span>
<#else>
<a class="page-num" href="${servePath}${path}/${paginationPageNum}">${paginationPageNum}</a>
</#if>
</#list>
<#if paginationPageNums?last != paginationPageCount> ...
<a href="${servePath}${path}/${paginationPageCount}" class="page-num">${paginationPageCount}</a>
<a href="${servePath}${path}/${paginationNextPageNum}" class="extend">${nextPagePabel}</a>
</#if>
</nav>
</#if>
\ No newline at end of file
<nav class="pagination">
<#if 1 != paginationPageNums?first>
<a href="${servePath}${path}/${paginationPreviousPageNum}" class="extend next"><<</a>
<a class="page-number" href="${servePath}${path}/1">1</a> ...
</#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> ...
<a href="${servePath}${path}/${paginationPageCount}" class="page-number">${paginationPageCount}</a>
<a href="${servePath}${path}/${paginationNextPageNum}" class="extend next">>></a>
</#if>
</nav>
</#if>
\ No newline at end of file
......@@ -9,80 +9,82 @@
</@head>
</head>
<body>
<#include "side.ftl">
<main>
<article class="post article-body">
<header>
<h2>
<a rel="bookmark" href="${servePath}${article.articlePermalink}">
<#include "header.ftl">
<main class="main wrapper">
<div class="content">
<article class="posts-expand">
<header class="post-header">
<h1 class="post-title">
${article.articleTitle}
</a>
<#if article.articlePutTop>
<sup>
${topArticleLabel}
</sup>
</#if>
<#if article.hasUpdated>
<sup>
${updatedLabel}
</sup>
</#if>
</h2>
<time><span class="icon-date"></span> ${article.articleCreateDate?string("yyyy-MM-dd")}</time>
<section class="tags">
<span class="icon-tag"></span> &nbsp;
<#list article.articleTags?split(",") as articleTag>
<a class="tag" rel="tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">
${articleTag}</a>
</#list>
<a rel="nofollow" href="${servePath}/authors/${article.authorId}">
<img class="avatar" title="${article.authorName}" alt="${article.authorName}" src="${article.authorThumbnailURL}"/>
</a>
</section>
</header>
<section class="abstract">
${article.articleContent}
<#if "" != article.articleSign.signHTML?trim>
<div>
${article.articleSign.signHTML}
</div>
</#if>
<#if article.articlePutTop>
<sup>
${topArticleLabel}
</sup>
</#if>
<#if article.hasUpdated>
<sup>
${updatedLabel}
</sup>
</#if>
</h1>
<div class="post-meta">
<span class="post-time">
发表于
<time>
${article.articleCreateDate?string("yyyy-MM-dd")}
</time>
</span>
<span class="post-comments-count">
&nbsp; | &nbsp;
<a href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount}条评论</a>
</span>
&nbsp; | &nbsp;热度
${article.articleViewCount}°C
</div>
</header>
<#if nextArticlePermalink?? || previousArticlePermalink??>
<aside class="fn-clear">
<#if previousArticlePermalink??>
<a class="fn-left" rel="prev" href="${servePath}${previousArticlePermalink}">
<strong>&lt;</strong> ${previousArticleTitle}
</a>
<div class="post-body">
${article.articleContent}
<#if "" != article.articleSign.signHTML?trim>
<div>
${article.articleSign.signHTML}
</div>
</#if>
<#if nextArticlePermalink??>
<a class="fn-right" rel="next" href="${servePath}${nextArticlePermalink}">
${nextArticleTitle} <strong>&gt;</strong>
</a>
</#if>
</aside>
</#if>
</section>
<footer class="fn-clear share">
<div class="fn-right">
<span class="icon icon-t-weibo" data-type="tencent"></span>
<span class="icon icon-weibo" data-type="weibo"></span>
<span class="icon icon-twitter" data-type="twitter"></span>
<span class="icon icon-gplus" data-type="google"></span>
</div>
</footer>
</article>
<footer>
<div class="post-tags">
<#list article.articleTags?split(",") as articleTag>
<a rel="tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">
${articleTag}</a>
</#list>
</div>
<div class="post-nav fn-clear">
<#if previousArticlePermalink??>
<div class="post-nav-prev post-nav-item fn-left">
<a href="${servePath}${previousArticlePermalink}" rel="next" title="${previousArticleTitle}">
< ${previousArticleTitle}
</a>
</div>
</#if>
<#if nextArticlePermalink??>
<div class="post-nav-next post-nav-item fn-right">
<a href="${servePath}${nextArticlePermalink}" rel="prev" title="${nextArticleTitle}">
${nextArticleTitle} >
</a>
</div>
</#if>
</div>
</footer>
</article>
</div>
<@comments commentList=articleComments article=article></@comments>
<#include "footer.ftl">
<@comment_script oId=article.oId>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
</@comment_script>
<#include "side.ftl">
</main>
<#include "footer.ftl">
<@comment_script oId=article.oId>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
</@comment_script>
</body>
</html>
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${authorName} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${authorName}"/>
<meta name="description" content="<#list articles as article>${article.articleTitle}<#if article_has_next>,</#if></#list>"/>
</@head>
</head>
<body>
<#include "side.ftl">
<main>
<h2 class="classify-name">
${author1Label}${authorName}
</h2>
<#include "article-list.ftl">
<#include "footer.ftl">
</main>
</body>
</html>
No preview for this file type
This diff is collapsed.
No preview for this file type
No preview for this file type
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -8,86 +8,38 @@
</@head>
</head>
<body>
<#include "side.ftl">
<main class="dynamic">
<#if 0 != recentComments?size>
<ul class="comments">
<#list recentComments as comment>
<#if comment_index < 6>
<li>
<img class="avatar" title="${comment.commentName}"
alt="${comment.commentName}" src="${comment.commentThumbnailURL}">
<div class="content">
<div class="fn-clear post-meta">
<span class="fn-left">
<#if "http://" == comment.commentURL>
<span>${comment.commentName}</span>
<#else>
<a href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
</#if>
<time>${comment.commentDate?string("yy-MM-dd HH")}</time>
</span>
<a class="fn-right" href="${servePath}${comment.commentSharpURL}">${viewLabel}»</a>
<#include "header.ftl">
<main class="main wrapper">
<div class="content">
<#if 0 != recentComments?size>
<ul class="comments" id="comments">
<#list recentComments as comment>
<li class="fn-clear">
<img class="avatar-48" title="${comment.commentName}" src="${comment.commentThumbnailURL}">
<div class="comment-body">
<div class="fn-clear comment-meta">
<span class="fn-left">
<#if "http://" == comment.commentURL>
<span>${comment.commentName}</span>
<#else>
<a href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
</#if>
<time>${comment.commentDate?string("yyyy-MM-dd HH:mm")}</time>
</span>
<a class="fn-right" href="${servePath}${comment.commentSharpURL}">${viewLabel}»</a>
</div>
<div class="comment-content">
${comment.commentContent}
</div>
</div>
<div class="comment-content">
${comment.commentContent}
</div>
</div>
</li>
</#if>
</#list>
</ul>
</#if>
<#if 0 != mostCommentArticles?size || 0 != mostViewCountArticles?size>
<#if 0 != mostCommentArticles?size>
<article>
<header>
<h2>
${mostCommentArticlesLabel}
</h2>
</header>
<ul>
<#list mostCommentArticles as article>
<li>
<a href="${servePath}${article.articlePermalink}" title="${article.articleTitle}" rel="nofollow">
${article.articleTitle}
</a>
<span data-ico="&#xe14e;">
${article.articleCommentCount}
</span>
</li>
</#list>
</ul>
</article>
</#if>
<#if 0 != mostViewCountArticles?size>
<article>
<header>
<h2>
${mostViewCountArticlesLabel}
</h2>
</header>
<ul>
<#list mostViewCountArticles as article>
<li>
<a href="${servePath}${article.articlePermalink}" title="${article.articleTitle}" rel="nofollow">
${article.articleTitle}
</a>
<span data-ico="&#xe185;">
${article.articleViewCount}
</span>
</li>
</#list>
</ul>
</article>
</#if>
</#if>
<#include "footer.ftl">
</#if>
</div>
<#include "side.ftl">
</main>
<#include "footer.ftl">
<script>
var $commentContents = $(".comments .comment-content");
......
<footer class="footer">
<div class="fn-clear">
<span class="fn-right">
${viewCount1Label}${statistic.statisticBlogViewCount}
&nbsp;
${articleCount1Label}${statistic.statisticPublishedBlogArticleCount}
&nbsp;
${commentCount1Label}${statistic.statisticPublishedBlogCommentCount}
&nbsp;
${onlineVisitor1Label}${onlineVisitorCnt}
</span>
</div>
<div class="fn-clear">
<a href="${servePath}">${blogTitle}</a>
<div class="wrapper">
<a href="${servePath}">${blogTitle}</a> •
${onlineVisitor1Label}${onlineVisitorCnt} <br/>
&copy; ${year}
${footerContent}
<span class="fn-right">
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a> •
<a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version}
</span>
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a> •
<a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version}
</div>
<span onclick="Util.goTop()" class="icon-goup"></span>
</footer>
<div class="back-to-top" 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/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
......
<header class="header">
<div class="header-line"></div>
<div class="fn-clear wrapper">
<div class="logo-wrap">
<a href="${servePath}" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">${blogTitle}</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<div class="site-nav-toggle fn-right" onclick="$('.header-line').toggle();$('nav').children('.menu').slideToggle();">
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</div>
<nav>
<ul class="menu">
<#list pageNavigations as page>
<li class="menu-item">
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}" rel="section">
${page.pageTitle}
</a>
</li>
</#list>
<li class="menu-item">
<a href="${servePath}/dynamic.html" rel="section">
${dynamicLabel}
</a>
</li>
<li class="menu-item">
<a href="${servePath}/tags.html" rel="section">
${allTagsLabel}
</a>
</li>
<li class="menu-item">
<a href="${servePath}/archives.html">
${archiveLabel}
</a>
</li>
<li class="menu-item">
<a rel="alternate" href="${servePath}/blog-articles-rss.do" rel="section">
RSS
</a>
</li>
</ul>
<div class="site-search">
<form target="_blank" action="http://zhannei.baidu.com/cse/site">
<input placeholder="${searchLabel}" id="search" type="text" name="q"/>
<input type="submit" value="" class="fn-none" />
<input type="hidden" name="cc" value="${serverHost}">
</form>
</div>
</nav>
</div>
</header>
\ No newline at end of file
......@@ -12,10 +12,13 @@
</@head>
</head>
<body>
<#include "side.ftl">
<main>
<#include "article-list.ftl">
<#include "footer.ftl">
<#include "header.ftl">
<main class="main wrapper">
<div class="content">
<#include "article-list.ftl">
</div>
<#include "side.ftl">
</main>
<#include "footer.ftl">
</body>
</html>
......@@ -24,57 +24,65 @@
* @description next 皮肤脚本
* @static
*/
var Yilia = {
/**
* @description 页面初始化
*/
var NexT = {
init: function () {
Util.killIE();
this.resetTags();
$(window).scroll(function () {
if ($("article").length > 0 && $("article.post").length === 0) {
$("article:not(.show)").each(function () {
if ($(this).offset().top <= $(window).scrollTop() + $(window).height() - $(this).height() / 7) {
$(this).addClass("show");
}
});
}
$('.sidebar-toggle').click(function () {
var $sidebar = $('.sidebar');
if ($(this).hasClass('sidebar-active')) {
$(this).removeClass('sidebar-active');
if ($(window).scrollTop() > $(window).height()) {
$(".icon-goup").show();
$('body').animate({
'padding-right': 0
});
$sidebar.animate({
right: -320
});
} else {
$(".icon-goup").hide();
$(this).addClass('sidebar-active');
$('body').animate({
'padding-right': 320
});
$sidebar.animate({
right: 0
});
}
});
if ($("article.post").length === 1) {
$("article.post").addClass('show');
}
$('.site-nav-toggle').click(function () {
$('.site-nav').slideToggle();
});
$(window).scroll();
},
resetTags: function () {
$("a.tag").each(function (i) {
$(this).addClass("color" + Math.ceil(Math.random() * 4));
$(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);
});
},
share: function () {
$(".share span").click(function () {
var key = $(this).data("type");
var title = encodeURIComponent($("title").text()),
url = $(".post-title a").attr('href') ? $(".post-title a").attr('href') : location,
pic = $(".post-content img:eq(0)").attr("src");
var urls = {};
urls.tencent = "http://share.v.t.qq.com/index.php?c=share&a=index&title=" + title +
"&url=" + url + "&pic=" + pic;
urls.weibo = "http://v.t.sina.com.cn/share/share.php?title=" +
title + "&url=" + url + "&pic=" + pic;
urls.google = "https://plus.google.com/share?url=" + url;
urls.twitter = "https://twitter.com/intent/tweet?status=" + title + " " + url;
window.open(urls[key], "_blank", "top=100,left=200,width=648,height=618");
});
initArticle: function () {
if ($('.b3-solo-list li').length > 0) {
$('.sidebar').html($('.b3-solo-list'));
$('.sidebar-toggle').click();
}
}
};
Yilia.init();
\ No newline at end of file
NexT.init();
\ No newline at end of file
......@@ -16,10 +16,11 @@
#
# Description: B3log Solo default language configurations(zh_CN).
# Version: 1.0.0.1, Jun 19, 2015
# Version: 0.1.0.0, Jun 29, 2016
# Author: Liyuan Li
#
searchLabel=\u641c\u7d22
subscribeLabel=\u8ba2\u9605
dynamicLabel=\u52a8\u6001
adminConsoleLabel=\u540e\u53f0\u7ba1\u7406
......
<#include "macro-head.ftl">
<!DOCTYPE html>
<html>
<head>
<@head title="${blogTitle}">
<meta name="keywords" content="${metaKeywords},${linkLabel}"/>
<meta name="description" content="${metaDescription},${linkLabel}"/>
</@head>
</head>
<body>
<#include "side.ftl">
<main class="classify">
<article>
<header>
<h2>
<a rel="archive" href="${servePath}/links.html">
${linkLabel}
</a>
</h2>
</header>
<#if 0 != links?size>
<ul class="tags fn-clear">
<#list links as link>
<li>
<a rel="friend" href="${link.linkAddress}" class="tag"
title="${link.linkDescription}" target="_blank">
<img src="${faviconAPI}<#list link.linkAddress?split('/') as x><#if x_index=2>${x}<#break></#if></#list>" width="16" height="16" />
${link.linkTitle}
</a>
</li>
</#list>
</ul>
</#if>
</article>
<#include "footer.ftl">
</main>
</body>
</html>
<#macro comments commentList article>
<ul class="comments" id="comments">
<#list commentList as comment>
<li id="${comment.oId}">
<img class="avatar" title="${comment.commentName}" src="${comment.commentThumbnailURL}">
<div class="content">
<div class="fn-clear post-meta">
<li id="${comment.oId}" class="fn-clear">
<img class="avatar-48" title="${comment.commentName}" src="${comment.commentThumbnailURL}">
<div class="comment-body">
<div class="fn-clear comment-meta">
<span class="fn-left">
<#if "http://" == comment.commentURL>
<span>${comment.commentName}</span>
<a>${comment.commentName}</a>
<#else>
<a href="${comment.commentURL}" target="_blank">${comment.commentName}</a>
</#if>
......@@ -18,7 +18,7 @@
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')"
>${comment.commentOriginalCommentName}</a>
</#if>
<time>${comment.commentDate?string("yyyy-MM-dd")}</time>
<time>${comment.commentDate?string("yyyy-MM-dd HH:mm")}</time>
</span>
<#if article.commentable>
<a class="fn-right" href="javascript:replyTo('${comment.oId}')">${replyLabel}</a>
......@@ -114,18 +114,20 @@
});
var addComment = function (result, state) {
var commentable = $("#commentForm").length === 0 ? false : true;
var commentHTML = '<li id="' + result.oId +
'"><img class="avatar" title="'
+ result.userName + '" src="' + result.commentThumbnailURL + '"><div class="content">'
+ '<div class="fn-clear post-meta"><span class="fn-left">' + result.replyNameHTML;
var commentHTML = '<li class="fn-clear" id="' + result.oId +
'"><img class="avatar-48" title="'
+ result.userName + '" src="' + result.commentThumbnailURL + '"><div class="comment-body">'
+ '<div class="fn-clear comment-meta"><span class="fn-left">' + result.replyNameHTML;
if (state !== "") {
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".post-meta a").first().text();
var commentOriginalCommentName = $("#" + page.currentCommentId).find(".comment-meta a").first().text();
commentHTML += '&nbsp;@&nbsp;<a href="${servePath}' + result.commentSharpURL.split("#")[0] + '#' + page.currentCommentId + '"'
+ 'onmouseover="page.showComment(this, \'' + page.currentCommentId + '\', 23);"'
+ 'onmouseout="page.hideComment(\'' + page.currentCommentId + '\')">' + commentOriginalCommentName + '</a>';
}
commentHTML += ' <time>' + result.commentDate
commentHTML += '<time>' + result.commentDate
+ '</time></span>';
if (commentable) {
commentHTML += '<a class="fn-right" href="javascript:replyTo(\'' + result.oId + '\');">${replyLabel}</a>';
......@@ -140,10 +142,10 @@
page.addReplyForm(id, commentFormHTML);
};
(function () {
Yilia.share();
page.load();
NexT.initArticle();
// emotions
page.replaceCommentsEm(".comments .comment-content");
page.replaceCommentsEm("#comments .comment-content");
<#nested>
})();
</script>
......
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