update
This commit is contained in:
parent
dd80bd8026
commit
254c29c6fe
|
@ -55,7 +55,7 @@ article:
|
||||||
category_color:
|
category_color:
|
||||||
'新闻稿': '#DA0F47'
|
'新闻稿': '#DA0F47'
|
||||||
# 文章许可协议
|
# 文章许可协议
|
||||||
license: '本文采用 [署名-非商业性使用-相同方式共享 4.0 国际](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh) 许可协议,转载请注明出处。'
|
license: '本文采用 [署名-非商业性使用-相同方式共享 4.0 国际](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议,转载请注明出处。'
|
||||||
# 分享
|
# 分享
|
||||||
share: # [weibo, email, link] # wechat 需要安装二维码插件: npm i hexo-helper-qrcode
|
share: # [weibo, email, link] # wechat 需要安装二维码插件: npm i hexo-helper-qrcode
|
||||||
# 相关文章,需要安装插件 (for layout: post)
|
# 相关文章,需要安装插件 (for layout: post)
|
||||||
|
@ -145,7 +145,7 @@ plugins:
|
||||||
|
|
||||||
# https://scrollrevealjs.org/api/reveal.html
|
# https://scrollrevealjs.org/api/reveal.html
|
||||||
scrollreveal:
|
scrollreveal:
|
||||||
enable: #true
|
enable: true
|
||||||
js: https://cdn.jsdelivr.net/npm/scrollreveal@4.0.7/dist/scrollreveal.min.js
|
js: https://cdn.jsdelivr.net/npm/scrollreveal@4.0.7/dist/scrollreveal.min.js
|
||||||
distance: 8px
|
distance: 8px
|
||||||
duration: 500 # ms
|
duration: 500 # ms
|
||||||
|
|
|
@ -43,9 +43,11 @@ page:
|
||||||
what: Page Not Found
|
what: Page Not Found
|
||||||
why: The address may be entered incorrectly or the address has been deleted.
|
why: The address may be entered incorrectly or the address has been deleted.
|
||||||
action: Back to Home
|
action: Back to Home
|
||||||
categories: '%s Categories'
|
categories: "%s's %s has %s categories"
|
||||||
tags: '%s Tags'
|
tags: "%s's %s has %s tags"
|
||||||
archives: '%s Years, %s Archives'
|
archives: "%s in %s years wrote %s articles" # 不知道如何把参数顺序调一下
|
||||||
|
filter: "%s's %s has %s articles"
|
||||||
|
wiki: "%s has %s %s in total"
|
||||||
|
|
||||||
symbol:
|
symbol:
|
||||||
comma: ", "
|
comma: ", "
|
||||||
|
|
|
@ -2,7 +2,7 @@ btn:
|
||||||
home: 主页
|
home: 主页
|
||||||
blog: 文章
|
blog: 文章
|
||||||
wiki: 项目
|
wiki: 项目
|
||||||
recent_publish: 最新发布
|
recent_publish: 近期发布
|
||||||
all_wiki: 所有项目
|
all_wiki: 所有项目
|
||||||
category: 分类
|
category: 分类
|
||||||
categories: 分类
|
categories: 分类
|
||||||
|
@ -43,9 +43,11 @@ page:
|
||||||
what: 很抱歉,您访问的页面不存在
|
what: 很抱歉,您访问的页面不存在
|
||||||
why: 可能是输入地址有误或该地址已被删除
|
why: 可能是输入地址有误或该地址已被删除
|
||||||
action: 返回主页
|
action: 返回主页
|
||||||
categories: '共%s个分类'
|
categories: '%s的%s共有%s个分类'
|
||||||
tags: '共%s个标签'
|
tags: '%s的%s共有%s个标签'
|
||||||
archives: 'TA在%s年间写了%s篇文章'
|
archives: '%s在%s年间写了%s篇文章'
|
||||||
|
filter: '%s的%s共有%s篇文章'
|
||||||
|
wiki: '%s共有%s个%s'
|
||||||
|
|
||||||
symbol:
|
symbol:
|
||||||
comma: ","
|
comma: ","
|
||||||
|
|
|
@ -2,7 +2,7 @@ btn:
|
||||||
home: 主頁
|
home: 主頁
|
||||||
blog: 博客
|
blog: 博客
|
||||||
wiki: 項目
|
wiki: 項目
|
||||||
recent_publish: 最新發布
|
recent_publish: 近期發布
|
||||||
all_wiki: 所有項目
|
all_wiki: 所有項目
|
||||||
category: 分類
|
category: 分類
|
||||||
categories: 分類
|
categories: 分類
|
||||||
|
@ -43,9 +43,11 @@ page:
|
||||||
what: 很抱歉,您訪問的頁面不存在
|
what: 很抱歉,您訪問的頁面不存在
|
||||||
why: 可能是輸入地址有誤或該地址已被刪除
|
why: 可能是輸入地址有誤或該地址已被刪除
|
||||||
action: 返回主頁
|
action: 返回主頁
|
||||||
categories: '共%s個分類'
|
categories: '%s的%s共有%s個分類'
|
||||||
tags: '共%s個標籤'
|
tags: '%s的%s共有%s個標籤'
|
||||||
archives: 'TA在%s年間寫了%s篇文章'
|
archives: '%s在%s年間寫了%s篇文章'
|
||||||
|
filter: '%s的%s共有%s篇文章'
|
||||||
|
wiki: '%s共有%s个%s'
|
||||||
|
|
||||||
symbol:
|
symbol:
|
||||||
comma: ","
|
comma: ","
|
||||||
|
|
|
@ -13,6 +13,17 @@ function generate_title() {
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
function generate_description() {
|
||||||
|
// 索引页
|
||||||
|
if (theme.open_graph && theme.open_graph.enable) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
if (page.description || page.excerpt || page.content) {
|
||||||
|
return '<meta name="description" content="' + truncate(strip_html(page.description || page.excerpt || page.content), {length: 150}) + '">';
|
||||||
|
}
|
||||||
|
return '<meta name="description" content="' + config.description + '">';
|
||||||
|
}
|
||||||
|
|
||||||
function generate_robots() {
|
function generate_robots() {
|
||||||
if (is_home() == true) {
|
if (is_home() == true) {
|
||||||
return '';
|
return '';
|
||||||
|
@ -53,6 +64,7 @@ function og_args() {
|
||||||
<% if (theme.open_graph && theme.open_graph.enable) { %>
|
<% if (theme.open_graph && theme.open_graph.enable) { %>
|
||||||
<%- open_graph(og_args()) %>
|
<%- open_graph(og_args()) %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<%- generate_description() %>
|
||||||
|
|
||||||
<!-- feed -->
|
<!-- feed -->
|
||||||
<% if (config.feed && config.feed.path) { %>
|
<% if (config.feed && config.feed.path) { %>
|
||||||
|
|
|
@ -46,9 +46,9 @@ function layoutDiv() {
|
||||||
if (['wechat', 'weibo', 'email', 'link'].includes(item)) {
|
if (['wechat', 'weibo', 'email', 'link'].includes(item)) {
|
||||||
el += '<a class="social share-item ' + item + '"';
|
el += '<a class="social share-item ' + item + '"';
|
||||||
if (item == 'wechat') {
|
if (item == 'wechat') {
|
||||||
el += ' onclick=\'util.toggle_qrcode()\'';
|
el += ' onclick="util.toggle_qrcode()"';
|
||||||
} else if (item == 'weibo') {
|
} else if (item == 'weibo') {
|
||||||
el += ' href="http://service.weibo.com/share/share.php?url=' + page.permalink;
|
el += ' href="https://service.weibo.com/share/share.php?url=' + page.permalink;
|
||||||
el += '&title=' + (page.seo_title || page.title) + ' - ' + config.title;
|
el += '&title=' + (page.seo_title || page.title) + ' - ' + config.title;
|
||||||
if (page.latyout == 'post' && page.cover) {
|
if (page.latyout == 'post' && page.cover) {
|
||||||
el += '&pics=' + page.cover;
|
el += '&pics=' + page.cover;
|
||||||
|
@ -61,7 +61,7 @@ function layoutDiv() {
|
||||||
el += ' href="mailto:?subject=' + (page.title || page.seo_title) + ' - ' + config.title + '&'
|
el += ' href="mailto:?subject=' + (page.title || page.seo_title) + ' - ' + config.title + '&'
|
||||||
el += 'body=' + page.permalink + '"';
|
el += 'body=' + page.permalink + '"';
|
||||||
} else if (item == 'link') {
|
} else if (item == 'link') {
|
||||||
el += ' onclick=\'util.copy_link()\'';
|
el += ' onclick="util.copy_link()"';
|
||||||
}
|
}
|
||||||
el += '>';
|
el += '>';
|
||||||
if (item == 'wechat') {
|
if (item == 'wechat') {
|
||||||
|
@ -79,7 +79,7 @@ function layoutDiv() {
|
||||||
el += '</div>';
|
el += '</div>';
|
||||||
if (theme.article.share.includes('wechat')) {
|
if (theme.article.share.includes('wechat')) {
|
||||||
el += '<div class="qrcode" id="qrcode-wechat" style="display:none">';
|
el += '<div class="qrcode" id="qrcode-wechat" style="display:none">';
|
||||||
const src = qrcode(url,{margin:1,size:8});
|
const src = qrcode(url,{margin:2,size:8});
|
||||||
el += '<img src="' + src + '"/>';
|
el += '<img src="' + src + '"/>';
|
||||||
el += '</div>';
|
el += '</div>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<% if (is_home() && page.total > 1) { %>
|
<% if (is_home() && page.total > 1) { %>
|
||||||
<div class='paginator-wrap'>
|
<div class='paginator-wrap'>
|
||||||
<a class='paginator prev<%- page.prev != 0 ? "" : " disable" %>' href='<%- url_for(page.prev_link) %>'>
|
<a class='paginator prev<%- page.prev != 0 ? "" : " disable" %>' href='<%- url_for(page.prev_link) %>'>
|
||||||
<svg class="icon" style="width: 1.05859375em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1084 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2239"><path d="M409.874051 23.92377L22.70891 430.483307a84.202997 84.202997 0 0 0 0 114.98106l387.165141 406.559537a74.867186 74.867186 0 0 0 109.500036 0 84.202997 84.202997 0 0 0 0-115.041291L264.416084 569.255629h742.287368c42.76404 0 77.457121-36.37955 77.45712-81.311907 0-44.932358-34.69308-81.311907-77.396889-81.311908H264.355853l255.018234-267.787215a84.202997 84.202997 0 0 0 0-114.98106 74.867186 74.867186 0 0 0-109.500036 0z" p-id="2240"></path></svg>
|
<img src='https://7.dusays.com/2021/02/26/f049bbd4e88ec.svg'/>
|
||||||
</a>
|
</a>
|
||||||
<div class='paginator current'>
|
<div class='paginator current'>
|
||||||
<span class='pn'><%- page.current %> / <%- page.total %></span>
|
<%- page.current %><span class='sep'></span><%- page.total %>
|
||||||
</div>
|
</div>
|
||||||
<a class='paginator next<%- page.next != 0 ? "" : " disable" %>' href='<%- url_for(page.next_link) %>'>
|
<a class='paginator next<%- page.next != 0 ? "" : " disable" %>' href='<%- url_for(page.next_link) %>'>
|
||||||
<svg class="icon" style="width: 1.0546875em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1080 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="25103"><path d="M1045.447111 461.937778l0.853333 1.194666a85.447111 85.447111 0 0 1 15.36 48.867556v1.422222c0 1.820444-0.113778 3.640889-0.284444 5.461334L1061.660444 512a86.129778 86.129778 0 0 1-12.970666 45.226667c-2.901333 4.664889-6.257778 9.045333-10.012445 13.084444l-0.455111 0.455111-378.993778 399.36a85.333333 85.333333 0 0 1-129.479111-110.819555l5.688889-6.656 242.176-255.317334H96.881778a85.333333 85.333333 0 0 1-8.192-170.268444l8.192-0.398222h688.469333L533.788444 145.635556A85.333333 85.333333 0 0 1 534.186667 31.345778L540.444444 25.201778a85.333333 85.333333 0 0 1 114.346667 0.455111l6.087111 6.200889L1039.928889 455.111111l1.080889 1.194667c1.137778 1.308444 2.218667 2.673778 3.242666 4.039111l1.137778 1.592889z" p-id="25104"></path></svg>
|
<img src='https://7.dusays.com/2021/02/26/064b95430caf4.svg'/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
|
@ -17,7 +17,7 @@ if (page.menu_id == undefined) {
|
||||||
<% years.push(post.year); %>
|
<% years.push(post.year); %>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% }); %>
|
<% }); %>
|
||||||
<div class='list-title'><%- __('page.archives', years.length, site.posts.length) %></div>
|
<h1 class='list-title'><%- __('page.archives', config.title, years.length, site.posts.length) %></h1>
|
||||||
<% years.forEach((year, i) => { %>
|
<% years.forEach((year, i) => { %>
|
||||||
<article class='post-card<%- scrollreveal() %>' id='archive'>
|
<article class='post-card<%- scrollreveal() %>' id='archive'>
|
||||||
<div class='card-title'><%= year %></div>
|
<div class='card-title'><%= year %></div>
|
||||||
|
|
|
@ -9,7 +9,7 @@ if (page.menu_id == undefined) {
|
||||||
<% page.layout = 'categories'; %>
|
<% page.layout = 'categories'; %>
|
||||||
<%- partial('_partial/main/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>
|
<h1 class='list-title'><%- __('page.categories', config.title, __('btn.blog'), site.categories.length) %></h1>
|
||||||
<article class='post-card<%- scrollreveal() %>' id='cats'>
|
<article class='post-card<%- scrollreveal() %>' id='cats'>
|
||||||
<% site.categories.sort('path').each(function(category){ %>
|
<% site.categories.sort('path').each(function(category){ %>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -9,11 +9,21 @@ if (page.menu_id == undefined) {
|
||||||
if (page.title && page.wiki) {
|
if (page.title && page.wiki) {
|
||||||
page.robots = 'noindex,follow';
|
page.robots = 'noindex,follow';
|
||||||
}
|
}
|
||||||
|
function layout_h1() {
|
||||||
|
if (is_home()) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
var el = '<h1 class="list-title">';
|
||||||
|
el += __('page.filter', config.title, page.category || page.tag, page.posts.length);
|
||||||
|
el += '</h1>';
|
||||||
|
return el;
|
||||||
|
}
|
||||||
%>
|
%>
|
||||||
<% if (page.menu_id == 'post') { %>
|
<% if (page.menu_id == 'post') { %>
|
||||||
<%- partial('_partial/main/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'>
|
||||||
|
<%- layout_h1() %>
|
||||||
<% page.posts.each(function(post){ %>
|
<% page.posts.each(function(post){ %>
|
||||||
<a class='post-card post<%- scrollreveal() %>' href='<%- url_for(post.link || post.path) %>'>
|
<a class='post-card post<%- scrollreveal() %>' href='<%- url_for(post.link || post.path) %>'>
|
||||||
<article class='excerpt md'>
|
<article class='excerpt md'>
|
||||||
|
@ -35,12 +45,19 @@ if (page.title && page.wiki) {
|
||||||
<%- partial('_partial/main/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) => { %>
|
<%
|
||||||
<% site.pages.filter(function (p) { %>
|
var wikis = [];
|
||||||
<% return p.layout == 'wiki' && p.wiki == wiki && p.description; %>
|
page.wiki.forEach((wiki, i) => {
|
||||||
<% }).limit(1).each(function(post) { %>
|
site.pages.filter(function (p) {
|
||||||
<%- outputExcerpt(post) %>
|
return p.layout == 'wiki' && p.wiki == wiki && p.description;
|
||||||
<% }); %>
|
}).limit(1).each(function(post) {
|
||||||
|
wikis.push(post);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
%>
|
||||||
|
<h1 class='list-title'><%- __('page.wiki', config.title, wikis.length, page.title) %></h1>
|
||||||
|
<% wikis.forEach(function(post) { %>
|
||||||
|
<%- outputExcerpt(post) %>
|
||||||
<% }); %>
|
<% }); %>
|
||||||
</div>
|
</div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
@ -58,6 +75,7 @@ if (page.title && page.wiki) {
|
||||||
}
|
}
|
||||||
}).sort('order');
|
}).sort('order');
|
||||||
%>
|
%>
|
||||||
|
<h1 class='list-title'><%- __('page.wiki', config.title, wikis.length, __('btn.wiki')) %></h1>
|
||||||
<% wikis.forEach(function(post) { %>
|
<% wikis.forEach(function(post) { %>
|
||||||
<%- outputExcerpt(post) %>
|
<%- outputExcerpt(post) %>
|
||||||
<% }); %>
|
<% }); %>
|
||||||
|
|
|
@ -9,7 +9,7 @@ if (page.menu_id == undefined) {
|
||||||
<% page.layout = 'tags'; %>
|
<% page.layout = 'tags'; %>
|
||||||
<%- partial('_partial/main/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>
|
<h1 class='list-title'><%- __('page.tags', config.title, __('btn.blog'), site.tags.length) %></h1>
|
||||||
<article class='post-card<%- scrollreveal() %>' id='tags'>
|
<article class='post-card<%- scrollreveal() %>' id='tags'>
|
||||||
<% site.tags.sort('length', -1).each(function(tag){ %>
|
<% site.tags.sort('length', -1).each(function(tag){ %>
|
||||||
<a class='tag' href="<%= url_for(tag.path) %>">
|
<a class='tag' href="<%= url_for(tag.path) %>">
|
||||||
|
|
|
@ -6,7 +6,7 @@ if (page.layout == undefined) {
|
||||||
page.layout = 'index';
|
page.layout = 'index';
|
||||||
}
|
}
|
||||||
if (page.title == undefined) {
|
if (page.title == undefined) {
|
||||||
page.title = 'Wiki';
|
page.title = __('btn.wiki');
|
||||||
}
|
}
|
||||||
function layoutTitle() {
|
function layoutTitle() {
|
||||||
const title = page.h1 || page.title;
|
const title = page.h1 || page.title;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* timeline.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
* timeline.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
||||||
*
|
*
|
||||||
* {% timeline %}
|
* {% timeline [order:-date] %}
|
||||||
*
|
*
|
||||||
* {% timenode header1 %}
|
* {% timenode header1 %}
|
||||||
* what happened 1
|
* what happened 1
|
||||||
|
@ -16,12 +16,31 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
const { ArgsMap, ArgsJoinTags } = require('./utils');
|
||||||
|
|
||||||
function postTimeline(args, content) {
|
function postTimeline(args, content) {
|
||||||
return `<div class="tag-plugin timeline"><svg class="icon top" width="1em" height="1em" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
args = ArgsMap(args, ['order']);
|
||||||
<path d="M7,0 C3.13425,0 0,3.13425 0,7 C0,10.86575 3.13425,14 7,14 C10.86575,14 14,10.86575 14,7 C14,3.13425 10.86575,0 7,0 Z M7,12.25 C4.104625,12.25 1.75,9.89449999 1.75,7 C1.75,4.10550001 4.104625,1.75 7,1.75 C9.895375,1.75 12.25,4.10550001 12.25,7 C12.25,9.89449999 9.895375,12.25 7,12.25 Z M8.75875001,7 L7.43750001,7 C7.19600001,7 7.00000002,6.804 7.00000002,6.56250001 L7.00000002,5.24125001 C7.00000002,4.76262501 6.61237501,4.37500001 6.13375002,4.37500001 L6.11625001,4.37500001 C5.63762502,4.37500001 5.25000001,4.76262501 5.25000001,5.24125001 L5.25000001,7.88375 C5.25000001,8.362375 5.63762502,8.75 6.11625001,8.75 L8.75875001,8.75 C9.237375,8.75 9.62500001,8.362375 9.62500001,7.88375 L9.62500001,7.86625 C9.62500001,7.387625 9.237375,7 8.75875001,7 L8.75875001,7 Z" id="top"></path>
|
|
||||||
</svg>${content}<svg class="icon bottom" width="1em" height="1em" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
const newerIcon = '<svg class="icon top" width="1em" height="1em" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M7,0 C3.13425,0 0,3.13425 0,7 C0,10.86575 3.13425,14 7,14 C10.86575,14 14,10.86575 14,7 C14,3.13425 10.86575,0 7,0 Z M7,12.25 C4.104625,12.25 1.75,9.89449999 1.75,7 C1.75,4.10550001 4.104625,1.75 7,1.75 C9.895375,1.75 12.25,4.10550001 12.25,7 C12.25,9.89449999 9.895375,12.25 7,12.25 Z M8.75875001,7 L7.43750001,7 C7.19600001,7 7.00000002,6.804 7.00000002,6.56250001 L7.00000002,5.24125001 C7.00000002,4.76262501 6.61237501,4.37500001 6.13375002,4.37500001 L6.11625001,4.37500001 C5.63762502,4.37500001 5.25000001,4.76262501 5.25000001,5.24125001 L5.25000001,7.88375 C5.25000001,8.362375 5.63762502,8.75 6.11625001,8.75 L8.75875001,8.75 C9.237375,8.75 9.62500001,8.362375 9.62500001,7.88375 L9.62500001,7.86625 C9.62500001,7.387625 9.237375,7 8.75875001,7 L8.75875001,7 Z" id="top"></path></svg>';
|
||||||
<path d="M7,0 C10.8558804,0.0243061403 13.9756939,3.14411956 14,7 C14,10.8659932 10.8659932,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 Z M7,1.27272727 C4.67984382,1.25597015 2.57881097,2.64070073 1.67929035,4.77945461 C0.779769726,6.91820849 1.25950821,9.38836411 2.89419242,11.0349403 C4.52887664,12.6815164 6.99549008,13.1791467 9.14070778,12.2951521 C11.2859255,11.4111574 12.6859091,9.32021669 12.6859091,7 C12.6739296,3.85798179 10.1418488,1.30748075 7,1.27272727 Z M2.70454544,7 C2.7044994,7.39789465 2.91674722,7.76558417 3.26132643,7.96454478 C3.60590563,8.1635054 4.030458,8.1635054 4.3750372,7.96454478 C4.7196164,7.76558417 4.93186422,7.39789465 4.93181818,7 C4.93186422,6.60210535 4.7196164,6.23441583 4.3750372,6.03545522 C4.030458,5.8364946 3.60590563,5.8364946 3.26132643,6.03545522 C2.91674722,6.23441583 2.7044994,6.60210535 2.70454544,7 L2.70454544,7 Z M5.88636363,7 C5.88636363,7.39786396 6.09862151,7.76550543 6.44318181,7.96443741 C6.7877421,8.1633694 7.2122579,8.1633694 7.55681819,7.96443741 C7.90137849,7.76550543 8.11363637,7.39786396 8.11363637,7 C8.11363637,6.38495562 7.61504438,5.88636363 7,5.88636363 C6.38495562,5.88636363 5.88636363,6.38495562 5.88636363,7 L5.88636363,7 Z M9.06818182,7 C9.06813578,7.39789465 9.2803836,7.76558417 9.6249628,7.96454478 C9.969542,8.1635054 10.3940944,8.1635054 10.7386736,7.96454478 C11.0832528,7.76558417 11.2955006,7.39789465 11.2954546,7 C11.2955006,6.60210535 11.0832528,6.23441583 10.7386736,6.03545522 C10.3940944,5.8364946 9.969542,5.8364946 9.6249628,6.03545522 C9.2803836,6.23441583 9.06813578,6.60210535 9.06818182,7 Z" id="bottom"></path>
|
|
||||||
</svg></div>`;
|
const olderIcon = '<svg class="icon bottom" width="1em" height="1em" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M7,0 C10.8558804,0.0243061403 13.9756939,3.14411956 14,7 C14,10.8659932 10.8659932,14 7,14 C3.13400675,14 0,10.8659932 0,7 C0,3.13400675 3.13400675,0 7,0 Z M7,1.27272727 C4.67984382,1.25597015 2.57881097,2.64070073 1.67929035,4.77945461 C0.779769726,6.91820849 1.25950821,9.38836411 2.89419242,11.0349403 C4.52887664,12.6815164 6.99549008,13.1791467 9.14070778,12.2951521 C11.2859255,11.4111574 12.6859091,9.32021669 12.6859091,7 C12.6739296,3.85798179 10.1418488,1.30748075 7,1.27272727 Z M2.70454544,7 C2.7044994,7.39789465 2.91674722,7.76558417 3.26132643,7.96454478 C3.60590563,8.1635054 4.030458,8.1635054 4.3750372,7.96454478 C4.7196164,7.76558417 4.93186422,7.39789465 4.93181818,7 C4.93186422,6.60210535 4.7196164,6.23441583 4.3750372,6.03545522 C4.030458,5.8364946 3.60590563,5.8364946 3.26132643,6.03545522 C2.91674722,6.23441583 2.7044994,6.60210535 2.70454544,7 L2.70454544,7 Z M5.88636363,7 C5.88636363,7.39786396 6.09862151,7.76550543 6.44318181,7.96443741 C6.7877421,8.1633694 7.2122579,8.1633694 7.55681819,7.96443741 C7.90137849,7.76550543 8.11363637,7.39786396 8.11363637,7 C8.11363637,6.38495562 7.61504438,5.88636363 7,5.88636363 C6.38495562,5.88636363 5.88636363,6.38495562 5.88636363,7 L5.88636363,7 Z M9.06818182,7 C9.06813578,7.39789465 9.2803836,7.76558417 9.6249628,7.96454478 C9.969542,8.1635054 10.3940944,8.1635054 10.7386736,7.96454478 C11.0832528,7.76558417 11.2955006,7.39789465 11.2954546,7 C11.2955006,6.60210535 11.0832528,6.23441583 10.7386736,6.03545522 C10.3940944,5.8364946 9.969542,5.8364946 9.6249628,6.03545522 C9.2803836,6.23441583 9.06813578,6.60210535 9.06818182,7 Z" id="bottom"></path></svg>';
|
||||||
|
|
||||||
|
var el = '';
|
||||||
|
const order = args && args.order == 'date' ? 'date' : '-date';
|
||||||
|
el += '<div class="tag-plugin timeline" order="' + order + '">';
|
||||||
|
if (order == '-date') {
|
||||||
|
el += newerIcon;
|
||||||
|
} else {
|
||||||
|
el += olderIcon;
|
||||||
|
}
|
||||||
|
el += '<div class="timenodes">' + content + '</div>';
|
||||||
|
if (order == '-date') {
|
||||||
|
el += olderIcon;
|
||||||
|
} else {
|
||||||
|
el += newerIcon;
|
||||||
|
}
|
||||||
|
el += '</div>';
|
||||||
|
return el;
|
||||||
}
|
}
|
||||||
|
|
||||||
function postTimenode(args, content) {
|
function postTimenode(args, content) {
|
||||||
|
|
|
@ -61,6 +61,7 @@ $sidebar = 280px
|
||||||
|
|
||||||
// max body width
|
// max body width
|
||||||
$layout-max-body-width = 680px
|
$layout-max-body-width = 680px
|
||||||
|
$layout-max-body-width-2k = 720px
|
||||||
|
|
||||||
// gap
|
// gap
|
||||||
$gap = 16px // 必须是 px
|
$gap = 16px // 必须是 px
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
flex-grow: 1
|
flex-grow: 1
|
||||||
width: 320px
|
width: 320px
|
||||||
max-width: $layout-max-body-width
|
max-width: $layout-max-body-width
|
||||||
|
@media screen and (min-width: $device-2k)
|
||||||
|
max-width: $layout-max-body-width-2k
|
||||||
footer
|
footer
|
||||||
margin-top: 4rem
|
margin-top: 4rem
|
||||||
margin-bottom: 2rem
|
margin-bottom: 2rem
|
||||||
|
|
|
@ -12,9 +12,12 @@
|
||||||
.body
|
.body
|
||||||
input.copy-area
|
input.copy-area
|
||||||
margin: 0.75rem 0
|
margin: 0.75rem 0
|
||||||
|
padding: 0
|
||||||
width: 100%
|
width: 100%
|
||||||
font-family: $ff-code
|
font-family: $ff-code
|
||||||
font-size: $fs12
|
font-size: $fs12
|
||||||
|
font-weight: 600
|
||||||
|
color: var(--text-p3)
|
||||||
p
|
p
|
||||||
font-size: $fs14
|
font-size: $fs14
|
||||||
color: var(--text-p2)
|
color: var(--text-p2)
|
||||||
|
@ -37,11 +40,14 @@
|
||||||
border-top: 1px solid var(--block-border)
|
border-top: 1px solid var(--block-border)
|
||||||
|
|
||||||
.md .article-footer .social-wrap
|
.md .article-footer .social-wrap
|
||||||
grid-gap: $gap * 0.25 $gap * 0.5
|
grid-gap: $gap * 0.5 $gap * 1.5
|
||||||
grid-template-columns: repeat(auto-fill, 40px)
|
grid-template-columns: repeat(auto-fill, 24px)
|
||||||
margin-bottom: 0.5rem
|
margin: 0.5rem 0
|
||||||
a.social
|
a.social
|
||||||
padding: 8px
|
padding: 0
|
||||||
|
background: none
|
||||||
|
&:hover
|
||||||
|
box-shadow: none
|
||||||
|
|
||||||
.md .article-footer .qrcode
|
.md .article-footer .qrcode
|
||||||
margin: 2rem auto 1rem
|
margin: 2rem auto 1rem
|
||||||
|
|
|
@ -3,20 +3,33 @@
|
||||||
justify-content: space-between
|
justify-content: space-between
|
||||||
align-items: center
|
align-items: center
|
||||||
disable-select()
|
disable-select()
|
||||||
font-weight: 500
|
font-size: 1rem
|
||||||
svg.icon
|
font-weight: 700
|
||||||
font-size: 1.8rem
|
background: var(--block)
|
||||||
|
border-radius: $border-card
|
||||||
|
border: 1px solid var(--block-border)
|
||||||
|
overflow: hidden
|
||||||
.paginator
|
.paginator
|
||||||
text-align: center
|
text-align: center
|
||||||
padding: $gap
|
.current
|
||||||
div.paginator
|
font-family: $ff-code
|
||||||
font-size: $fs14
|
color: var(--text-p3)
|
||||||
color: var(--text-p2)
|
|
||||||
a.paginator
|
a.paginator
|
||||||
color: $color-link
|
color: var(--text-p3)
|
||||||
trans1: color
|
padding: 1rem
|
||||||
|
line-height: 0
|
||||||
|
img
|
||||||
|
height: 1rem
|
||||||
|
filter: grayscale(100%)
|
||||||
&.disable
|
&.disable
|
||||||
pointer-events: none
|
pointer-events: none
|
||||||
opacity: 0.25
|
opacity: 0.25
|
||||||
|
&.prev
|
||||||
|
border-right: 1px solid transparent
|
||||||
|
&.next
|
||||||
|
border-left: 1px solid transparent
|
||||||
a.paginator:hover
|
a.paginator:hover
|
||||||
color: $color-hover
|
background: var(--card)
|
||||||
|
border-color: var(--block-border)
|
||||||
|
img
|
||||||
|
filter: grayscale(0%)
|
||||||
|
|
|
@ -2,14 +2,15 @@
|
||||||
.post-list
|
.post-list
|
||||||
margin: 1rem
|
margin: 1rem
|
||||||
.card-title,.list-title
|
.card-title,.list-title
|
||||||
font-weight: 600
|
color: var(--text-p3)
|
||||||
color: var(--text-meta)
|
|
||||||
font-family: $ff-code
|
font-family: $ff-code
|
||||||
line-height: 1.2
|
line-height: 1.2
|
||||||
.list-title
|
.list-title
|
||||||
|
font-weight: 500
|
||||||
margin: 2rem 1rem 0rem
|
margin: 2rem 1rem 0rem
|
||||||
font-size: 1.5rem
|
font-size: 1.2rem
|
||||||
.card-title
|
.card-title
|
||||||
|
font-weight: 600
|
||||||
padding-bottom: 0.5rem
|
padding-bottom: 0.5rem
|
||||||
font-size: 1.2rem
|
font-size: 1.2rem
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
div.timeline
|
.tag-plugin.timeline
|
||||||
position: relative
|
position: relative
|
||||||
display: block
|
display: block
|
||||||
margin: 1rem 0
|
margin: 1rem 0
|
||||||
|
@ -13,32 +13,32 @@ div.timeline
|
||||||
left: 16px
|
left: 16px
|
||||||
top: 1rem
|
top: 1rem
|
||||||
bottom: 1rem
|
bottom: 1rem
|
||||||
svg.top, svg.bottom
|
>svg.icon:first-child, >svg.icon:last-child
|
||||||
position: absolute
|
position: absolute
|
||||||
z-index: 1
|
z-index: 1
|
||||||
fill: var(--block-border)
|
fill: var(--block-border)
|
||||||
height 16px
|
height 16px
|
||||||
width: 16px
|
width: 16px
|
||||||
margin-left: 9px
|
margin-left: 9px
|
||||||
svg.top
|
>svg.icon:first-child
|
||||||
margin-top: -1rem
|
margin-top: -1rem
|
||||||
svg.bottom
|
>svg.icon:last-child
|
||||||
margin-bottom: 1rem
|
margin-bottom: 1rem
|
||||||
|
|
||||||
div.timenode
|
.tag-plugin.timenode
|
||||||
position: relative
|
position: relative
|
||||||
background: var(--card)
|
background: var(--card)
|
||||||
border: 1px solid var(--block-border)
|
border: 1px solid var(--theme)
|
||||||
border-radius: $border-block
|
border-radius: $border-block
|
||||||
margin-top: 1rem
|
margin-top: 1rem
|
||||||
margin-bottom: 1rem
|
margin-bottom: 1rem
|
||||||
font-size: $fs14
|
font-size: $fs14
|
||||||
.header
|
.header
|
||||||
line-height: 1.2
|
line-height: 1.2
|
||||||
background: var(--block)
|
background: var(--theme-bg)
|
||||||
border-top-left-radius: "calc(%s - 1px)" % $border-block
|
border-top-left-radius: "calc(%s - 1px)" % $border-block
|
||||||
border-top-right-radius: "calc(%s - 1px)" % $border-block
|
border-top-right-radius: "calc(%s - 1px)" % $border-block
|
||||||
border-bottom: 1px solid var(--block-border)
|
border-bottom: 1px solid var(--theme)
|
||||||
display: flex
|
display: flex
|
||||||
justify-content: space-between
|
justify-content: space-between
|
||||||
align-items: center
|
align-items: center
|
||||||
|
@ -64,19 +64,17 @@ div.timenode
|
||||||
li
|
li
|
||||||
font-size: $fs14
|
font-size: $fs14
|
||||||
|
|
||||||
div.timenode:hover
|
.tag-plugin.timenode:hover
|
||||||
.header a
|
.header a
|
||||||
visibility: visible
|
visibility: visible
|
||||||
|
|
||||||
// div.timeline:hover
|
.tag-plugin.timeline .timenode
|
||||||
// &:before
|
--theme-bg: alpha(#888, 0.05)
|
||||||
// background: var(--block-border)
|
|
||||||
// svg.top, svg.bottom
|
.tag-plugin.timeline[order='-date'] .timenodes>.timenode:first-child
|
||||||
// fill: var(--block-border)
|
--theme: alpha($c-blue, 0.25)
|
||||||
// div.timenode:hover
|
--theme-bg: alpha($c-blue, 0.05)
|
||||||
// border-color: var(--block-border)
|
|
||||||
// .header
|
.tag-plugin.timeline[order='date'] .timenodes>:last-child
|
||||||
// background: var(--block-border)
|
--theme: alpha($c-blue, 0.25)
|
||||||
// border-color: var(--block-border)
|
--theme-bg: alpha($c-blue, 0.05)
|
||||||
// a
|
|
||||||
// visibility: visible
|
|
||||||
|
|
Loading…
Reference in New Issue