Commit 7640df1b authored by Van's avatar Van

article page

parent e9262b51
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</span> </span>
<span class="post-comments-count"> <span class="post-comments-count">
&nbsp; | &nbsp; &nbsp; | &nbsp;
<a href="${servePath}${article.articlePermalink}/#comments"> <a href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount}条评论</a> ${article.articleCommentCount}条评论</a>
</span> </span>
&nbsp; | &nbsp;热度 ${article.articleViewCount}°C &nbsp; | &nbsp;热度 ${article.articleViewCount}°C
......
...@@ -9,14 +9,17 @@ ...@@ -9,14 +9,17 @@
</@head> </@head>
</head> </head>
<body> <body>
<#include "side.ftl"> <div class="container one-column page-post-detail">
<main> <div class="headband"></div>
<article class="post article-body"> <#include "header.ftl">
<header> <main id="main" class="main">
<h2> <div class="main-inner">
<a rel="bookmark" href="${servePath}${article.articlePermalink}"> <div id="content" class="content">
<div id="posts" class="posts-expand">
<article class="post post-type-normal">
<header class="post-header">
<h1 class="post-title">
${article.articleTitle} ${article.articleTitle}
</a>
<#if article.articlePutTop> <#if article.articlePutTop>
<sup> <sup>
${topArticleLabel} ${topArticleLabel}
...@@ -27,62 +30,71 @@ ...@@ -27,62 +30,71 @@
${updatedLabel} ${updatedLabel}
</sup> </sup>
</#if> </#if>
</h2> </h1>
<time><span class="icon-date"></span> ${article.articleCreateDate?string("yyyy-MM-dd")}</time> <div class="post-meta">
<span class="post-time">
<section class="tags"> 发表于
<span class="icon-tag"></span> &nbsp; <time>
<#list article.articleTags?split(",") as articleTag> ${article.articleCreateDate?string("yyyy-MM-dd")}
<a class="tag" rel="tag" href="${servePath}/tags/${articleTag?url('UTF-8')}"> </time>
${articleTag}</a> </span>
</#list> <span class="post-comments-count">
&nbsp; | &nbsp;
<a rel="nofollow" href="${servePath}/authors/${article.authorId}"> <a href="${servePath}${article.articlePermalink}#comments">
<img class="avatar" title="${article.authorName}" alt="${article.authorName}" src="${article.authorThumbnailURL}"/> ${article.articleCommentCount}条评论</a>
</a> </span>
</section> &nbsp; | &nbsp;热度
${article.articleViewCount}°C
</div>
</header> </header>
<section class="abstract">
<div class="post-body">
${article.articleContent} ${article.articleContent}
<#if "" != article.articleSign.signHTML?trim> <#if "" != article.articleSign.signHTML?trim>
<div> <div>
${article.articleSign.signHTML} ${article.articleSign.signHTML}
</div> </div>
</#if> </#if>
</div>
<footer class="post-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">
<#if nextArticlePermalink?? || previousArticlePermalink??> <#if nextArticlePermalink?? || previousArticlePermalink??>
<aside class="fn-clear">
<#if previousArticlePermalink??> <#if previousArticlePermalink??>
<a class="fn-left" rel="prev" href="${servePath}${previousArticlePermalink}"> <div class="post-nav-next post-nav-item">
<strong>&lt;</strong> ${previousArticleTitle} <a href="${servePath}${previousArticlePermalink}" rel="next" title="${previousArticleTitle}">
<i class="fa fa-chevron-left"></i> ${previousArticleTitle}
</a> </a>
</div>
</#if> </#if>
<#if nextArticlePermalink??> <#if nextArticlePermalink??>
<a class="fn-right" rel="next" href="${servePath}${nextArticlePermalink}"> <div class="post-nav-prev post-nav-item">
${nextArticleTitle} <strong>&gt;</strong> <a href="${servePath}${nextArticlePermalink}" rel="prev" title="${nextArticleTitle}">
${nextArticleTitle} <i class="fa fa-chevron-right"></i>
</a> </a>
</div>
</#if> </#if>
</aside>
</#if> </#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> </div>
</footer> </footer>
</article> </article>
</div>
<@comments commentList=articleComments article=article></@comments> <@comments commentList=articleComments article=article></@comments>
</div>
</div>
<#include "side.ftl">
</main>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=article.oId> <@comment_script oId=article.oId>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
</@comment_script> </@comment_script>
</main> </div>
</body> </body>
</html> </html>
<footer id="footer" class="footer"> <footer id="footer" class="footer">
<div class="footer-inner"> <div class="footer-inner">
<div class="copyright"> <div class="copyright">
${viewCount1Label}${statistic.statisticBlogViewCount} <a href="${servePath}">${blogTitle}</a> •
&nbsp;
${articleCount1Label}${statistic.statisticPublishedBlogArticleCount}
&nbsp;
${commentCount1Label}${statistic.statisticPublishedBlogCommentCount}
&nbsp;
${onlineVisitor1Label}${onlineVisitorCnt} ${onlineVisitor1Label}${onlineVisitorCnt}
</div> </div>
<a href="${servePath}">${blogTitle}</a>
&copy; ${year} &copy; ${year}
${footerContent} ${footerContent}
<span class="fn-right">
Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a> • Powered by <a href="http://b3log.org" target="_blank">B3log 开源</a> •
<a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version} <a href="http://b3log.org/services/#solo" target="_blank">Solo</a> ${version}
</span>
</div> </div>
</footer> </footer>
<div class="back-to-top"></div> <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/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>
......
...@@ -41,6 +41,12 @@ ...@@ -41,6 +41,12 @@
${allTagsLabel} ${allTagsLabel}
</a> </a>
</li> </li>
<li class="menu-item menu-item-archives">
<a href="${servePath}/archives.html">
<i class="menu-item-icon fa fa-archive fa-fw"></i> <br>
${archiveLabel}
</a>
</li>
<li class="menu-item menu-item-archives"> <li class="menu-item menu-item-archives">
<a rel="alternate" href="${servePath}/blog-articles-rss.do" rel="section"> <a rel="alternate" href="${servePath}/blog-articles-rss.do" rel="section">
<i class="menu-item-icon fa fa-archive fa-fw"></i> <br> <i class="menu-item-icon fa fa-archive fa-fw"></i> <br>
......
...@@ -24,57 +24,28 @@ ...@@ -24,57 +24,28 @@
* @description next 皮肤脚本 * @description next 皮肤脚本
* @static * @static
*/ */
var Yilia = { $('.sidebar-toggle').click(function () {
/** var $sidebar = $('#sidebar');
* @description 页面初始化 if ($(this).hasClass('sidebar-active')) {
*/ $(this).removeClass('sidebar-active');
init: function () {
Util.killIE();
this.resetTags();
$(window).scroll(function () { $('body').animate({
if ($("article").length > 0 && $("article.post").length === 0) { 'padding-right': 0
$("article:not(.show)").each(function () {
if ($(this).offset().top <= $(window).scrollTop() + $(window).height() - $(this).height() / 7) {
$(this).addClass("show");
}
}); });
} $sidebar.animate({
width: 0
if ($(window).scrollTop() > $(window).height()) { }, function () {
$(".icon-goup").show(); $sidebar.hide();
} else {
$(".icon-goup").hide();
}
if ($("article.post").length === 1) {
$("article.post").addClass('show');
}
}); });
$(window).scroll(); } else {
}, $(this).addClass('sidebar-active');
resetTags: function () { $sidebar.show();
$("a.tag").each(function (i) { $('body').animate({
$(this).addClass("color" + Math.ceil(Math.random() * 4)); 'padding-right': 320
}); });
}, $sidebar.animate({
share: function () { width: 320
$(".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");
}); });
} }
}; });
\ No newline at end of file
Yilia.init();
\ No newline at end of file
...@@ -140,7 +140,6 @@ ...@@ -140,7 +140,6 @@
page.addReplyForm(id, commentFormHTML); page.addReplyForm(id, commentFormHTML);
}; };
(function () { (function () {
Yilia.share();
page.load(); page.load();
// emotions // emotions
page.replaceCommentsEm(".comments .comment-content"); page.replaceCommentsEm(".comments .comment-content");
......
...@@ -8,149 +8,90 @@ ...@@ -8,149 +8,90 @@
<aside id="sidebar" class="sidebar"> <aside id="sidebar" class="sidebar">
<div class="sidebar-inner"> <div class="sidebar-inner">
<section class="site-overview sidebar-panel sidebar-panel-active "> <section class="site-overview sidebar-panel sidebar-panel-active ">
<div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person"> <div class="site-author motion-element">
<img class="site-author-image skip" src="http://araome.yiluup.com/xiongmao.jpg" alt="ARao Lin" itemprop="image"> <img class="site-author-image skip" src="${adminUser.userAvatar}" title="${userName}"/>
<p class="site-author-name" itemprop="name">ARao Lin</p> <p class="site-author-name">${userName}</p>
</div> </div>
<p class="site-description motion-element" itemprop="description">我们的征途是星辰大海</p> <#if "" != noticeBoard>
<p class="site-description motion-element">${blogSubtitle}</p>
</#if>
<nav class="site-state motion-element"> <nav class="site-state motion-element">
<div class="site-state-item site-state-posts"> <div class="site-state-item site-state-posts">
<a href="/archives"> <a href="/archives">
<span class="site-state-item-count">8</span> <span class="site-state-item-count">${statistic.statisticPublishedBlogArticleCount}</span>
<span class="site-state-item-name">日志</span> <span class="site-state-item-name">日志</span>
</a> </a>
</div> </div>
<div class="site-state-item site-state-categories"> <div class="site-state-item site-state-categories">
<span class="site-state-item-count">${statistic.statisticBlogViewCount}</span>
<span class="site-state-item-count">0</span> <span class="site-state-item-name">浏览</span>
<span class="site-state-item-name">分类</span>
</div> </div>
<div class="site-state-item site-state-tags"> <div class="site-state-item site-state-tags">
<a href="/tags"> <a href="/tags">
<span class="site-state-item-count">18</span> <span class="site-state-item-count">${statistic.statisticPublishedBlogCommentCount}</span>
<span class="site-state-item-name">标签</span> <span class="site-state-item-name">评论</span>
</a> </a>
</div> </div>
</nav> </nav>
<div class="feed-link motion-element"> <div class="feed-link motion-element">
<a href="/atom.xml" rel="alternate"> <a href="${servePath}/blog-articles-rss.do" rel="alternate">
<i class="fa fa-rss"></i> <i class="fa fa-rss"></i>
RSS RSS
</a> </a>
</div> </div>
<div class="links-of-author motion-element"> <div class="links-of-author motion-element">
<#if isLoggedIn>
<span class="links-of-author-item"> <span class="links-of-author-item">
<a href="https://github.com/araolin" target="_blank" rel="external nofollow"> <a href="${servePath}/admin-index.do#main" title="${adminLabel}">
<i class="fa fa-github"></i> ${adminLabel}
<i class="fa fa-github"></i> GitHub
</a> </a>
</span> </span>
<span class="links-of-author-item"> <span class="links-of-author-item">
<a href="http://weibo.com/208139345" target="_blank" rel="external nofollow"> <a href="${logoutURL}">
<i class="fa fa-weibo"></i> ${logoutLabel}
<i class="fa fa-weibo"></i> Weibo </a>
</span>
<#else>
<span class="links-of-author-item">
<a href="${loginURL}">
<i class="fa fa-github"></i> ${loginLabel}
</a> </a>
</span> </span>
<span class="links-of-author-item">
</div> <a href="${servePath}/register">
<i class="fa fa-weibo"></i> ${registerLabel}
<div class="cc-license motion-element" itemprop="license">
<a href="http://creativecommons.org/licenses/by-nc-sa/4.0" class="cc-opacity" target="_blank" rel="external nofollow">
<img class="skip" src="/images/cc-by-nc-sa.svg" alt="Creative Commons">
</a> </a>
</span>
</#if>
</div> </div>
<#if noticeBoard??>
<div class="links-of-author motion-element"> <div class="links-of-author motion-element">
${noticeBoard}
</div>
</#if>
<#if 0 != links?size>
<div class="links-of-author motion-element">
<p class="site-author-name">Links</p> <p class="site-author-name">Links</p>
<#list links as link>
<span class="links-of-author-item"> <span class="links-of-author-item">
<a href="https://shop152714861.taobao.com" target="_blank">我的男装店</a> <a rel="friend" href="${link.linkAddress}"
title="${link.linkDescription}" target="_blank">
${link.linkTitle}
</a>
</span> </span>
</#list>
</div> </div>
</#if>
</section> </section>
</div> </div>
</aside> </aside>
\ No newline at end of file
<div class="side">
<div class="overlay"></div>
<header class="content">
<a href="${servePath}">
<img class="avatar" src="${adminUser.userAvatar}" title="${userName}"/>
</a>
<hgroup>
<h1>
<a href="${servePath}">${blogTitle}</a>
</h1>
</hgroup>
<#if "" != noticeBoard>
<p class="subtitle">
${blogSubtitle}
</p>
</#if>
<nav>
<ul>
<#list pageNavigations as page>
<li>
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}">${page.pageTitle}</a>
</li>
</#list>
<li>
<a href="${servePath}/dynamic.html">${dynamicLabel}</a>
</li>
<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>
</ul>
</nav>
<footer>
<#if noticeBoard??>
<div>${noticeBoard}</div>
</#if>
<#if isLoggedIn>
<a href="${servePath}/admin-index.do#main" title="${adminLabel}" class="icon-setting"></a>
&nbsp; &nbsp;
<a title="${logoutLabel}" class="icon-logout" href="${logoutURL}"></a>
<#else>
<a title="${loginLabel}" href="${loginURL}" class="icon-login"></a>
&nbsp; &nbsp;
<a href="${servePath}/register" title="${registerLabel}" class="icon-register"></a>
</#if> &nbsp; &nbsp;
<a rel="alternate" href="${servePath}/blog-articles-rss.do" title="${subscribeLabel}" class="icon-rss"></a>
</footer>
</header>
</div>
\ No newline at end of file
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