This commit is contained in:
Van 2019-03-22 16:45:30 +08:00
parent 1121ffae30
commit 53f713a45d
No known key found for this signature in database
GPG Key ID: 7059B8783A78F16C
7 changed files with 672 additions and 621 deletions

View File

@ -30,7 +30,7 @@
<main class="main"> <main class="main">
<div class="wrapper"> <div class="wrapper">
<div class="content page-archive"> <div class="content page-archive">
<section class="posts-collapse"> <section class="posts-collapse posts-collapse--line">
<span class="archive-move-on"></span> <span class="archive-move-on"></span>
<span class="archive-page-counter"> <span class="archive-page-counter">
${ohLabel}..! ${sumLabel} ${statistic.statisticPublishedBlogArticleCount} ${fightLabel} ${ohLabel}..! ${sumLabel} ${statistic.statisticPublishedBlogArticleCount} ${fightLabel}

File diff suppressed because one or more lines are too long

View File

@ -20,14 +20,29 @@
* skin next style * skin next style
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 2.0.0.1, Mar 16, 2019 * @version 2.1.0.0, Mar 22, 2019
*/ */
@import "../../../scss/usite";
@import "../../../scss/toc";
@import "vditor/src/assets/scss/classic"; @import "vditor/src/assets/scss/classic";
.user__site {
float: left;
height: 16px;
line-height: 16px;
border-bottom: 0;
margin: 8px 5px 0 0;
svg {
height: 16px;
width: 16px;
fill: currentColor;
}
}
#soloEditor { #soloEditor {
z-index: 1041 !important; z-index: 1041 !important;
} }
/* start reset */ /* start reset */
html { html {
background-color: #f5f5f5; background-color: #f5f5f5;
@ -75,6 +90,7 @@ img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
/* end reset */ /* end reset */
/* start function */ /* start function */
@ -101,6 +117,7 @@ img {
.fn-none { .fn-none {
display: none; display: none;
} }
/* end function */ /* end function */
/* start common */ /* start common */
@ -133,18 +150,23 @@ img {
.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-logout:before { .icon-logout:before {
content: "\ea14"; content: "\ea14";
} }
.icon-rss:before { .icon-rss:before {
content: "\e901"; content: "\e901";
} }
.form { .form {
width: 100%; width: 100%;
margin-top: 50px; margin-top: 50px;
@ -178,6 +200,7 @@ img {
color: #9EABB3; color: #9EABB3;
margin-right: 10px; margin-right: 10px;
} }
/* end common */ /* end common */
/* start framework */ /* start framework */
@ -403,6 +426,7 @@ img {
border-color: transparent transparent #fff transparent; border-color: transparent transparent #fff transparent;
border-style: solid; border-style: solid;
} }
/* end framework */ /* end framework */
/* start side */ /* start side */
@ -422,13 +446,16 @@ img {
text-align: center; text-align: center;
box-sizing: border-box; box-sizing: border-box;
} }
.sidebar::-webkit-scrollbar { .sidebar::-webkit-scrollbar {
display: none; display: none;
} }
.sidebar a { .sidebar a {
color: #999; color: #999;
border-bottom-color: #555; border-bottom-color: #555;
} }
.sidebar a:hover { .sidebar a:hover {
color: #eee; color: #eee;
} }
@ -458,17 +485,21 @@ img {
padding: 0 15px; padding: 0 15px;
border-left: 1px solid #333; border-left: 1px solid #333;
} }
.sidebar .site-state-item:first-child { .sidebar .site-state-item:first-child {
border-left: none; border-left: none;
} }
.sidebar .site-state-item a { .sidebar .site-state-item a {
border-bottom: none; border-bottom: none;
} }
.sidebar .site-state-item-count { .sidebar .site-state-item-count {
display: block; display: block;
text-align: center; text-align: center;
font-size: 18px; font-size: 18px;
} }
.sidebar .site-state-item-name { .sidebar .site-state-item-name {
font-size: 13px; font-size: 13px;
} }
@ -476,6 +507,7 @@ img {
.sidebar .feed-link { .sidebar .feed-link {
margin-top: 20px; margin-top: 20px;
} }
.sidebar .feed-link a { .sidebar .feed-link a {
display: inline-block; display: inline-block;
padding: 3px 15px; padding: 3px 15px;
@ -483,6 +515,7 @@ img {
border: 1px solid #fc6423; border: 1px solid #fc6423;
border-radius: 4px; border-radius: 4px;
} }
.sidebar .feed-link a:hover { .sidebar .feed-link a:hover {
color: #fff; color: #fff;
background: #fc6423; background: #fc6423;
@ -491,6 +524,7 @@ img {
.sidebar .links-of-author { .sidebar .links-of-author {
margin-top: 20px; margin-top: 20px;
} }
.sidebar .links-of-author a { .sidebar .links-of-author a {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
@ -499,6 +533,7 @@ img {
border-bottom-color: #555; border-bottom-color: #555;
font-size: 13px; font-size: 13px;
} }
.sidebar .links-of-author a:before { .sidebar .links-of-author a:before {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
@ -510,16 +545,19 @@ img {
background: #0dd5ff; background: #0dd5ff;
} }
.sidebar .b3-solo-list { .sidebar .article__toc {
margin: 20px; margin: 20px;
list-style: none; list-style: none;
text-align: left; text-align: left;
padding: 0; padding: 0;
font-size: 14px; font-size: 14px;
line-height: 2; line-height: 2;
li {
display: block;
}
} }
.sidebar .b3-solo-list li.current a { .sidebar .article__toc li.current a {
color: #87daff; color: #87daff;
} }
@ -550,13 +588,13 @@ img {
margin-left: 10px; margin-left: 10px;
} }
/* end side */ /* end side */
/* start list*/ /* start list*/
.posts-expand .post-item { .posts-expand .post-item {
margin-top: 120px; margin-top: 120px;
} }
.posts-expand .post-item:first-child { .posts-expand .post-item:first-child {
margin-top: 0; margin-top: 0;
} }
@ -614,6 +652,7 @@ img {
margin: 120px 0 0; margin: 120px 0 0;
text-align: left; text-align: left;
} }
.pagination .next, .pagination .next,
.pagination .page-number { .pagination .page-number {
display: inline-block; display: inline-block;
@ -629,15 +668,18 @@ img {
transition-timing-function: ease-in-out; transition-timing-function: ease-in-out;
transition-delay: 0s; transition-delay: 0s;
} }
.pagination .next:hover, .pagination .next:hover,
.pagination .page-number:hover { .pagination .page-number:hover {
border-top-color: #222; border-top-color: #222;
} }
.pagination .page-number.current { .pagination .page-number.current {
color: #fff; color: #fff;
background: #ccc; background: #ccc;
border-top-color: #ccc; border-top-color: #ccc;
} }
/* end list*/ /* end list*/
.post-header { .post-header {
@ -652,17 +694,21 @@ img {
box-sizing: border-box; box-sizing: border-box;
margin: auto; margin: auto;
} }
.posts-expand .post-tags { .posts-expand .post-tags {
margin-top: 40px; margin-top: 40px;
} }
.posts-expand .post-tags a { .posts-expand .post-tags a {
padding: 1px 5px; padding: 1px 5px;
background: #f5f5f5; background: #f5f5f5;
border-bottom: none; border-bottom: none;
} }
.posts-expand .post-tags a:hover { .posts-expand .post-tags a:hover {
background: #ccc; background: #ccc;
} }
.posts-expand .post-nav { .posts-expand .post-nav {
margin-top: 40px; margin-top: 40px;
overflow: hidden; overflow: hidden;
@ -670,10 +716,12 @@ img {
white-space: nowrap; white-space: nowrap;
border-top: 1px solid #eee; border-top: 1px solid #eee;
} }
.post-nav-item a:hover { .post-nav-item a:hover {
color: #222; color: #222;
border-bottom: none; border-bottom: none;
} }
.post-nav-item a { .post-nav-item a {
position: relative; position: relative;
display: inline-block; display: inline-block;
@ -699,6 +747,7 @@ img {
.vditor-reset p { .vditor-reset p {
margin: 0 0 25px 0; margin: 0 0 25px 0;
} }
/* end article */ /* end article */
/* start comments */ /* start comments */
@ -765,6 +814,7 @@ ul.comments .comment-meta time {
margin-left: 8px; margin-left: 8px;
padding-left: 12px; padding-left: 12px;
} }
/* end comments */ /* end comments */
/* start tags */ /* start tags */
@ -806,9 +856,14 @@ ul.comments .comment-meta time {
font-size: 30px; font-size: 30px;
color: #111; color: #111;
} }
/* end tags */ /* end tags */
/* start archives */ /* start archives */
.posts-collapse {
position: relative;
}
.posts-collapse .collection-title::before { .posts-collapse .collection-title::before {
content: " "; content: " ";
position: absolute; position: absolute;
@ -821,16 +876,20 @@ ul.comments .comment-meta time {
background: #bbb; background: #bbb;
border-radius: 50%; border-radius: 50%;
} }
.posts-collapse .collection-title { .posts-collapse .collection-title {
position: relative; position: relative;
margin: 60px 0; margin: 60px 0;
} }
.posts-collapse .collection-title h2 { .posts-collapse .collection-title h2 {
margin-left: 20px; margin-left: 20px;
} }
.posts-collapse .collection-title small { .posts-collapse .collection-title small {
color: #bbb; color: #bbb;
} }
.posts-collapse .post-header::before { .posts-collapse .post-header::before {
content: " "; content: " ";
position: absolute; position: absolute;
@ -846,7 +905,9 @@ ul.comments .comment-meta time {
transition-timing-function: ease-in-out; transition-timing-function: ease-in-out;
transition-delay: 0s; transition-delay: 0s;
transition-property: background; transition-property: background;
z-index: 1;
} }
.posts-collapse .post-header { .posts-collapse .post-header {
position: relative; position: relative;
transition-duration: 0.2s; transition-duration: 0.2s;
@ -856,18 +917,22 @@ ul.comments .comment-meta time {
border-bottom: 1px dashed #ccc; border-bottom: 1px dashed #ccc;
text-align: left; text-align: left;
} }
.posts-collapse .post-header:hover { .posts-collapse .post-header:hover {
border-bottom-color: #666; border-bottom-color: #666;
} }
.posts-collapse .post-header:hover::before { .posts-collapse .post-header:hover::before {
background: #222; background: #222;
} }
.posts-collapse .post-time { .posts-collapse .post-time {
position: absolute; position: absolute;
font-size: 12px; font-size: 12px;
left: 20px; left: 20px;
top: 8px; top: 8px;
} }
.posts-collapse .post-title { .posts-collapse .post-title {
margin-left: 70px; margin-left: 70px;
font-size: 16px; font-size: 16px;
@ -878,6 +943,7 @@ ul.comments .comment-meta time {
border-bottom: 0; border-bottom: 0;
color: #666; color: #666;
} }
.page-archive .archive-page-counter { .page-archive .archive-page-counter {
position: relative; position: relative;
top: 7px; top: 7px;
@ -885,6 +951,7 @@ ul.comments .comment-meta time {
margin-bottom: 50px; margin-bottom: 50px;
display: block; display: block;
} }
.page-archive .posts-collapse .archive-move-on { .page-archive .posts-collapse .archive-move-on {
position: absolute; position: absolute;
top: 11px; top: 11px;
@ -897,23 +964,27 @@ ul.comments .comment-meta time {
border: 1px solid #fff; border: 1px solid #fff;
border-radius: 50%; border-radius: 50%;
} }
.page-archive .post-title { .page-archive .post-title {
margin-left: 20px; margin-left: 20px;
} }
.page-archive .posts-collapse .post-header::before { .page-archive .posts-collapse .post-header::before {
top: 8px; top: 8px;
} }
.page-archive .posts-collapse::after {
top: 20px; .posts-collapse--line::after {
top: 22px;
left: 0; left: 0;
margin-left: -2px; margin-left: -2px;
width: 4px; width: 4px;
height: 100%; height: 100%;
background: #f5f5f5; background: #f5f5f5;
z-index: -1; z-index: 0;
content: " "; content: " ";
position: absolute; position: absolute;
} }
/* end archives */ /* end archives */
/* start responsive */ /* start responsive */
@ -1008,4 +1079,5 @@ ul.comments .comment-meta time {
float: none; float: none;
} }
} }
/* end responsive */ /* end responsive */

View File

@ -18,9 +18,16 @@
--> -->
<footer class="footer"> <footer class="footer">
<div class="wrapper fn-clear"> <div class="wrapper">
<div class="fn-clear">
<a href="${servePath}">${blogTitle}</a> • <a href="${servePath}">${blogTitle}</a> •
${onlineVisitor1Label}${onlineVisitorCnt} <br/> ${onlineVisitor1Label}${onlineVisitorCnt}
<div class="fn-right">
<#include "../../common-template/macro-user_site.ftl"/>
<@userSite dir="n"/>
</div>
</div>
<div class="fn-clear">
&copy; ${year} &copy; ${year}
${footerContent} ${footerContent}
Powered by <a href="https://b3log.org" target="_blank">B3log 开源</a> • Powered by <a href="https://b3log.org" target="_blank">B3log 开源</a> •
@ -32,15 +39,19 @@
by <a href="http://vanessa.b3log.org" target="_blank">Vanessa</a> by <a href="http://vanessa.b3log.org" target="_blank">Vanessa</a>
</div> </div>
</div> </div>
</div>
</footer> </footer>
<div class="back-to-top" onclick="Util.goTop()"></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}"
<script type="text/javascript" src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script> charset="utf-8"></script>
<script type="text/javascript"
src="${staticServePath}/skins/${skinDirName}/js/${skinDirName}${miniPostfix}.js?${staticResourceVersion}"
charset="utf-8"></script>
<#include "../../common-template/label.ftl"> <#include "../../common-template/label.ftl">
<script type="text/javascript"> <script type="text/javascript">
Label.tocLabel = "${tocLabel}"; Label.tocLabel = "${tocLabel}"
Label.siteViewLabel = "${siteViewLabel}"; Label.siteViewLabel = "${siteViewLabel}"
</script> </script>
${plugins} ${plugins}

View File

@ -76,7 +76,7 @@ var NexT = {
'top': '0' 'top': '0'
}, function () { }, function () {
// 当有文章页面有目录时,回调不放这里,侧边栏就会一片空白 // 当有文章页面有目录时,回调不放这里,侧边栏就会一片空白
if ($('.b3-solo-list li').length > 0 && $(window).width() > 1000) { if ($('.article__toc li').length > 0 && $(window).width() > 1000) {
$('.sidebar-toggle').click(); $('.sidebar-toggle').click();
} }
}); });
@ -92,54 +92,18 @@ var NexT = {
}); });
}, },
initArticle: function () { initArticle: function () {
if ($('.b3-solo-list li').length > 0 && $(window).width() > 1000) { if ($('.article__toc li').length > 0 && $(window).width() > 1000) {
// add color to sidebar menu // add color to sidebar menu
$('.sidebar-toggle').addClass('has-toc'); $('.sidebar-toggle').addClass('has-toc');
// append toc to sidebar menu
var articleTocHTML = '<ul><li class="current" data-tab="toc">' + Label.tocLabel + '</li><li data-tab="site">' + Label.siteViewLabel + '</li></ul><section></section>';
$('.sidebar').prepend(articleTocHTML);
var $sectionF = $('.sidebar section:first').html($('.b3-solo-list')),
$sectionL = $('.sidebar section:last');
$sectionF.height($(window).height() - 90);
// 切换 tab
$('.sidebar > ul > li').click(function () {
if ($(this).data('tab') === 'toc') {
$sectionL.animate({
"opacity": '0',
"top": '-50px'
}, 300, function () {
$sectionF.show().css('top', '-50px');
$sectionF.animate({
"opacity": '1',
"top": '0'
}, 300);
});
} else {
$sectionF.animate({
"opacity": '0',
"top": '-50px'
}, 300, function () {
$sectionF.hide().css('top', '-50px');
$sectionL.animate({
"opacity": '1',
"top": '0'
}, 300);
});
}
$('.sidebar > ul > li').removeClass('current');
$(this).addClass('current');
});
this.initToc(); this.initToc();
} }
}, },
initToc: function () { initToc: function () {
var $articleTocs = $('.vditor-reset [id^=b3_solo_h]'), var $articleTocs = $('.vditor-reset [id^=b3_solo_h]'),
$articleToc = $('.b3-solo-list'); $articleToc = $('.article__toc');
$(window).scroll(function (event) { $(window).scroll(function (event) {
if ($('.b3-solo-list li').length === 0) { if ($('.article__toc li').length === 0) {
return false; return false;
} }

2
next/js/next.min.js vendored
View File

@ -1 +1 @@
var NexT={init:function(){$(".sidebar-toggle").click(function(){var i=$(".sidebar");$(this).hasClass("sidebar-active")?($(this).removeClass("sidebar-active"),$("body").animate({"padding-right":0}),i.animate({right:-320}),i.find("section").css("opacity",0)):($(this).addClass("sidebar-active"),$("body").animate({"padding-right":320}),i.animate({right:0},function(){i.find("section:first").animate({opacity:1})}))}),$(".site-nav-toggle").click(function(){$(".site-nav").slideToggle()}),$(document).ready(function(){setTimeout(function(){$(".logo-wrap").css("opacity",1),$(".logo-line-before i").animate({left:"0"},function(){$(".site-title").css("opacity",1).animate({top:0},function(){$(".menu").css("opacity",1).animate({"margin-top":"15px"}),$(".main").css("opacity",1).animate({top:"0"},function(){0<$(".b3-solo-list li").length&&1e3<$(window).width()&&$(".sidebar-toggle").click()})})}),$(".logo-line-after i").animate({right:"0"})},500)})},initArticle:function(){if(0<$(".b3-solo-list li").length&&1e3<$(window).width()){$(".sidebar-toggle").addClass("has-toc");var i='<ul><li class="current" data-tab="toc">'+Label.tocLabel+'</li><li data-tab="site">'+Label.siteViewLabel+"</li></ul><section></section>";$(".sidebar").prepend(i);var t=$(".sidebar section:first").html($(".b3-solo-list")),a=$(".sidebar section:last");t.height($(window).height()-90),$(".sidebar > ul > li").click(function(){"toc"===$(this).data("tab")?a.animate({opacity:"0",top:"-50px"},300,function(){t.show().css("top","-50px"),t.animate({opacity:"1",top:"0"},300)}):t.animate({opacity:"0",top:"-50px"},300,function(){t.hide().css("top","-50px"),a.animate({opacity:"1",top:"0"},300)}),$(".sidebar > ul > li").removeClass("current"),$(this).addClass("current")}),this.initToc()}},initToc:function(){var n=$(".vditor-reset [id^=b3_solo_h]"),l=$(".b3-solo-list");$(window).scroll(function(i){if(0===$(".b3-solo-list li").length)return!1;var t=[];n.each(function(i){t.push({id:this.id,offsetTop:this.offsetTop})});for(var a=$(window).scrollTop(),e=0,o=t.length;e<o;e++)if(a<t[e].offsetTop+200){l.find("li").removeClass("current");var s=0<e?e-1:0;l.find('a[href="#'+t[s].id+'"]').parent().addClass("current");break}a>=t[t.length-1].offsetTop+200&&(l.find("li").removeClass("current"),l.find("li:last").addClass("current"))}),$(window).scroll()}};NexT.init(); var NexT={init:function(){$(".sidebar-toggle").click(function(){var i=$(".sidebar");$(this).hasClass("sidebar-active")?($(this).removeClass("sidebar-active"),$("body").animate({"padding-right":0}),i.animate({right:-320}),i.find("section").css("opacity",0)):($(this).addClass("sidebar-active"),$("body").animate({"padding-right":320}),i.animate({right:0},function(){i.find("section:first").animate({opacity:1})}))}),$(".site-nav-toggle").click(function(){$(".site-nav").slideToggle()}),$(document).ready(function(){setTimeout(function(){$(".logo-wrap").css("opacity",1),$(".logo-line-before i").animate({left:"0"},function(){$(".site-title").css("opacity",1).animate({top:0},function(){$(".menu").css("opacity",1).animate({"margin-top":"15px"}),$(".main").css("opacity",1).animate({top:"0"},function(){0<$(".article__toc li").length&&1e3<$(window).width()&&$(".sidebar-toggle").click()})})}),$(".logo-line-after i").animate({right:"0"})},500)})},initArticle:function(){if(0<$(".article__toc li").length&&1e3<$(window).width()){$(".sidebar-toggle").addClass("has-toc");var i='<ul><li class="current" data-tab="toc">'+Label.tocLabel+'</li><li data-tab="site">'+Label.siteViewLabel+"</li></ul><section></section>";$(".sidebar").prepend(i);var t=$(".sidebar section:first").html($(".article__toc")),a=$(".sidebar section:last");t.height($(window).height()-90),$(".sidebar > ul > li").click(function(){"toc"===$(this).data("tab")?a.animate({opacity:"0",top:"-50px"},300,function(){t.show().css("top","-50px"),t.animate({opacity:"1",top:"0"},300)}):t.animate({opacity:"0",top:"-50px"},300,function(){t.hide().css("top","-50px"),a.animate({opacity:"1",top:"0"},300)}),$(".sidebar > ul > li").removeClass("current"),$(this).addClass("current")}),this.initToc()}},initToc:function(){var n=$(".vditor-reset [id^=b3_solo_h]"),l=$(".article__toc");$(window).scroll(function(i){if(0===$(".article__toc li").length)return!1;var t=[];n.each(function(i){t.push({id:this.id,offsetTop:this.offsetTop})});for(var a=$(window).scrollTop(),e=0,o=t.length;e<o;e++)if(a<t[e].offsetTop+200){l.find("li").removeClass("current");var s=0<e?e-1:0;l.find('a[href="#'+t[s].id+'"]').parent().addClass("current");break}a>=t[t.length-1].offsetTop+200&&(l.find("li").removeClass("current"),l.find("li:last").addClass("current"))}),$(window).scroll()}};NexT.init();

View File

@ -24,6 +24,9 @@
</div> </div>
<aside class="sidebar"> <aside class="sidebar">
<#if article?? && article.articleToC?? && article.articleToC?size &gt; 0>
<#include "../../common-template/toc.ftl"/>
<#else>
<section> <section>
<img class="site-author-image" src="${adminUser.userAvatar}" title="${userName}"/> <img class="site-author-image" src="${adminUser.userAvatar}" title="${userName}"/>
<p class="site-author-name">${userName}</p> <p class="site-author-name">${userName}</p>
@ -108,4 +111,5 @@
</div> </div>
</#if> </#if>
</section> </section>
</#if>
</aside> </aside>