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