Commit 9f1636d6 authored by mainlove's avatar mainlove

Merge branch '0.5.6' of https://github.com/b3log/b3log-solo.git into 0.5.6

parents 756ee2e9 97ff9469
......@@ -21,7 +21,7 @@ package org.b3log.solo.model;
*
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @author <a href="mailto:dongxv.vang@gmail.com">Dongxu Wang</a>
* @version 1.0.4.8, May 4, 2012
* @version 1.0.4.9, Jan 22, 2013
* @since 0.3.1
*/
public final class Common {
......@@ -146,6 +146,11 @@ public final class Common {
*/
public static final String AUTHOR_NAME = "authorName";
/**
* Author thumbnail URL.
*/
public static final String AUTHOR_THUMBNAIL_URL = "authorThumbnailURL";
/**
* Author id.
*/
......
......@@ -44,6 +44,7 @@ import org.b3log.latke.servlet.renderer.TextHTMLRenderer;
import org.b3log.latke.servlet.renderer.freemarker.AbstractFreeMarkerRenderer;
import org.b3log.latke.util.Dates;
import org.b3log.latke.util.Locales;
import org.b3log.latke.util.MD5;
import org.b3log.latke.util.Paginator;
import org.b3log.latke.util.Requests;
import org.b3log.latke.util.Stopwatchs;
......@@ -67,7 +68,7 @@ import org.jsoup.Jsoup;
* Article processor.
*
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.1.2.7, Jan 18, 2013
* @version 1.1.2.8, Jan 22, 2013
* @since 0.3.1
*/
@RequestProcessor
......@@ -1086,6 +1087,11 @@ public final class ArticleProcessor {
dataModel.put(Keys.OBJECT_ID, authorId);
dataModel.put(Common.AUTHOR_NAME, author.optString(User.USER_NAME));
final String thumbnailURL = "http://secure.gravatar.com/avatar/" + MD5.hash(author.optString(User.USER_EMAIL)) + "?s=60&d="
+ Latkes.getStaticServePath() + "/images/default-user-thumbnail.png";
dataModel.put(Common.AUTHOR_THUMBNAIL_URL, thumbnailURL);
dataModel.put(Pagination.PAGINATION_CURRENT_PAGE_NUM, currentPageNum);
filler.fillBlogFooter(dataModel, preference);
......
<#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>
${topBarReplacement}
<#include "header.ftl">
<div class="main">
<div class="wrapper">
<h2>${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">
</div>
</div>
<#include "footer.ftl">
</body>
</html>
<div class="content articles">
<div class="vertical"></div>
<#list articles as article>
<article<#if !article_has_next> class="last"</#if>>
<div>
<div class="dot"></div>
<div class="arrow"></div>
<time>
<span>
${article.articleCreateDate?string("yy-MM-dd HH:mm")}
<div class="wrapper">
<div class="articles container">
<div class="vertical"></div>
<#list articles as article>
<article<#if !article_has_next> class="last"</#if>>
<div class="module">
<div class="dot"></div>
<div class="arrow"></div>
<time>
<span>
${article.articleCreateDate?string("yy-MM-dd HH:mm")}
</span>
</time>
<h2>
<a rel="bookmark" href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
<#if article.hasUpdated>
<sup>
${updatedLabel}
</sup>
</#if>
<#if article.articlePutTop>
<sup>
${topArticleLabel}
</sup>
</#if>
</h2>
<p>
${article.articleAbstract}
</p>
<span class="ico-tags ico" title="${tagLabel}">
<#list article.articleTags?split(",") as articleTag><a rel="category tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">${articleTag}</a><#if articleTag_has_next>,</#if></#list>
</span>
</time>
<h2>
<a rel="bookmark" href="${servePath}${article.articlePermalink}">
${article.articleTitle}
</a>
<#if article.hasUpdated>
<sup>
${updatedLabel}
</sup>
</#if>
<#if article.articlePutTop>
<sup>
${topArticleLabel}
</sup>
</#if>
</h2>
<p>
${article.articleAbstract}
</p>
<span class="ico-tags" title="${tagLabel}">
<#list article.articleTags?split(",") as articleTag><a rel="category tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">${articleTag}</a><#if articleTag_has_next>,</#if></#list>
</span>
<span class="ico-author" title="${authorLabel}">
<a rel="author" href="${servePath}/authors/${article.authorId}">${article.authorName}</a>
</span>
<span class="ico-comment" title="${commentLabel}">
<#if article.articleCommentCount == 0>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
${noCommentLabel}
</a>
<#else>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount}
</a>
</#if>
</span>
<span class="ico-view" title="${viewLabel}">
<a rel="nofollow" href="${servePath}${article.articlePermalink}">
${article.articleViewCount}
</a>
</span>
</div>
</article>
</#list>
</div>
<#if paginationCurrentPageNum != paginationPageCount && 0 != paginationPageCount>
<div class="article-next ft-gray" onclick="getNextPage()" data-page="${paginationCurrentPageNum}">${moreLabel}</div>
</#if>
\ No newline at end of file
<span class="ico-author ico" title="${authorLabel}">
<a rel="author" href="${servePath}/authors/${article.authorId}">${article.authorName}</a>
</span>
<span class="ico-comment ico" title="${commentLabel}">
<#if article.articleCommentCount == 0>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
${noCommentLabel}
</a>
<#else>
<a rel="nofollow" href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount}
</a>
</#if>
</span>
<span class="ico-view ico" title="${viewLabel}">
<a rel="nofollow" href="${servePath}${article.articlePermalink}">
${article.articleViewCount}
</a>
</span>
</div>
</article>
</#list>
</div>
<#if paginationCurrentPageNum != paginationPageCount && 0 != paginationPageCount>
<div class="article-next ft-gray" onclick="getNextPage()" data-page="${paginationCurrentPageNum}">${moreLabel}</div>
</#if>
</div>
\ No newline at end of file
......@@ -11,9 +11,9 @@
<body>
${topBarReplacement}
<#include "header.ftl">
<div class="main">
<div class="wrapper">
<div class="article">
<div class="wrapper">
<div class="container">
<div class="module">
<div class="article-title">
<h2>
<a class="ft-gray" href="${servePath}${article.articlePermalink}">
......@@ -57,7 +57,6 @@
<a rel="nofollow" href="${servePath}/authors/${article.authorId}">${article.authorName}</a>
</div>
<div class="left ft-gray">
${tag1Label}
<#list article.articleTags?split(",") as articleTag>
<a rel="tag" href="${servePath}/tags/${articleTag?url('UTF-8')}">${articleTag}</a><#if articleTag_has_next>,</#if>
</#list>
......@@ -85,10 +84,11 @@
</div>
</#if>
<div class="clear"></div>
<@comments commentList=articleComments article=article></@comments>
</div>
<@comments commentList=articleComments article=article></@comments>
</div>
</div>
<#include "footer.ftl">
<@comment_script oId=article.oId>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
......
......@@ -10,12 +10,8 @@
<body>
${topBarReplacement}
<#include "header.ftl">
<div class="main">
<div class="wrapper">
<h2>${author1Label}${authorName}</h2>
<#include "article-list.ftl">
</div>
</div>
<h2 class="nav-abs"><img src="${authorThumbnailURL}"/>${authorName}</h2>
<#include "article-list.ftl">
<#include "footer.ftl">
</body>
</html>
......@@ -25,12 +25,13 @@ html, body {
-ms-text-size-adjust: 100%;
margin: 0;
padding: 0;
height: 100%;
}
body {
font: 0.81em Verdana, arial, '\5fae\8f6f\96c5\9ed1';
background: url("../../timeline/images/bg.png") repeat scroll 0 0 #DEE4EA;
color: #666666;
background-color: #363A3D;
}
button,
......@@ -169,22 +170,21 @@ img {
background-position: -96px -48px;
}
#tags.other-main {
margin: 47px 44px 0;
width: 902px;
#tags {
margin: 0;
}
#tags li {
float: left;
height: 38px;
list-style-type: none;
}
#tags a {
margin: 3px 6px;
padding: 3px 12px;
background-color: #FCFCFC;
box-shadow: 0 0 2px #D5D5D5;
float: left;
display: block;
margin: 5px 10px;
padding: 5px 10px;
}
#tags a:hover {
......@@ -193,6 +193,11 @@ img {
box-shadow: 0 0 4px #D5D5D5;
}
#tags b {
font-size: 70%;
opacity: 0.6;
}
.tags1, .tags1:visited {
font-size: 12px;
color: #a7a7a7;
......@@ -217,6 +222,33 @@ img {
font-size: 20px;
color: #0a0a0a;
}
.module {
background-color: #FFFFFF;
border: 1px solid #BEC3C7;
border-radius: 5px 5px 5px 5px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
margin-bottom: 30px;
padding: 15px;
word-wrap: break-word;
}
.module > h3 {
margin: 0 0 10px 0;
color: #444;
}
.module > ul {
list-style-type: none;
padding-left: 0;
margin: 0;
overflow: hidden;
}
.module > ul > li {
border-top: 1px solid #EEEEEE;
padding: 6px 0;
}
/* end common */
/* start icon */
......@@ -226,6 +258,8 @@ img {
.ico-comment,
.ico-top,
.ico-view,
.ico-reply,
.ico-translate,
#search {
background-repeat: no-repeat;
background-image: url("../../timeline/images/icons.png");
......@@ -234,7 +268,8 @@ img {
.ico-author,
.ico-tags,
.ico-comment,
.ico-view {
.ico-view,
.ico-reply {
padding-left: 20px;
background-position: -1px -63px;
margin-right: 10px;
......@@ -252,6 +287,19 @@ img {
background-position: 0 -122px;
}
.ico-reply {
background-position: 0 -162px;
}
.ico-translate {
background-position: 0 -186px;
cursor: pointer;
float: right;
height: 16px;
margin-left: 10px;
width: 16px;
}
#search {
background-position: 5px -138px;
border: medium none;
......@@ -259,7 +307,7 @@ img {
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4) inset, 0 1px 0 rgba(255, 255, 255, 0.1);
color: #A5A099;
height: 22px;
margin-top: 14px;
margin-top: 13px;
padding-left: 25px;
transition: width 0.7s ease 0s;
width: 60px;
......@@ -286,9 +334,9 @@ img {
/* start framework */
.wrapper {
margin: 0 auto;
width: 80%;
min-width: 500px;
padding: 50px 0;
background: url("../../timeline/images/bg.png") repeat scroll 0 0 #DEE4EA;
}
.header {
......@@ -300,12 +348,12 @@ img {
overflow: hidden;
}
.content {
margin: 50px 0;
.container {
width: 80%;
margin: 0 auto;
}
.footer {
background-color: #363A3D;
border-top: 1px solid #232323;
padding: 20px 0;
color: #ddd;
......@@ -327,11 +375,21 @@ img {
margin: 3px 0 0;
}
.header a {
.header .title a {
color: #414141;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}
.header li a {
color: #444;
padding: 19px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}
.header li a.current {
border-bottom: 2px solid #D26911;
}
.header a:hover {
color: #000;
}
......@@ -339,13 +397,13 @@ img {
.header li {
float: left;
list-style-type: none;
margin-right: 20px;
}
/* end header */
/* start article list */
.articles {
position: relative;
margin-top: 11px;
}
.articles > .vertical {
......@@ -362,20 +420,14 @@ img {
.articles > article {
width: 50%;
position: absolute;
}
.articles > article > div {
background-color: #FFFFFF;
border: 1px solid #BEC3C7;
border-radius: 5px 5px 5px 5px;
margin-bottom: 20px;
padding: 15px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
.articles > article.l > div.module {
margin-right: 30px;
}
.articles > article.l > div {
margin-right: 30px;
.articles > article.r {
left: 50%;
}
.articles > article.r > div {
......@@ -437,13 +489,122 @@ img {
text-decoration: none;
}
.articles > article > div > span > a {
.ico > a {
color: #999999;
font-size: 80%;
text-decoration: none;
}
.articles > article > div > span > a:hover {
.ico > a:hover {
color: #000;
}
/* end article list */
/* start dynamic */
.dynamic-l {
float: left;
width: 70%;
}
.dynamic-l > div {
margin-right: 30px;
}
.dynamic-r {
float: right;
width: 30%;
}
.dynamic-r .tags a,
.links a {
line-height: 24px;
}
/* end dynamic */
/* start comments */
#comments {
margin: 30px 0 50px;
position: relative;
}
.comments > li > img {
height: 60px;
width: 60px;
border-radius: 30px;
float: left;
margin-right: 15px;
}
.comments .author {
font-size: 130%;
font-style: italic;
}
.module > ul > li.comment-body-ref {
background-color: #FFFFFF;
border: 1px solid #ddd;
left: 76px;
opacity: 0.8;
padding: 10px;
position: absolute;
width: 74%;
border-radius: 10px;
}
.comment-body-ref .ico-reply {
display: none;
}
.comment-form {
width: 100%;
}
.comment-form input[type='text'],
.comment-form textarea {
background: url("../../timeline/images/bg.png") repeat scroll 0 0 #E5E8EA;
border: 1px solid #BCBDBE;
border-radius: 5px 5px 5px 5px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
margin: 5px 5px 5px 0;
padding: 6px 10px;
}
.comment-form input[type='text']:focus,
.comment-form textarea:focus {
background-color: #EFEFEF;
outline: medium none;
}
#submitCommentButton,
#submitCommentButtonReply {
background: none repeat scroll 0 0 #868889;
border: 1px solid #5D6265;
border-radius: 10em 10em 10em 10em;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 1px rgba(0, 0, 0, 0.3);
color: #FFFFFF;
cursor: pointer;
padding: 5px 20px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
}
#submitCommentButton:hover,
#submitCommentButtonReply:hover {
color: #fff;
background-color: #444;
}
/* end comments */
/* start others */
.nav-abs {
background-color: #6B6B6B;
border: 1px solid #898989;
border-radius: 5px 5px 5px 5px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) inset, 0 1px 0 rgba(255, 255, 255, 0.7), 0 -1px 0 rgba(255, 255, 255, 0.6);
color: #CCCCCC;
cursor: pointer;
padding: 5px 10px;
position: absolute;
right: 30px;
top: 61px;
}
/* end others */
\ No newline at end of file
<div class="footer">
<div class="wrapper">
<div class="container fn-clear">
<div class="left">
<span class="ft-gray">&copy; ${year}</span> - <a href="${servePath}">${blogTitle}</a>
<span>&copy; ${year}</span> - <a href="${servePath}">${blogTitle}</a>
Powered by
<a href="http://b3log.org" target="_blank" class="logo">
<a href="http://b3log.org" target="_blank">
${b3logLabel}&nbsp;
<span style="color: orangered; font-weight: bold;">Solo</span></a>,
ver ${version}&nbsp;&nbsp;
Theme by <a rel="friend" rel="friend" href="http://vanessa.b3log.org" target="_blank">Vanessa</a>.
<b style="color: orangered;">Solo</b></a>,
ver ${version}&nbsp;&nbsp;
Theme by <a rel="friend" rel="friend" href="http://vanessa.b3log.org" target="_blank">Vanessa</a>.
</div>
<div class="right">
<div class="left">
${viewCount1Label}
<span class="ft-gray">
${statistic.statisticBlogViewCount}
</span>
&nbsp;&nbsp;
${articleCount1Label}
<span class="ft-gray">
${statistic.statisticPublishedBlogArticleCount}
</span>
&nbsp;&nbsp;
${commentCount1Label}
<span class="ft-gray">
${statistic.statisticPublishedBlogCommentCount}
</span>
</div>
<span class="translate-ico" onclick="goTranslate()"></span>
<div class="clear"></div>
${viewCount1Label}
${statistic.statisticBlogViewCount}
&nbsp;&nbsp;
${articleCount1Label}
${statistic.statisticPublishedBlogArticleCount}
&nbsp;&nbsp;
${commentCount1Label}
${statistic.statisticPublishedBlogCommentCount}
<span class="ico-translate" onclick="timeline.translate()"></span>
</div>
<div class="clear"></div>
</div>
</div>
<div class="ico-top none" onclick="Util.goTop()" title="TOP"></div>
......
<div class="header">
<div class="wrapper fn-clear">
<div class="container fn-clear">
<div class="left">
<h1 class="title">
<a href="${servePath}">
......@@ -20,18 +20,12 @@
<li>
<a href="${servePath}/tags.html">${allTagsLabel}</a>
</li>
<li>
<a href="${servePath}/archives.html">${archiveLabel}</a>
</li>
<li>
<a href="${servePath}/links.html">${linkLabel}</a>
</li>
<li>
<a rel="alternate" href="${servePath}/blog-articles-feed.do">Atom <img src="${staticServePath}/images/feed.png" alt="Atom"/></a>
</li>
</ul>
<form class="right" target="_blank" method="get" action="http://www.google.com/search">
<input id="search" type="text" name="q" />
<input placeholder="${searchLabel}" id="search" type="text" name="q" />
<input type="submit" name="btnG" value="" class="none" />
<input type="hidden" name="oe" value="UTF-8" />
<input type="hidden" name="ie" value="UTF-8" />
......
......@@ -10,37 +10,7 @@
<body>
${topBarReplacement}
<#include "header.ftl">
<div class="wrapper">
<#include "article-list.ftl">
</div>
<#include "article-list.ftl">
<#include "footer.ftl">
<script>
timeline.$articles = $(".articles");
$(window).resize(function () {
timeline.colH = [0, 20];
timeline.$articles.find("article").each(function () {
var $it = $(this),
isLeft = timeline.colH[1] > timeline.colH[0],
left = isLeft ? 0 : Math.floor(timeline.$articles.width() / 2),
top = isLeft ? timeline.colH[0] : timeline.colH[1];
$it.css({
"left": left + "px",
"top": top + "px"
});
if (isLeft) {
$it.addClass("l");
} else {
$it.addClass("r");
}
timeline.colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true));
});
timeline.$articles.height(timeline.colH[0] > timeline.colH[1] ? timeline.colH[0] : timeline.colH[1]);
});
$(window).resize();$(window).resize();
</script>
</body>
</html>
......@@ -21,38 +21,50 @@
* @version 1.0.0.1, Jan 14, 2013
*/
var timeline = {
$articles: $(".articles"),
_COLH: [0, 20],
_layoutArticleList: function () {
timeline.$articles.find("article").each(function () {
var $it = $(this),
isLeft = timeline.colH[1] > timeline.colH[0],
left = isLeft ? 0 : Math.floor(timeline.$articles.width() / 2),
top = isLeft ? timeline.colH[0] : timeline.colH[1];
$it.css({
"left": left + "px",
"top": top + "px"
});
_COLHA: 0,
_COLHB: 20,
_initArticleList: function () {
var $articles = $(".articles");
if ($articles.length === 0) {
return;
}
$(window).resize(function () {
var colH = [timeline._COLHA, timeline._COLHB];
$articles.find("article").each(function () {
var $it = $(this),
isLeft = colH[1] > colH[0],
left = isLeft ? 0 : "inherit",
top = isLeft ? colH[0] : colH[1];
$it.css({
"left": left + "px",
"top": top + "px",
"position": "absolute"
});
if (isLeft) {
$it.addClass("l");
} else {
$it.addClass("r");
}
if (isLeft) {
$it.addClass("l");
} else {
$it.addClass("r");
}
timeline.colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true));
});
colH[( isLeft ? '0' : '1' )] += parseInt($it.outerHeight(true));
});
timeline.$articles.height(timeline.colH[0] > timeline.colH[1] ? timeline.colH[0] : timeline.colH[1]);
timeline.colH = timeline._COLH;
},
_initArticleList: function () {
$(window).resize(function () {
timeline._layoutArticleList();
$articles.height(colH[0] > colH[1] ? colH[0] : colH[1]);
});
$(window).resize();
$(window).resize();
},
_setNavCurrent: function () {
$(".header li a").each(function () {
if($(this).attr("href") === location.href) {
this.className = "current";
} else {
this.className = "";
}
})
},
init: function () {
......@@ -63,17 +75,15 @@ var timeline = {
$(".ico-top").hide();
}
});
if ($(".articles").length === 1) {
timeline._initArticleList();
}
timeline._initArticleList();
timeline._setNavCurrent();
},
translate: function () {
window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href);
}
};
var goTranslate = function () {
window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href);
};
(function () {
Util.init();
Util.replaceSideEm($(".recent-comments-content"));
......
......@@ -19,6 +19,7 @@
# Version: 1.0.0.5, May 22, 2012
# Author: Liyuan Li
#
searchLabel=Search
dynamicLabel=Dynamic
moreLabel=More
contentLabel=More...
......
......@@ -19,6 +19,7 @@
# Version: 1.0.0.5, May 22, 2012
# Author: Liyuan Li
#
searchLabel=\u641c\u7d22
dynamicLabel=\u52a8\u6001
moreLabel=\u66f4\u591a
contentLabel=\u5168\u6587
......
<#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>
${topBarReplacement}
<#include "header.ftl">
<div class="main">
<div class="wrapper">
<#if 0 != links?size>
<ul class="other-main links">
<#list links as link>
<li>
<a rel="friend" href="${link.linkAddress}" alt="${link.linkTitle}" target="_blank">
<img alt="${link.linkTitle}"
src="http://www.google.com/s2/u/0/favicons?domain=<#list link.linkAddress?split('/') as x><#if x_index=2>${x}<#break></#if></#list>" /></a>
<a rel="friend" href="${link.linkAddress}" title="${link.linkDescription}" target="_blank">${link.linkTitle}
</a>
</li>
</#list>
</ul>
</#if>
</div>
</div>
<#include "footer.ftl">
</body>
</html>
<#macro comments commentList article>
<div id="comments">
<ul id="comments" class="comments">
<#list commentList as comment>
<div id="${comment.oId}">
<img class="comment-header" title="${comment.commentName}"
<li id="${comment.oId}">
<img title="${comment.commentName}"
alt="${comment.commentName}" src="${comment.commentThumbnailURL}"/>
<div class="comment-panel">
<div class="left">
<div>
<span class="author">
<#if "http://" == comment.commentURL>
<a>${comment.commentName}</a>
<#else>
......@@ -16,87 +16,81 @@
onmouseover="page.showComment(this, '${comment.commentOriginalCommentId}', 20);"
onmouseout="page.hideComment('${comment.commentOriginalCommentId}')">${comment.commentOriginalCommentName}</a>
</#if>
</div>
</span>
<small><b> ${comment.commentDate?string("yy-MM-dd HH:mm")}</b></small>
<#if article.commentable>
<div class="right ft-gray">
${comment.commentDate?string("yy-MM-dd HH:mm")}
<span class="ico-reply ico right">
<a rel="nofollow" href="javascript:replyTo('${comment.oId}');">${replyLabel}</a>
</div>
</span>
</#if>
<span class="clear"></span>
<div class="article-body">${comment.commentContent}</div>
<p>${comment.commentContent}</p>
</div>
<span class="clear"></span>
</div>
</li>
</#list>
</div>
</ul>
<#if article.commentable>
<div class="form">
<table id="commentForm">
<tbody>
<tr>
<td colspan="2">
<input type="text" class="normalInput" id="commentName"/>
<label for="commentName">${commentNameLabel}</label>
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" class="normalInput" id="commentEmail"/>
<label for="commentEmail">${commentEmailLabel}</label>
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" id="commentURL"/>
<label for="commentURL">${commentURLLabel}</label>
</td>
</tr>
<tr>
<td id="emotions" colspan="2">
<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 colspan="2">
<textarea rows="10" cols="96" id="comment"></textarea>
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" class="normalInput" id="commentValidate"/>
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
</td>
</tr>
<tr>
<td>
<span class="ft-gray" id="commentErrorTip"></span>
</td>
<td align="right">
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
</div>
<h3>${commentLabel}</h3>
<table class="comment-form" id="commentForm">
<tbody>
<tr>
<td>
<input type="text" id="commentName"/>
<label for="commentName">${commentNameLabel} *</label>
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" id="commentEmail"/>
<label for="commentEmail">${commentEmailLabel} *</label>
</td>
</tr>
<tr>
<td>
<input type="text" id="commentURL"/>
<label for="commentURL">${commentURLLabel}</label>
</td>
</tr>
<tr>
<td id="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 style="width:96%" rows="10" id="comment"></textarea>
</td>
</tr>
<tr>
<td>
<input type="text" id="commentValidate"/>
<img id="captcha" alt="validate" src="${servePath}/captcha.do" />
</td>
</tr>
<tr>
<td>
<button id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
<span id="commentErrorTip"></span>
</td>
</tr>
</tbody>
</table>
<#if externalRelevantArticlesDisplayCount?? && 0 != externalRelevantArticlesDisplayCount>
<div id="externalRelevantArticles" class="article-relative"></div>
<div id="externalRelevantArticles"></div>
</#if>
<span class="clear"></span>
</#if>
</#macro>
......@@ -140,7 +134,7 @@
}
var replyTo = function (id) {
var commentFormHTML = "<table class='form' id='replyForm'>";
var commentFormHTML = "<table class='comment-form' id='replyForm'>";
page.addReplyForm(id, commentFormHTML);
$("#replyForm label").each(function () {
$this = $(this);
......@@ -150,9 +144,8 @@
$(document).ready(function () {
page.load();
ease.scrollToCmt();
// emotions
page.replaceCommentsEm("#comments .article-body");
page.replaceCommentsEm("#comments li > div > p");
<#nested>
});
</script>
......
......@@ -11,14 +11,16 @@
<body>
${topBarReplacement}
<#include "header.ftl">
<div class="main">
<div class="wrapper">
<div class="article-body article">
${page.pageContent}
<div class="wrapper">
<div class="container">
<div class="module">
<div>
${page.pageContent}
</div>
<@comments commentList=pageComments article=page></@comments>
</div>
<@comments commentList=pageComments article=page></@comments>
</div>
</div>
</div>
<#include "footer.ftl">
<@comment_script oId=page.oId></@comment_script>
</body>
......
......@@ -10,18 +10,12 @@
<body>
${topBarReplacement}
<#include "header.ftl">
<div class="main">
<div class="wrapper">
<h2>
<a rel="alternate" href="${servePath}/tag-articles-feed.do?oId=${tag.oId}">
${tag1Label}
${tag.tagTitle}
(${tag.tagPublishedRefCount})
</a>
</h2>
<#include "article-list.ftl">
</div>
</div>
<h2 class="nav-abs" onclick="window.location.href='${servePath}/tag-articles-feed.do?oId=${tag.oId}'">
${tag.tagTitle}
(${tag.tagPublishedRefCount})
<img src="${staticServePath}/images/feed.png" alt="Atom"/>
</h2>
<#include "article-list.ftl">
<#include "footer.ftl">
</body>
</html>
......@@ -10,9 +10,9 @@
<body>
${topBarReplacement}
<#include "header.ftl">
<div class="main">
<div class="wrapper">
<ul id="tags" class="other-main">
<div class="wrapper">
<div class="container">
<ul id="tags" class="module fn-clear">
<#list tags as tag>
<li>
<a rel="tag" data-count="${tag.tagPublishedRefCount}"
......@@ -23,7 +23,6 @@
</li>
</#list>
</ul>
<div class="clear"></div>
</div>
</div>
<#include "footer.ftl">
......
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