This commit is contained in:
xaoxuu 2021-02-20 13:09:41 +08:00
parent 6ea7fc3683
commit c22599abbe
43 changed files with 208 additions and 204 deletions

View File

@ -1,4 +1,3 @@
.github/ .github/
publish.sh publish.sh
node_modules node_modules
node_modules

View File

@ -137,6 +137,7 @@ plugins:
enable: true enable: true
css: https://unpkg.com/swiper/swiper-bundle.min.css css: https://unpkg.com/swiper/swiper-bundle.min.css
js: https://unpkg.com/swiper/swiper-bundle.min.js js: https://unpkg.com/swiper/swiper-bundle.min.js
## optional plugins ## ## optional plugins ##
# preload # preload
preload: preload:

View File

@ -15,10 +15,9 @@ btn:
meta: meta:
recent_update: Recent Update recent_update: Recent Update
toc: TOC toc: TOC
read_prev: PREV read_prev: or prev
read_next: NEXT read_next: READ NEXT
older: Older older: Older
newer: Newer
references: References references: References
comment_title: Join the discussion comment_title: Join the discussion
back_to_top: Back to top back_to_top: Back to top

View File

@ -15,10 +15,9 @@ btn:
meta: meta:
recent_update: 最近更新 recent_update: 最近更新
toc: 本文目录 toc: 本文目录
read_prev: 回顾上一篇 read_prev: 上一篇
read_next: 接下来阅读 read_next: 接下来阅读
older: 较早文章 older: 更早一篇
newer: 较新文章
references: 参考资料 references: 参考资料
comment_title: 快来参与讨论吧 comment_title: 快来参与讨论吧
back_to_top: 回到顶部 back_to_top: 回到顶部

View File

@ -15,10 +15,9 @@ btn:
meta: meta:
recent_update: 最近更新 recent_update: 最近更新
toc: 本文目錄 toc: 本文目錄
read_prev: 回顧上一篇 read_prev: 上一篇
read_next: 接下來閱讀 read_next: 接下來閱讀
older: 較早文章 older: 更早一篇
newer: 較新文章
references: 參考資料 references: 參考資料
comment_title: 快來參與討論吧 comment_title: 快來參與討論吧
back_to_top: 回到頂部 back_to_top: 回到頂部

View File

@ -2,7 +2,7 @@
page.class = '404'; page.class = '404';
page.layout = '404'; page.layout = '404';
page.comment_title = ''; page.comment_title = '';
page.comment_id = '1'; page.header = false;
%> %>
<article class='md error-page'> <article class='md error-page'>
<h1><img id='error' src="https://7.dusays.com/2021/02/14/f5b2af33b70c2.svg" alt=""></h1> <h1><img id='error' src="https://7.dusays.com/2021/02/14/f5b2af33b70c2.svg" alt=""></h1>

View File

@ -1,89 +0,0 @@
<%
function layoutDiv() {
var prev,next;
var title = '';
var title_prev = '';
var title_next = '';
if (page.layout == 'post') {
prev = page.prev;
next = page.next;
title = __('meta.read_next');
title_prev = __('meta.newer');
title_next = __('meta.older');
} else if (page.layout == 'wiki' && page.wiki && page.wiki.length > 0) {
title = page.wiki;
title_prev = __('meta.read_prev');
title_next = __('meta.read_next');
var wikis = [];
wikis = site.pages.filter(function (p) {
if (p.layout == 'wiki' && p.wiki && p.wiki == page.wiki) {
if (p.order == undefined) {
p.order = 0;
}
return true;
} else {
return false;
}
}).sort('order');
wikis.forEach((p, i) => {
if (p.order < page.order) {
if (prev == undefined || p.order > prev.order) {
prev = p;
}
} else if (p.order > page.order) {
if (next == undefined || p.order < next.order) {
next = p;
}
}
});
}
let wrapper = '';
if (prev || next) {
wrapper += '<div class="read-next-wrap">';
wrapper += '<section class="header cap cyan">';
wrapper += '<span>' + title + '</span>';
wrapper += '</section>';
wrapper += '<section class="body">';
if (page.layout == 'wiki') {
if (next) {
wrapper += '<div class="post-title unread">';
wrapper += '<a href="' + url_for(next.path) + '">';
wrapper += title_next + __('symbol.colon');
wrapper += next.title || next.seo_title;
wrapper += '</a>';
wrapper += '</div>';
}
if (prev) {
wrapper += '<div class="post-title read">';
wrapper += '<a href="' + url_for(prev.path) + '">';
wrapper += title_prev + __('symbol.colon');
wrapper += prev.title || prev.seo_title;
wrapper += '</a>';
wrapper += '</div>';
}
} else {
if (prev) {
wrapper += '<div class="post-title">';
wrapper += '<a href="' + url_for(prev.path) + '">';
wrapper += title_prev + __('symbol.colon');
wrapper += prev.title || prev.seo_title;
wrapper += '</a>';
wrapper += '</div>';
}
if (next) {
wrapper += '<div class="post-title">';
wrapper += '<a href="' + url_for(next.path) + '">';
wrapper += title_next + __('symbol.colon');
wrapper += next.title || next.seo_title;
wrapper += '</a>';
wrapper += '</div>';
}
}
wrapper += '</section>';
wrapper += '</div>';
}
return wrapper;
}
%>
<%- layoutDiv(); %>

View File

@ -0,0 +1,63 @@
<%
function layoutDiv() {
var prev,next;
var title = __('meta.read_next');
var title_prev = __('meta.read_prev');
if (page.layout == 'post') {
prev = page.next;
next = page.prev;
title_prev = __('meta.older');
} else if (page.layout == 'wiki' && page.wiki && page.wiki.length > 0) {
title_prev = __('meta.read_prev');
var wikis = [];
wikis = site.pages.filter(function (p) {
if (p.layout == 'wiki' && p.wiki && p.wiki == page.wiki) {
if (p.order == undefined) {
p.order = 0;
}
return true;
} else {
return false;
}
}).sort('order');
wikis.forEach((p, i) => {
if (p.order < page.order) {
if (prev == undefined || p.order > prev.order) {
prev = p;
}
} else if (p.order > page.order) {
if (next == undefined || p.order < next.order) {
next = p;
}
}
});
}
let wrapper = '';
if (prev || next) {
wrapper += '<div class="read-next-wrap">';
wrapper += '<section class="header cap cyan">';
wrapper += '<span>' + title + '</span>';
wrapper += '</section>';
wrapper += '<section class="body">';
if (next) {
wrapper += '<div class="post-title unread">';
wrapper += '<a href="' + url_for(next.path) + '">';
wrapper += next.title || next.seo_title;
wrapper += '</a>';
wrapper += '</div>';
}
if (prev) {
wrapper += '<div class="post-title read">';
wrapper += '<a href="' + url_for(prev.path) + '">';
wrapper += title_prev + __('symbol.colon');
wrapper += prev.title || prev.seo_title;
wrapper += '</a>';
wrapper += '</div>';
}
wrapper += '</section>';
wrapper += '</div>';
}
return wrapper;
}
%>
<%- layoutDiv(); %>

View File

@ -0,0 +1,6 @@
<%
console.log(page.path, page.header);
%>
<% if (page.header != false) { %>
<%- partial('../../sidebar/header') %>
<% } %>

View File

@ -0,0 +1,28 @@
<div class='nav-wrap'>
<nav class='sub post cap green'>
<% if (is_home()) { %>
<a class='active' href='/'><%- __('btn.recent_publish') %></a>
<% } else { %>
<a href='/'><%- __('btn.recent_publish') %></a>
<% } %>
<% if (page.category) { %>
<a class='active' href='<%- url_for(config.category_dir) %>'><%- __('btn.category') + __('symbol.colon') + page.category %></a>
<% } else if (page.layout == 'categories') { %>
<a class='active' href='<%- url_for(config.category_dir) %>'><%- __('btn.categories') %></a>
<% } else { %>
<a href='<%- url_for(config.category_dir) %>'><%- __('btn.categories') %></a>
<% } %>
<% if (page.tag) { %>
<a class='active' href='<%- url_for(config.tag_dir) %>'><%- __('btn.tag') + __('symbol.colon') + page.tag %></a>
<% } else if (page.layout == 'tags') { %>
<a class='active' href='<%- url_for(config.tag_dir) %>'><%- __('btn.tags') %></a>
<% } else { %>
<a href='<%- url_for(config.tag_dir) %>'><%- __('btn.tags') %></a>
<% } %>
<% if (is_archive()) { %>
<a class='active' href='<%- url_for(config.archive_dir) %>'><%- __('btn.archives') %></a>
<% } else { %>
<a href='<%- url_for(config.archive_dir) %>'><%- __('btn.archives') %></a>
<% } %>
</nav>
</div>

View File

@ -0,0 +1,28 @@
<div class='nav-wrap'>
<nav class='sub wiki cap green'>
<% if (page.layout == 'index' && page.title && page.wiki) { %>
<a href='/wiki/'><%- __('btn.all_wiki') %></a>
<% } else { %>
<a class='active' href='/wiki/'><%- __('btn.all_wiki') %></a>
<% } %>
<%
var groups = [];
var paths = [];
site.pages.filter(function (p) {
return p.layout == 'index' && p.title && p.wiki;
}).sort('order').each(function(p) {
if (groups.includes(p.wiki) == false) {
groups.push(p.title);
paths.push(p.path);
}
});
%>
<% groups.forEach((group, i) => { %>
<% if (page.title == group) { %>
<a class='active' href='<%- url_for(paths[i]) %>'><%- group %></a>
<% } else { %>
<a class='' href='<%- url_for(paths[i]) %>'><%- group %></a>
<% } %>
<% }); %>
</nav>
</div>

View File

@ -1,27 +0,0 @@
<nav class='cap green'>
<% if (is_home()) { %>
<a class='active' href='/'><%- __('btn.recent_publish') %></a>
<% } else { %>
<a href='/'><%- __('btn.recent_publish') %></a>
<% } %>
<% if (page.category) { %>
<a class='active' href='<%- url_for(config.category_dir) %>'><%- __('btn.category') + __('symbol.colon') + page.category %></a>
<% } else if (page.layout == 'categories') { %>
<a class='active' href='<%- url_for(config.category_dir) %>'><%- __('btn.categories') %></a>
<% } else { %>
<a href='<%- url_for(config.category_dir) %>'><%- __('btn.categories') %></a>
<% } %>
<% if (page.tag) { %>
<a class='active' href='<%- url_for(config.tag_dir) %>'><%- __('btn.tag') + __('symbol.colon') + page.tag %></a>
<% } else if (page.layout == 'tags') { %>
<a class='active' href='<%- url_for(config.tag_dir) %>'><%- __('btn.tags') %></a>
<% } else { %>
<a href='<%- url_for(config.tag_dir) %>'><%- __('btn.tags') %></a>
<% } %>
<% if (is_archive()) { %>
<a class='active' href='<%- url_for(config.archive_dir) %>'><%- __('btn.archives') %></a>
<% } else { %>
<a href='<%- url_for(config.archive_dir) %>'><%- __('btn.archives') %></a>
<% } %>
</nav>

View File

@ -1,26 +0,0 @@
<nav class='cap green'>
<% if (page.layout == 'index' && page.title && page.wiki) { %>
<a href='/wiki/'><%- __('btn.all_wiki') %></a>
<% } else { %>
<a class='active' href='/wiki/'><%- __('btn.all_wiki') %></a>
<% } %>
<%
var groups = [];
var paths = [];
site.pages.filter(function (p) {
return p.layout == 'index' && p.title && p.wiki;
}).sort('order').each(function(p) {
if (groups.includes(p.wiki) == false) {
groups.push(p.title);
paths.push(p.path);
}
});
%>
<% groups.forEach((group, i) => { %>
<% if (page.title == group) { %>
<a class='active' href='<%- url_for(paths[i]) %>'><%- group %></a>
<% } else { %>
<a class='' href='<%- url_for(paths[i]) %>'><%- group %></a>
<% } %>
<% }); %>
</nav>

View File

@ -1,11 +1,12 @@
<!-- required --> <!-- required -->
<%- partial('global') %> <%- partial('global') %>
<%- js({src: theme.plugins.jquery || 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js'}) %>
<% if (theme.stellar.cdn_js) { %> <% if (theme.stellar.cdn_js) { %>
<%- js({src: theme.stellar.cdn_js, async: true}) %> <%- js({src: theme.stellar.cdn_js, async: true}) %>
<% } else { %> <% } else { %>
<%- js({src: 'js/main.js', async: true}) %> <%- js({src: 'js/main.js', async: true}) %>
<% } %> <% } %>
<%- js({src: theme.plugins.jquery || 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js'}) %>
<!-- optional --> <!-- optional -->

View File

@ -12,6 +12,5 @@
</a> </a>
<% } %> <% } %>
<% }); %> <% }); %>
</nav> </nav>
</header> </header>

View File

@ -1,6 +1,8 @@
<a class='logo-wrap' href='/'> <div class='logo-wrap'>
<% if (theme.sidebar.logo.avatar != false) { %> <a href='/'>
<div class='img'><img no-lazy src='<%- theme.sidebar.logo.avatar || config.avatar %>'/></div> <% if (theme.sidebar.logo.avatar != false) { %>
<% } %> <div class='img'><img no-lazy src='<%- theme.sidebar.logo.avatar || config.avatar %>'/></div>
<div class='title'><%- theme.sidebar.logo.title || config.title %></div> <% } %>
</a> <span class='title'><%- theme.sidebar.logo.title || config.title %></span>
</a>
</div>

View File

@ -7,7 +7,7 @@ if (page.class == undefined) {
<%- partial('index') %> <%- partial('index') %>
<% } else { %> <% } else { %>
<% page.title = __('btn.archives'); %> <% page.title = __('btn.archives'); %>
<%- partial('_partial/navbar/list_post') %> <%- partial('_partial/main/navbar/list_post') %>
<div class='post-list'> <div class='post-list'>
<% var years = []; %> <% var years = []; %>
<% site.posts.sort('date', -1).each(function(post) { %> <% site.posts.sort('date', -1).each(function(post) { %>

View File

@ -6,7 +6,7 @@ if (page.class == undefined) {
<% if (site.categories.length) { %> <% if (site.categories.length) { %>
<% page.title = __('btn.categories'); %> <% page.title = __('btn.categories'); %>
<% page.layout = 'categories'; %> <% page.layout = 'categories'; %>
<%- partial('_partial/navbar/list_post') %> <%- partial('_partial/main/navbar/list_post') %>
<div class='post-list'> <div class='post-list'>
<div class='list-title'><%- __('page.categories', site.categories.length) %></div> <div class='list-title'><%- __('page.categories', site.categories.length) %></div>
<article class='post-card reveal' id='cats'> <article class='post-card reveal' id='cats'>

View File

@ -8,28 +8,28 @@ if (page.class == undefined) {
} }
%> %>
<% if (page.class == 'post') { %> <% if (page.class == 'post') { %>
<%- partial('_partial/navbar/list_post') %> <%- partial('_partial/main/navbar/list_post') %>
<% if (page.posts) { %> <% if (page.posts) { %>
<div class='post-list post'> <div class='post-list post'>
<% page.posts.each(function(post){ %> <% page.posts.each(function(post){ %>
<a class='post-card post reveal' href='<%- url_for(post.link || post.path) %>'> <a class='post-card post reveal' href='<%- url_for(post.link || post.path) %>'>
<article class='excerpt md'> <article class='excerpt md'>
<%- partial('_partial/post_list/post_card', {post: post}) %> <%- partial('_partial/main/post_list/post_card', {post: post}) %>
</article> </article>
</a> </a>
<% }) %> <% }) %>
<%- partial('_partial/post_list/paginator') %> <%- partial('_partial/main/post_list/paginator') %>
</div> </div>
<% } %> <% } %>
<% } else if (page.class == 'wiki') { %> <% } else if (page.class == 'wiki') { %>
<% function outputExcerpt(post) { %> <% function outputExcerpt(post) { %>
<a class='post-card wiki reveal' href='<%- url_for(post.link || post.path) %>'> <a class='post-card wiki reveal' href='<%- url_for(post.link || post.path) %>'>
<article class='excerpt md'> <article class='excerpt md'>
<%- partial('_partial/post_list/wiki_card', {post: post}) %> <%- partial('_partial/main/post_list/wiki_card', {post: post}) %>
</article> </article>
</a> </a>
<% } %> <% } %>
<%- partial('_partial/navbar/list_wiki') %> <%- partial('_partial/main/navbar/list_wiki') %>
<% if (page.title && page.wiki) { %> <% if (page.title && page.wiki) { %>
<div class='post-list wiki filter'> <div class='post-list wiki filter'>
<% page.wiki.forEach((wiki, i) => { %> <% page.wiki.forEach((wiki, i) => { %>

View File

@ -2,13 +2,13 @@
<html lang='<%- page.lang %>'> <html lang='<%- page.lang %>'>
<%- partial('_partial/head') %> <%- partial('_partial/head') %>
<body theme='<%- page.dark ? "dark" : "light" %>'> <body theme='<%- page.dark ? "dark" : "light" %>'>
<%- partial('_partial/article/wiki_cover') %> <%- partial('_partial/main/article/wiki_cover') %>
<div class='l_body' id='start'> <div class='l_body' id='start'>
<aside class='l_left'> <aside class='l_left'>
<%- partial('_partial/sidebar/index') %> <%- partial('_partial/sidebar/index') %>
</aside> </aside>
<div class='l_main<%- page.content ? "" : " list" %>'> <div class='l_main<%- page.content ? "" : " list" %>'>
<%- partial('_partial/sidebar/header') %> <%- partial('_partial/main/header/index') %>
<%- body %> <%- body %>
<footer class='page-footer'> <footer class='page-footer'>
<%- partial('_partial/footer') %> <%- partial('_partial/footer') %>

View File

@ -1,5 +1,5 @@
<% if ((page.h1 && page.h1.length > 0) || (page.content && page.content.length > 0)) { %> <% if ((page.h1 && page.h1.length > 0) || (page.content && page.content.length > 0)) { %>
<%- partial('_partial/navbar/breadcrumb') %> <%- partial('_partial/main/navbar/breadcrumb') %>
<article class='content md <%- page.layout %> reveal'> <article class='content md <%- page.layout %> reveal'>
<% if (page.h1 && page.h1.length > 0) { %> <% if (page.h1 && page.h1.length > 0) { %>
<h1 class='article-title'><span><%- page.h1 %></span></h1> <h1 class='article-title'><span><%- page.h1 %></span></h1>

View File

@ -2,14 +2,18 @@
if (page.class == undefined) { if (page.class == undefined) {
page.class = 'post'; page.class = 'post';
} }
if (page.header == undefined) {
page.header = false;
console.log('header = false');
}
%> %>
<% let post = page; %> <% let post = page; %>
<%- partial('_partial/navbar/breadcrumb') %> <%- partial('_partial/main/navbar/breadcrumb') %>
<article class='content md <%- post.layout %> reveal'> <article class='content md <%- post.layout %> reveal'>
<h1 class='article-title'><span><%- post.h1 || post.title %></span></h1> <h1 class='article-title'><span><%- post.h1 || post.title %></span></h1>
<%- post.content %> <%- post.content %>
</article> </article>
<%- partial('_partial/article/references') %> <%- partial('_partial/main/article/references') %>
<%- partial('_partial/article/read_next') %> <%- partial('_partial/main/article/read_next') %>
<%- partial('_partial/article/related_posts') %> <%- partial('_partial/main/article/related_posts') %>
<%- partial('_partial/plugins/comments/layout') %> <%- partial('_partial/plugins/comments/layout') %>

View File

@ -6,7 +6,7 @@ if (page.class == undefined) {
<% if (site.tags.length) { %> <% if (site.tags.length) { %>
<% page.title = __('btn.tags'); %> <% page.title = __('btn.tags'); %>
<% page.layout = 'tags'; %> <% page.layout = 'tags'; %>
<%- partial('_partial/navbar/list_post') %> <%- partial('_partial/main/navbar/list_post') %>
<div class='post-list'> <div class='post-list'>
<div class='list-title'><%- __('page.tags', site.tags.length) %></div> <div class='list-title'><%- __('page.tags', site.tags.length) %></div>
<article class='post-card reveal' id='tags'> <article class='post-card reveal' id='tags'>

View File

@ -12,11 +12,16 @@ if (page.title == undefined) {
<% if (page.layout == 'index') { %> <% if (page.layout == 'index') { %>
<%- partial('index') %> <%- partial('index') %>
<% } else { %> <% } else { %>
<%- partial('_partial/navbar/breadcrumb') %> <%
if (page.header == undefined) {
page.header = false;
}
%>
<%- partial('_partial/main/navbar/breadcrumb') %>
<article class='content md <%- page.layout %>'> <article class='content md <%- page.layout %>'>
<h1 class='article-title'><span><%- page.h1 || page.title %></span></h1> <h1 class='article-title'><span><%- page.h1 || page.title %></span></h1>
<%- page.content %> <%- page.content %>
</article> </article>
<%- partial('_partial/article/read_next') %> <%- partial('_partial/main/article/read_next') %>
<%- partial('_partial/plugins/comments/layout') %> <%- partial('_partial/plugins/comments/layout') %>
<% } %> <% } %>

View File

@ -46,6 +46,8 @@ $fs-h3 = 1.375rem // 22px
$fs-h4 = 1.125rem // 18px $fs-h4 = 1.125rem // 18px
$fs-h5 = 1rem // 16px $fs-h5 = 1rem // 16px
$fs-h6 = 1rem // 16px $fs-h6 = 1rem // 16px
$fsh2 = 1.5rem // 24px
$fs15 = .9375rem // 15px $fs15 = .9375rem // 15px
$fs14 = .875rem // 14px $fs14 = .875rem // 14px
$fs13 = .8125rem // 13px $fs13 = .8125rem // 13px

View File

@ -16,8 +16,6 @@
.l_body .l_main .l_body .l_main
flex-shrink: 1 flex-shrink: 1
flex-grow: 1 flex-grow: 1
// margin: var(--gap) var(--gap) var(--gap) var(--gap_2)
// width: "calc(100% - %s)" % ($sidebar + 18 * $gap)
width: 320px width: 320px
max-width: $layout-max-body-width max-width: $layout-max-body-width
footer footer

View File

@ -5,15 +5,16 @@
margin: $gap * 2 $gap $gap margin: $gap * 2 $gap $gap
padding: 0.25rem padding: 0.25rem
background: var(--block) background: var(--block)
border-radius: 8px border-radius: 6px
.logo-wrap .logo-wrap
margin: 0.5rem 1rem margin: 0.5rem 0.75rem
.img .img
width: 32px width: 32px
height: 32px height: 32px
display: none
.title .title
font-size: 1.5rem font-size: 1.5rem
nav.menu
margin: -2px
// pc // pc
@media screen and (min-width: $device-tablet) @media screen and (min-width: $device-tablet)
@ -22,5 +23,5 @@
// //
@media screen and (max-width: $device-tablet) @media screen and (max-width: $device-tablet)
.l_main.list header .l_main header
display: block display: block

View File

@ -29,6 +29,9 @@ article.md
margin-top: 3rem margin-top: 3rem
border-bottom: 1px solid var(--block-border) border-bottom: 1px solid var(--block-border)
font-weight: 400 font-weight: 400
font-size: $fsh2
&:first-child
margin-top: 1rem
h3 h3
margin-top: 3rem margin-top: 3rem
margin-bottom: 0 margin-bottom: 0
@ -55,7 +58,6 @@ article.md
article.md code article.md code
color: $color-inlinecode color: $color-inlinecode
font-family: $ff-code font-family: $ff-code
font-size: $fs14
word-break: break-all word-break: break-all

View File

@ -1,12 +1,13 @@
nav.cap .nav-wrap
position: sticky position: sticky
position: -webkit-sticky position: -webkit-sticky
margin-top: 1.75rem margin-top: 1.75rem
top: -2px top: -2px
display: flex
background: var(--site-bg) background: var(--site-bg)
padding: 0.5rem 1.25rem 0.38rem padding: 0.5rem 1.25rem 0.38rem
z-index: 1 z-index: 1
nav.cap
display: flex
overflow: scroll overflow: scroll
scrollbar(0, 0) scrollbar(0, 0)
>p >p
@ -38,6 +39,7 @@ nav.cap
background: #fff background: #fff
color: var(--text-p1) color: var(--text-p1)
// //
.breadcrumb-navigation .breadcrumb-navigation
padding: $gap $gap 0 padding: $gap $gap 0
@ -49,3 +51,8 @@ nav.cap
color: $color-cat-hover color: $color-cat-hover
div+div div+div
margin-top: 2px margin-top: 2px
@media screen and (max-width: $device-tablet)
.nav-wrap
margin-top: 0

View File

@ -4,7 +4,6 @@
.post-title .post-title
margin: 0.5rem 0 margin: 0.5rem 0
line-height: 1.2 line-height: 1.2
font-size: $fs14
color: var(--text-p2) color: var(--text-p2)
font-weight: 500 font-weight: 500
a a
@ -15,4 +14,4 @@
color: var(--text-p3) color: var(--text-p3)
font-size: $fs12 font-size: $fs12
&.unread &.unread
font-size: 1rem font-size: $fsh2

View File

@ -10,7 +10,7 @@ div.related-posts-wrap
disable-select() disable-select()
align-items: flex-start align-items: flex-start
scrollbar(8px, 4px) scrollbar(8px, 4px)
padding-bottom: 4px padding-bottom: 8px
a a
flex-grow: 0 flex-grow: 0
flex-shrink: 0 flex-shrink: 0

View File

@ -13,22 +13,25 @@
display: flex display: flex
align-items: center align-items: center
color: var(--text-p0) color: var(--text-p0)
&:hover a
color: var(--text-p0) color: inherit
display: flex
align-items: center
.img .img
width: 40px width: 40px
height: 40px height: 40px
flex-shrink: 0 flex-shrink: 0
border-radius: 20px border-radius: 40px
border: 2px solid transparent
overflow: hidden overflow: hidden
margin-right: 1rem margin-right: 1rem
img img
object-fit: cover object-fit: cover
.title .title
padding-top: 2px
font-size: 1.75rem font-size: 1.75rem
font-weight: 900 font-weight: 900
color: inherit color: inherit
line-height: 1;
font-family: $ff-logo font-family: $ff-logo
nav.menu nav.menu
@ -52,13 +55,10 @@ nav.menu
border-radius: 4px border-radius: 4px
font-size: $fs14 font-size: $fs14
font-weight: 500 font-weight: 500
trans2: color background
overflow: hidden overflow: hidden
span padding: 0.375rem 0.75rem
color: var(--text-p3) color: var(--text-p3)
display: block &.active, &:hover
padding: 6px 12px
&.active span, &:hover span
color: var(--text-p1) color: var(--text-p1)
background: var(--card) background: var(--card)
@ -67,6 +67,7 @@ nav.menu
overflow: scroll overflow: scroll
flex-grow: 1 flex-grow: 1
scrollbar(0, 0) scrollbar(0, 0)
z-index: 1
.widget-wrap .widget-wrap
margin: 1rem 0 2rem 0 margin: 1rem 0 2rem 0
.widget-header .widget-header

View File

@ -24,7 +24,6 @@
.avatar .avatar
display: inline-flex display: inline-flex
margin: 0 1rem margin: 0 1rem
// flex-shrink: 0
.about-body .about-body
>p >p
font-size: $fs14 font-size: $fs14
@ -49,9 +48,9 @@
@media screen and (max-width: $device-mobile) @media screen and (max-width: $device-mobile)
.tag-plugin.about .tag-plugin.about
background: none
padding: 1rem padding: 1rem
.about-header .about-header
flex-direction: column
.avatar .avatar
margin: 1rem auto margin: 1rem auto
p p

View File

@ -1,3 +1,5 @@
// //
if hexo-config('plugins.swiper.enable') if hexo-config('plugins.swiper.enable')
@import 'swiper' @import 'swiper'
if hexo-config('plugins.scrollreveal.enable')
@import 'scrollreveal'

View File

@ -0,0 +1,2 @@
.reveal
visibility: hidden

View File

@ -45,7 +45,7 @@ function setSedebar() {
$("#toc a.toc-link").click(function(e) { $("#toc a.toc-link").click(function(e) {
l_body.classList.remove("sidebar"); l_body.classList.remove("sidebar");
}); });
$(".social-wrap a.comment").click(function(e) { $("#toc a#s-top").click(function(e) {
l_body.classList.remove("sidebar"); l_body.classList.remove("sidebar");
}); });
} }