This commit is contained in:
Van 2019-03-20 13:49:45 +08:00
parent 1605dceed8
commit 4d04c02872
No known key found for this signature in database
GPG Key ID: 7059B8783A78F16C
23 changed files with 631 additions and 751 deletions

View File

@ -17,13 +17,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<#include "macro-head.ftl"> <#include "../../common-template/macro-common_head.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${archiveDate.archiveDateMonth} ${archiveDate.archiveDateYear} (${archiveDate.archiveDatePublishedArticleCount}) - ${blogTitle}"> <@head title="${archiveDate.archiveDateYear} ${yearLabel} ${archiveDate.archiveDateMonth} ${monthLabel} ${archiveLabel} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${archiveDate.archiveDateYear}${archiveDate.archiveDateMonth}"/> <link rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}"/>
<meta name="description" content="<#list articles as article>${article.articleTitle}<#if article_has_next>,</#if></#list>"/>
</@head> </@head>
</head> </head>
<body> <body>

View File

@ -17,13 +17,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<#include "macro-head.ftl"> <#include "../../common-template/macro-common_head.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${archiveLabel} - ${blogTitle}"> <@head title="${archiveLabel} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${archiveLabel}"/> <link rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}"/>
<meta name="description" content="${metaDescription},${archiveLabel}"/>
</@head> </@head>
</head> </head>
<body> <body>

View File

@ -38,20 +38,20 @@
</h1> </h1>
<div class="meta"> <div class="meta">
<span class="tooltipped tooltipped-n" aria-label="${createDateLabel}"> <span class="vditor-tooltipped vditor-tooltipped__n" aria-label="${createDateLabel}">
<i class="icon-date"></i> <i class="icon-date"></i>
<time> <time>
${article.articleCreateDate?string("yyyy-MM-dd")} ${article.articleCreateDate?string("yyyy-MM-dd")}
</time> </time>
</span> </span>
&nbsp; | &nbsp; &nbsp; | &nbsp;
<span class="tooltipped tooltipped-n" aria-label="${commentCountLabel}"> <span class="vditor-tooltipped vditor-tooltipped__n" aria-label="${commentCountLabel}">
<i class="icon-comments"></i> <i class="icon-comments"></i>
<a href="${servePath}${article.articlePermalink}#comments"> <a href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount} ${commentLabel}</a> ${article.articleCommentCount} ${commentLabel}</a>
</span> </span>
&nbsp; | &nbsp; &nbsp; | &nbsp;
<span class="tooltipped tooltipped-n" aria-label="${viewCountLabel}"> <span class="vditor-tooltipped vditor-tooltipped__n" aria-label="${viewCountLabel}">
<i class="icon-views"></i> <i class="icon-views"></i>
${article.articleViewCount} ${viewLabel} ${article.articleViewCount} ${viewLabel}
</span> </span>

View File

@ -17,42 +17,26 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<#include "macro-head.ftl"> <#include "../../common-template/macro-common_head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl"> <#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${article.articleTitle} - ${blogTitle}"> <@head title="${article.articleTitle} - ${blogTitle}" description="${article.articleAbstract?html}">
<meta name="keywords" content="${article.articleTags}" /> <link rel="stylesheet"
<meta name="description" content="${article.articleAbstract?html}" /> href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}"/>
</@head>
<#if previousArticlePermalink??> <#if previousArticlePermalink??>
<link rel="prev" title="${previousArticleTitle}" href="${servePath}${previousArticlePermalink}"> <link rel="prev" title="${previousArticleTitle}" href="${servePath}${previousArticlePermalink}">
</#if> </#if>
<#if nextArticlePermalink??> <#if nextArticlePermalink??>
<link rel="next" title="${nextArticleTitle}" href="${servePath}${nextArticlePermalink}"> <link rel="next" title="${nextArticleTitle}" href="${servePath}${nextArticlePermalink}">
</#if> </#if>
<!-- Open Graph --> </@head>
<meta property="og:locale" content="zh_CN"/> </head>
<meta property="og:type" content="article"/> <body>
<meta property="og:title" content="${article.articleTitle}"/>
<meta property="og:description" content="${article.articleAbstract?html}"/>
<meta property="og:image" content="${article.authorThumbnailURL}"/>
<meta property="og:url" content="${servePath}${article.articlePermalink}"/>
<meta property="og:site_name" content="Solo"/>
<!-- Twitter Card -->
<meta name="twitter:card" content="summary"/>
<meta name="twitter:description" content="${article.articleAbstract?html}"/>
<meta name="twitter:title" content="${article.articleTitle}"/>
<meta name="twitter:image" content="${article.authorThumbnailURL}"/>
<meta name="twitter:url" content="${servePath}${article.articlePermalink}"/>
<meta name="twitter:site" content="@DL88250"/>
<meta name="twitter:creator" content="@DL88250"/>
</head>
<body>
<#include "header.ftl"> <#include "header.ftl">
<div class="wrapper"> <div class="wrapper">
<div class="main-wrap"> <div class="main-wrap">
<main> <main>
<article class="post"> <article class="post">
@ -73,20 +57,20 @@
</#if> </#if>
</h1> </h1>
<div class="meta"> <div class="meta">
<span class="tooltipped tooltipped-n" aria-label="${createDateLabel}"> <span class="vditor-tooltipped vditor-tooltipped__n" aria-label="${createDateLabel}">
<i class="icon-date"></i> <i class="icon-date"></i>
<time> <time>
${article.articleCreateDate?string("yyyy-MM-dd")} ${article.articleCreateDate?string("yyyy-MM-dd")}
</time> </time>
</span> </span>
&nbsp; | &nbsp; &nbsp; | &nbsp;
<span class="tooltipped tooltipped-n" aria-label="${commentCountLabel}"> <span class="vditor-tooltipped vditor-tooltipped__n" aria-label="${commentCountLabel}">
<i class="icon-comments"></i> <i class="icon-comments"></i>
<a href="${servePath}${article.articlePermalink}#comments"> <a href="${servePath}${article.articlePermalink}#comments">
${article.articleCommentCount} ${commentLabel}</a> ${article.articleCommentCount} ${commentLabel}</a>
</span> </span>
&nbsp; | &nbsp; &nbsp; | &nbsp;
<span class="tooltipped tooltipped-n" aria-label="${viewCountLabel}"> <span class="vditor-tooltipped vditor-tooltipped__n" aria-label="${viewCountLabel}">
<i class="icon-views"></i> <i class="icon-views"></i>
${article.articleViewCount} ${viewLabel} ${article.articleViewCount} ${viewLabel}
</span> </span>
@ -121,14 +105,14 @@
<div class="rel fn-clear"> <div class="rel fn-clear">
<#if previousArticlePermalink??> <#if previousArticlePermalink??>
<a href="${servePath}${previousArticlePermalink}" rel="prev" <a href="${servePath}${previousArticlePermalink}" rel="prev"
class="fn-left tooltipped tooltipped-n" class="fn-left vditor-tooltipped vditor-tooltipped__n"
aria-label="${previousArticleTitle}"> aria-label="${previousArticleTitle}">
${previousArticleLabel} ${previousArticleLabel}
</a> </a>
</#if> </#if>
<#if nextArticlePermalink??> <#if nextArticlePermalink??>
<a href="${servePath}${nextArticlePermalink}" rel="next" <a href="${servePath}${nextArticlePermalink}" rel="next"
class="fn-right tooltipped tooltipped-n" class="fn-right vditor-tooltipped vditor-tooltipped__n"
aria-label="${nextArticleTitle}"> aria-label="${nextArticleTitle}">
${nextArticleLabel} ${nextArticleLabel}
</a> </a>
@ -144,7 +128,7 @@
</main> </main>
<#include "side.ftl"> <#include "side.ftl">
</div> </div>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<@comment_script oId=article.oId commentable=article.commentable> <@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}"; page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
@ -158,7 +142,7 @@
<#if 0 != relevantArticlesDisplayCount> <#if 0 != relevantArticlesDisplayCount>
page.loadRelevantArticles('${article.oId}', '<h4>${relevantArticlesLabel}</h4>'); page.loadRelevantArticles('${article.oId}', '<h4>${relevantArticlesLabel}</h4>');
</#if> </#if>
Skin.initArticle('${tocLabel}', '${siteViewLabel}') Skin.initToc()
</@comment_script> </@comment_script>
</body> </body>
</html> </html>

View File

@ -17,13 +17,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<#include "macro-head.ftl"> <#include "../../common-template/macro-common_head.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${category.categoryTitle} - ${blogTitle}"> <@head title="${category.categoryTitle} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${category.categoryTitle}"/> <link rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}"/>
<meta name="description" content="<#list articles as article>${article.articleTitle}<#if article_has_next>,</#if></#list>"/>
</@head> </@head>
</head> </head>
<body> <body>

View File

@ -19,7 +19,7 @@
--> -->
<li id="${comment.oId}"> <li id="${comment.oId}">
<div> <div>
<div class="avatar tooltipped tooltipped-n" aria-label="${comment.commentName}" <div class="avatar vditor-tooltipped vditor-tooltipped__n" aria-label="${comment.commentName}"
style="background-image: url(${comment.commentThumbnailURL})"></div> style="background-image: url(${comment.commentThumbnailURL})"></div>
<main> <main>
<div class="fn-clear"> <div class="fn-clear">

File diff suppressed because one or more lines are too long

View File

@ -19,50 +19,64 @@
* skin style * skin style
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.0.0.1, Mar 16, 2019 * @version 1.1.0.0, Mar 20, 2019
*/ */
/* start common */ /* start common */
@import "../../../scss/reset"; @import "../../../scss/reset";
@import "../../../scss/tooltipped"; @import "../../../scss/function";
@import "../../../scss/toc";
@import "../../../scss/usite";
@import "vditor/src/assets/scss/classic"; @import "vditor/src/assets/scss/classic";
a { a {
outline: 0; outline: 0;
text-decoration: none; text-decoration: none;
color: #383838; color: #383838;
} }
a:hover { a:hover {
color: #ff4d3a; color: #ff4d3a;
text-decoration: underline; text-decoration: underline;
} }
.vditor-reset a { .vditor-reset a {
color: #ff4d3a; color: #ff4d3a;
} }
.fn-pointer { .fn-pointer {
cursor: pointer cursor: pointer
} }
.fn-inline { .fn-inline {
display: inline; display: inline;
} }
.fn-clear:before, .fn-clear:before,
.fn-clear:after { .fn-clear:after {
display: table; display: table;
content: "" content: ""
} }
.fn-clear:after { .fn-clear:after {
clear: both clear: both
} }
.fn-left { .fn-left {
float: left float: left
} }
.fn-right { .fn-right {
float: right float: right
} }
.fn-none { .fn-none {
display: none display: none
} }
.fn-hidden { .fn-hidden {
visibility: hidden visibility: hidden
} }
.fn-ellipsis { .fn-ellipsis {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -74,6 +88,7 @@ a[class^="icon-"],
a[class*=" icon-"] { a[class*=" icon-"] {
color: #333 color: #333
} }
a[class^="icon-"]:hover, a[class^="icon-"]:hover,
a[class*=" icon-"]:hover { a[class*=" icon-"]:hover {
text-decoration: none; text-decoration: none;
@ -96,6 +111,7 @@ a[class*=" icon-"]:hover {
right: 0; right: 0;
border: 1px solid #eee; border: 1px solid #eee;
} }
/* end common */ /* end common */
/* start reset common */ /* start reset common */
@ -128,51 +144,67 @@ a[class*=" icon-"]:hover {
.icon-list:before { .icon-list:before {
content: "\f0ca"; content: "\f0ca";
} }
.icon-home:before { .icon-home:before {
content: "\f015"; content: "\f015";
} }
.icon-comments:before { .icon-comments:before {
content: "\f0e6"; content: "\f0e6";
} }
.icon-date:before { .icon-date:before {
content: "\f073"; content: "\f073";
} }
.icon-search:before { .icon-search:before {
content: "\f002"; content: "\f002";
} }
.icon-up:before { .icon-up:before {
content: "\f077"; content: "\f077";
} }
.icon-inbox:before { .icon-inbox:before {
content: "\f01c"; content: "\f01c";
} }
.icon-tags:before { .icon-tags:before {
content: "\f02c"; content: "\f02c";
} }
.icon-link:before { .icon-link:before {
content: "\f0c1"; content: "\f0c1";
} }
.icon-refresh:before { .icon-refresh:before {
content: "\f021"; content: "\f021";
} }
.icon-category:before { .icon-category:before {
content: "\e9bc"; content: "\e9bc";
} }
.icon-logout:before { .icon-logout:before {
content: "\ea14"; content: "\ea14";
} }
.icon-views:before { .icon-views:before {
content: "\e900"; content: "\e900";
} }
.icon-register:before { .icon-register:before {
content: "\e973"; content: "\e973";
} }
.icon-setting:before { .icon-setting:before {
content: "\e994"; content: "\e994";
} }
.icon-login:before { .icon-login:before {
content: "\ea13"; content: "\ea13";
} }
.icon-rss:before { .icon-rss:before {
content: "\e901"; content: "\e901";
} }
@ -202,7 +234,7 @@ a {
display: inline-block; display: inline-block;
padding: 0 10px; padding: 0 10px;
border: 1px solid #ddd; border: 1px solid #ddd;
border-left:0; border-left: 0;
text-decoration: none; text-decoration: none;
float: left; float: left;
} }
@ -220,7 +252,7 @@ a {
} }
.module { .module {
box-shadow: .0 1px 1px rgba(0,0,0,0.05); box-shadow: .0 1px 1px rgba(0, 0, 0, 0.05);
margin-bottom: 20px; margin-bottom: 20px;
} }
@ -307,6 +339,7 @@ a {
.form button:hover { .form button:hover {
background-color: #e42f19; background-color: #e42f19;
} }
/* end reset common */ /* end reset common */
/* start framework */ /* start framework */
@ -320,6 +353,35 @@ a {
aside { aside {
width: 28%; width: 28%;
min-width: 236px; min-width: 236px;
.tag.vditor-tooltipped {
display: inline-block;
padding: 2px 5px;
margin-bottom: 10px;
border: 1px solid #e1e1e1;
text-decoration: none;
margin-right: 10px;
line-height: 22px;
}
.ad {
background-color: #3cbc8d;
color: #fff;
padding: 20px;
margin-bottom: 20px;
border: 1px solid transparent;
box-sizing: border-box;
}
.meta main {
text-align: right;
line-height: 20px;
}
.meta img {
float: left;
height: 80px;
width: 80px;
border-radius: 5px;
}
} }
.main-wrap { .main-wrap {
@ -331,6 +393,7 @@ aside {
flex: 1; flex: 1;
min-width: 1px; min-width: 1px;
} }
/* end framework */ /* end framework */
/* start header */ /* start header */
@ -422,6 +485,7 @@ aside {
width: 14px; width: 14px;
margin: 18px 5px 0 0; margin: 18px 5px 0 0;
} }
/* end header */ /* end header */
/* start footer */ /* start footer */
@ -457,70 +521,9 @@ aside {
.icon-up:hover { .icon-up:hover {
background-color: #ff4d3a; background-color: #ff4d3a;
} }
/* end footer */ /* end footer */
/* start side */
aside .ad {
background-color: #3cbc8d;
border-color: #36a96b;
color: #fff;
padding: 20px;
margin-bottom: 20px;
border: 1px solid transparent;
box-sizing: border-box;
}
aside .meta main {
text-align: right;
line-height: 20px;
}
aside .meta img {
float: left;
height: 80px;
width: 80px;
border-radius: 5px;
}
aside .tag.tooltipped {
display: inline-block;
padding: 2px 5px;
margin-bottom: 10px;
border: 1px solid #e1e1e1;
text-decoration: none;
margin-right: 10px;
line-height: 22px;
}
aside.has-toc > ul > li {
list-style: none;
float: left;
width: 50%;
margin: 0;
cursor: pointer;
line-height: 18px;
font-size: 16px;
text-align: center;
font-weight: 400;
}
aside.has-toc ul > li.current {
color: #ff4d3a;
}
aside .b3-solo-list {
font-size: 14px;
}
aside.has-toc > section:last-child {
margin-top: 20px;
}
.article__toc {
display: none;
}
/* end side */
/* start article list */ /* start article list */
.post { .post {
border: 1px solid #ededed; border: 1px solid #ededed;
@ -569,9 +572,11 @@ aside.has-toc > section:last-child {
text-decoration: none; text-decoration: none;
margin-top: 10px; margin-top: 10px;
} }
.tags > a.tag:before { .tags > a.tag:before {
content: "#"; content: "#";
} }
.tags > a.tag:hover { .tags > a.tag:hover {
background: #999; background: #999;
} }
@ -610,6 +615,15 @@ aside.has-toc > section:last-child {
.title > h2.tip { .title > h2.tip {
border-bottom: 0 border-bottom: 0
} }
.article__toc {
top: 81px;
bottom: 132px;
.toc--current a {
color: #ff4d3a
}
}
/* end article list */ /* end article list */
/* start comments */ /* start comments */
@ -669,6 +683,7 @@ aside.has-toc > section:last-child {
.form .captcha { .form .captcha {
height: 28px; height: 28px;
} }
/* end comments */ /* end comments */
/* start other */ /* start other */
@ -677,6 +692,7 @@ aside.has-toc > section:last-child {
margin-bottom: 20px; margin-bottom: 20px;
padding: 0 20px 20px; padding: 0 20px 20px;
} }
/* end other */ /* end other */
/* start responsive */ /* start responsive */
@ -685,6 +701,7 @@ aside.has-toc > section:last-child {
display: none; display: none;
} }
} }
@media (max-width: 700px) { @media (max-width: 700px) {
.page-icon { .page-icon {
margin: 13px 3px 0 0; margin: 13px 3px 0 0;
@ -746,4 +763,5 @@ aside.has-toc > section:last-child {
background-color: #eee; background-color: #eee;
} }
} }
/* end responsive */ /* end responsive */

View File

@ -17,13 +17,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<#include "macro-head.ftl"> <#include "../../common-template/macro-common_head.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${blogTitle}"> <@head title="${dynamicLabel} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${dynamicLabel}"/> <link rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}"/>
<meta name="description" content="${metaDescription},${dynamicLabel}"/>
</@head> </@head>
</head> </head>
<body> <body>
@ -36,7 +35,7 @@
<#list recentComments as comment> <#list recentComments as comment>
<li id="${comment.oId}"> <li id="${comment.oId}">
<div> <div>
<div class="avatar tooltipped tooltipped-n" aria-label="${comment.commentName}" <div class="avatar vditor-tooltipped vditor-tooltipped__n" aria-label="${comment.commentName}"
style="background-image: url(${comment.commentThumbnailURL})"></div> style="background-image: url(${comment.commentThumbnailURL})"></div>
<main> <main>
<div class="fn-clear"> <div class="fn-clear">

View File

@ -30,9 +30,8 @@
by <a href="http://vanessa.b3log.org" target="_blank">Vanessa</a> by <a href="http://vanessa.b3log.org" target="_blank">Vanessa</a>
</footer> </footer>
<div class="icon-up" onclick="Util.goTop()"></div> <div class="icon-up" onclick="Util.goTop()"></div>
<script src="${staticServePath}/js/lib/compress/pjax.min.js"></script>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script> <script src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <script src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}"></script>
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> <#include "../../common-template/label.ftl">
<#include "../../common-template/skin-script.ftl">
${plugins} ${plugins}

View File

@ -28,15 +28,15 @@
<small> &nbsp; ${blogSubtitle}</small> <small> &nbsp; ${blogSubtitle}</small>
<div class="fn-right"> <div class="fn-right">
<#if isLoggedIn> <#if isLoggedIn>
<a href="${servePath}/admin-index.do#main" title="${adminLabel}"> <a class="fn__flex-inline" href="${servePath}/admin-index.do#main" title="${adminLabel}">
<i class="icon-setting"></i> ${adminLabel} <i class="icon-setting"></i>&nbsp;${adminLabel}
</a> </a>
<a href="${logoutURL}"> <a class="fn__flex-inline" href="${logoutURL}">
<i class="icon-logout"></i> ${logoutLabel} <i class="icon-logout"></i>&nbsp;${logoutLabel}
</a> </a>
<#else> <#else>
<a href="${servePath}/start"> <a class="fn__flex-inline" href="${servePath}/start">
<i class="icon-login"></i> ${startToUseLabel} <i class="icon-login"></i>&nbsp;${startToUseLabel}
</a> </a>
</#if> </#if>
</div> </div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

View File

@ -17,17 +17,13 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<#include "macro-head.ftl"> <#include "../../common-template/macro-common_head.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${blogTitle}"> <@head title="${blogTitle}">
<#if metaKeywords??> <link rel="stylesheet"
<meta name="keywords" content="${metaKeywords}"/> href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}"/>
</#if>
<#if metaDescription??>
<meta name="description" content="${metaDescription}"/>
</#if>
</@head> </@head>
</head> </head>
<body> <body>

View File

@ -44,12 +44,16 @@ var Skin = {
if ($(window).scrollTop() > $banner.height()) { if ($(window).scrollTop() > $banner.height()) {
$navbar.addClass('pin') $navbar.addClass('pin')
$('.main-wrap').parent().css('margin-top', '86px') $('.main-wrap').parent().css('margin-top', '81px')
$('.article__toc').css('position', 'fixed')
} else { } else {
$navbar.removeClass('pin') $navbar.removeClass('pin')
$('.main-wrap').parent().css('margin-top', '0') $('.main-wrap').parent().css('margin-top', '0')
$('.article__toc').css('position', 'inherit')
} }
}) })
$(window).scroll()
}, },
init: function () { init: function () {
this._initCommon($('.icon-up')) this._initCommon($('.icon-up'))
@ -70,63 +74,27 @@ var Skin = {
$('.responsive .list').slideToggle() $('.responsive .list').slideToggle()
}) })
}, },
_initArticleCommon: function (tocLabel, siteViewLabel) { initToc: function () {
// TOC var $articleToc = $('.article__toc')
if ($('.article__toc').length > 0 && $(window).width() > 1000) { if ($articleToc.length === 0) {
$('.article__toc, .article__toc > ul').show() return false
}
var $sectionF = $('aside section:first').html($('.b3-solo-list')), $articleToc.css({
$sectionL = $('aside section:last') width: $articleToc.parent().width(),
$sectionF.height($(window).height() - 154). left: $articleToc.parent().offset().left,
css({'overflow': 'auto', 'width': $('aside').width() + 'px'}) }).find('a').click(function () {
$sectionL.hide() $articleToc.find('li').removeClass('toc--current')
// 切换 tab $(this).parent().addClass('toc--current')
$('aside > ul > li').click(function () { var id = $(this).attr('href')
if ($(this).data('tab') === 'toc') { setTimeout(function () {
$sectionL.animate({ $(window).scrollTop($(id).offset().top - 60)
'opacity': '0',
'top': '-50px',
}, 300, function () {
$sectionF.show().css('top', '-50px')
$sectionF.animate({
'opacity': '1',
'top': '0',
}, 300).show()
}) })
} else {
$sectionF.animate({
'opacity': '0',
'top': '-50px',
}, 300, function () {
$sectionF.hide().css('top', '-50px')
$sectionL.animate({
'opacity': '1',
'top': '0',
}, 300).show()
}).hide()
}
$('aside > ul > li').removeClass('current')
$(this).addClass('current')
}) })
$(window).scroll(function () {
if ($(window).scrollTop() > 125) {
$('aside section:eq(0)').css({
position: 'fixed',
top: '51px',
backgroundColor: '#fff',
})
} else {
$('aside section:eq(0)').css({
position: 'inherit',
borderLeft: 0,
})
}
})
}
},
initArticle: function (tocLabel, siteViewLabel) {
this._initArticleCommon(tocLabel, siteViewLabel)
}, },
} }
Skin.init()
$(document).ready(function () {
Util.init()
Skin.init()
})

View File

@ -1 +1 @@
var Skin={_initCommon:function(i){var t=$("header .banner"),n=$("header .navbar");$(window).scroll(function(){if(125<$(window).scrollTop()?i.show():i.hide(),$(window).width()<701)return!1;$(window).scrollTop()>t.height()?(n.addClass("pin"),$(".main-wrap").parent().css("margin-top","86px")):(n.removeClass("pin"),$(".main-wrap").parent().css("margin-top","0"))})},init:function(){this._initCommon($(".icon-up")),$(".navbar nav a").each(function(){this.href===location.href&&(this.className="current")}),$(".responsive .list a").each(function(){this.href===location.href&&$(this).parent().addClass("current")}),$(".responsive .icon-list").click(function(){$(".responsive .list").slideToggle()})},_initArticleCommon:function(i,t){if(0<$(".b3-solo-list li").length&&1e3<$(window).width()){$("aside").addClass("has-toc");var n='<ul class="fn-clear"><li class="current" data-tab="toc">'+i+'</li><li data-tab="site">'+t+"</li></ul><section></section>";$("aside").prepend(n);var o=$("aside section:first").html($(".b3-solo-list")),s=$("aside section:last");o.height($(window).height()-154).css({overflow:"auto",width:$("aside").width()+"px"}),s.hide(),$("aside > ul > li").click(function(){"toc"===$(this).data("tab")?s.animate({opacity:"0",top:"-50px"},300,function(){o.show().css("top","-50px"),o.animate({opacity:"1",top:"0"},300).show()}):o.animate({opacity:"0",top:"-50px"},300,function(){o.hide().css("top","-50px"),s.animate({opacity:"1",top:"0"},300).show()}).hide(),$("aside > ul > li").removeClass("current"),$(this).addClass("current")}),$(window).scroll(function(){125<$(window).scrollTop()?$("aside section:eq(0)").css({position:"fixed",top:"51px",backgroundColor:"#fff"}):$("aside section:eq(0)").css({position:"inherit",borderLeft:0})})}},initArticle:function(i,t){this._initArticleCommon(i,t)}};Skin.init(); var Skin={_initCommon:function(i){var n=$("header .banner"),t=$("header .navbar");$(window).scroll(function(){if(125<$(window).scrollTop()?i.show():i.hide(),$(window).width()<701)return!1;$(window).scrollTop()>n.height()?(t.addClass("pin"),$(".main-wrap").parent().css("margin-top","81px"),$(".article__toc").css("position","fixed")):(t.removeClass("pin"),$(".main-wrap").parent().css("margin-top","0"),$(".article__toc").css("position","inherit"))}),$(window).scroll()},init:function(){this._initCommon($(".icon-up")),$(".navbar nav a").each(function(){this.href===location.href&&(this.className="current")}),$(".responsive .list a").each(function(){this.href===location.href&&$(this).parent().addClass("current")}),$(".responsive .icon-list").click(function(){$(".responsive .list").slideToggle()})},initToc:function(){var n=$(".article__toc");if(0===n.length)return!1;n.css({width:n.parent().width(),position:"fixed",left:n.parent().offset().left}).find("a").click(function(){n.find("li").removeClass("toc--current"),$(this).parent().addClass("toc--current");var i=$(this).attr("href");setTimeout(function(){$(window).scrollTop($(i).offset().top-60)})})}};$(document).ready(function(){Util.init(),Skin.init()});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -17,13 +17,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<#include "macro-head.ftl"> <#include "../../common-template/macro-common_head.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${linkLabel} - ${blogTitle}"> <@head title="${linkLabel} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${linkLabel}"/> <link rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}"/>
<meta name="description" content="${metaDescription},${linkLabel}"/>
</@head> </@head>
</head> </head>
<body> <body>

View File

@ -1,37 +0,0 @@
<#--
Solo - A small and beautiful blogging system written in Java.
Copyright (c) 2010-2019, b3log.org & hacpai.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<#macro head title>
<meta charset="utf-8" />
<title>${title}</title>
<#nested>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="author" content="${blogTitle?html}" />
<meta name="generator" content="Solo" />
<meta name="owner" content="B3log Team" />
<meta name="revised" content="${blogTitle?html}, ${year}" />
<meta name="copyright" content="B3log" />
<meta http-equiv="Window-target" content="_top" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}" charset="utf-8" />
<link href="${servePath}/rss.xml" title="RSS" type="application/rss+xml" rel="alternate" />
<link rel="icon" type="image/png" href="${faviconURL}" />
<link rel="manifest" href="${servePath}/manifest.json">
<link rel="search" type="application/opensearchdescription+xml" title="${title}" href="/opensearch.xml">
${htmlHead}
</#macro>

View File

@ -17,15 +17,14 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<#include "macro-head.ftl"> <#include "../../common-template/macro-common_head.ftl">
<#include "macro-comments.ftl"> <#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl"> <#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${page.pageTitle} - ${blogTitle}"> <@head title="${page.pageTitle} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${page.pageTitle}" /> <link rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}"/>
<meta name="description" content="${metaDescription}" />
</@head> </@head>
</head> </head>
<body> <body>

View File

@ -17,26 +17,11 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<aside<#if article?? && article.articleToC?size &gt; 0 > class="has-toc"</#if>> <#include "../../common-template/macro-user_site.ftl">
<ul class="fn__clear fn__none"> <aside>
<li class="current" data-tab="toc"> <#if article?? && article.articleToC?? && article.articleToC?size &gt; 0>
${tocLabel} <#include "../../common-template/toc.ftl"/>
</li> <#else>
<li data-tab="site">
${siteViewLabel}
</li>
</ul>
<section>
<#if article??>
<ul class="article__toc">
<#list article.articleToC as item>
<li>
<a class="${item.className}" href="#${item.id}">${item.text}</a>
</li>
</#list>
</ul>
</#if>
</section>
<section> <section>
<#if noticeBoard??> <#if noticeBoard??>
<div class="ad vditor-reset"> <div class="ad vditor-reset">
@ -51,7 +36,7 @@
<#list mostUsedCategories as category> <#list mostUsedCategories as category>
<a href="${servePath}/category/${category.categoryURI}" <a href="${servePath}/category/${category.categoryURI}"
aria-label="${category.categoryTagCnt} ${cntLabel}${tagsLabel}" aria-label="${category.categoryTagCnt} ${cntLabel}${tagsLabel}"
class="tag tooltipped tooltipped-n"> class="tag vditor-tooltipped vditor-tooltipped__n">
${category.categoryTitle}</a> ${category.categoryTitle}</a>
</#list> </#list>
</main> </main>
@ -65,7 +50,7 @@
<#list mostUsedTags as tag> <#list mostUsedTags as tag>
<a rel="tag" <a rel="tag"
href="${servePath}/tags/${tag.tagTitle?url('UTF-8')}" href="${servePath}/tags/${tag.tagTitle?url('UTF-8')}"
class="tag tooltipped tooltipped-n" class="tag vditor-tooltipped vditor-tooltipped__n"
aria-label="${tag.tagPublishedRefCount} ${countLabel}${articleLabel}"> aria-label="${tag.tagPublishedRefCount} ${countLabel}${articleLabel}">
${tag.tagTitle}</a> ${tag.tagTitle}</a>
</#list> </#list>
@ -75,9 +60,14 @@
<div class="module meta"> <div class="module meta">
<header> <header>
<h2>${adminUser.userName}</h2> <h2 class="fn__clear">
${adminUser.userName}
<div class="fn__right">
<@userSite dir="nw"></@userSite>
</div>
</h2>
</header> </header>
<main class="fn-clear"> <main class="fn__clear">
<img src="${adminUser.userAvatar}" aria-label="${adminUser.userName}"/> <img src="${adminUser.userAvatar}" aria-label="${adminUser.userName}"/>
<div class="fn-right"> <div class="fn-right">
<a href="${servePath}/archives.html"> <a href="${servePath}/archives.html">
@ -100,7 +90,7 @@
<#list mostCommentArticles as article> <#list mostCommentArticles as article>
<li> <li>
<a rel="nofollow" aria-label="${article.articleCommentCount} ${commentLabel}" <a rel="nofollow" aria-label="${article.articleCommentCount} ${commentLabel}"
class="tooltipped tooltipped-e" class="vditor-tooltipped vditor-tooltipped__e"
href="${servePath}${article.articlePermalink}"> href="${servePath}${article.articlePermalink}">
${article.articleTitle} ${article.articleTitle}
</a> </a>
@ -119,7 +109,7 @@
<#list mostViewCountArticles as article> <#list mostViewCountArticles as article>
<li> <li>
<a rel="nofollow" aria-label="${article.articleCommentCount} ${commentLabel}" <a rel="nofollow" aria-label="${article.articleCommentCount} ${commentLabel}"
class="tooltipped tooltipped-e" class="vditor-tooltipped vditor-tooltipped__e"
href="${servePath}${article.articlePermalink}"> href="${servePath}${article.articlePermalink}">
${article.articleTitle} ${article.articleTitle}
</a> </a>
@ -130,4 +120,5 @@
</div> </div>
</#if> </#if>
</section> </section>
</#if>
</aside> </aside>

View File

@ -17,13 +17,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<#include "macro-head.ftl"> <#include "../../common-template/macro-common_head.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${tag.tagTitle} - ${blogTitle}"> <@head title="${tag.tagTitle} ${tagLabel} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${tag.tagTitle}"/> <link rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}"/>
<meta name="description" content="<#list articles as article>${article.articleTitle}<#if article_has_next>,</#if></#list>"/>
</@head> </@head>
</head> </head>
<body> <body>

View File

@ -17,13 +17,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<#include "macro-head.ftl"> <#include "../../common-template/macro-common_head.ftl">
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<@head title="${allTagsLabel} - ${blogTitle}"> <@head title="${allTagsLabel} - ${blogTitle}">
<meta name="keywords" content="${metaKeywords},${allTagsLabel}"/> <link rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}"/>
<meta name="description" content="<#list tags as tag>${tag.tagTitle}<#if tag_has_next>,</#if></#list>"/>
</@head> </@head>
</head> </head>
<body> <body>
@ -37,7 +36,7 @@
</div> </div>
<div class="tags"> <div class="tags">
<#list tags as tag> <#list tags as tag>
<a rel="tag" data-count="${tag.tagPublishedRefCount}" class="tag" <a rel="tag" class="tag"
href="${servePath}/tags/${tag.tagTitle?url('UTF-8')}"> href="${servePath}/tags/${tag.tagTitle?url('UTF-8')}">
<span>${tag.tagTitle}</span> <span>${tag.tagTitle}</span>
(<b>${tag.tagPublishedRefCount}</b>) (<b>${tag.tagPublishedRefCount}</b>)
@ -49,16 +48,5 @@
</div> </div>
</div> </div>
<#include "footer.ftl"> <#include "footer.ftl">
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/isotope.pkgd.min.js" charset="utf-8"></script>
<script>
$('.tags').isotope({
transitionDuration: '1.5s',
filter: 'a',
layoutMode: 'fitRows'
});
$('.tags').isotope({
sortBy: 'random'
});
</script>
</body> </body>
</html> </html>