hexo-theme-volantis 4.3.1 → 5.0.0-alpha.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/_config.yml +599 -246
- package/languages/en.yml +7 -0
- package/languages/zh-CN.yml +13 -2
- package/languages/zh-TW.yml +7 -0
- package/layout/404.ejs +1 -1
- package/layout/_meta/author.ejs +4 -4
- package/layout/_meta/category.ejs +11 -8
- package/layout/_meta/counter.ejs +29 -7
- package/layout/_meta/date.ejs +1 -1
- package/layout/_meta/music.ejs +1 -1
- package/layout/_meta/share.ejs +1 -1
- package/layout/_meta/tags.ejs +3 -0
- package/layout/_meta/thumbnail.ejs +3 -1
- package/layout/_meta/updated.ejs +1 -1
- package/layout/_meta/walinecount.ejs +2 -1
- package/layout/{_cover → _partial/_cover}/blank.ejs +0 -0
- package/layout/{_cover → _partial/_cover}/dock.ejs +1 -1
- package/layout/{_cover → _partial/_cover}/featured.ejs +1 -1
- package/layout/{_cover → _partial/_cover}/focus.ejs +1 -1
- package/layout/_partial/_cover/layout.ejs +8 -0
- package/layout/{_cover → _partial/_cover}/search.ejs +2 -2
- package/layout/_partial/archive.ejs +2 -2
- package/layout/_partial/article.ejs +21 -16
- package/layout/_partial/categories.ejs +1 -1
- package/layout/_partial/cover.ejs +8 -28
- package/layout/_partial/footer.ejs +19 -11
- package/layout/_partial/head.ejs +70 -116
- package/layout/_partial/header.ejs +17 -11
- package/layout/_partial/meta.ejs +18 -4
- package/layout/_partial/post.ejs +35 -9
- package/layout/_partial/scripts/_ctrl/cdnCtrl.ejs +126 -0
- package/layout/_partial/scripts/{coverCtrl.ejs → _ctrl/coverCtrl.ejs} +17 -25
- package/layout/_partial/scripts/_ctrl.ejs +2 -0
- package/layout/_partial/scripts/content-visibility-scroll-fix.ejs +88 -0
- package/layout/_partial/scripts/global.ejs +422 -109
- package/layout/_partial/scripts/index.ejs +91 -46
- package/layout/_partial/scripts/toc.ejs +98 -68
- package/layout/_partial/side.ejs +4 -1
- package/layout/_plugins/_page_plugins/artitalk/index.ejs +15 -0
- package/layout/_plugins/_page_plugins/bbtalk/index.ejs +10 -0
- package/layout/_plugins/_page_plugins/fcircle/index.ejs +12 -0
- package/layout/_plugins/_page_plugins/gitter/index.ejs +14 -0
- package/layout/_plugins/_page_plugins/indent/index.ejs +16 -0
- package/layout/_plugins/_page_plugins/index.ejs +27 -0
- package/layout/_plugins/_page_plugins/katex/index.ejs +13 -0
- package/layout/{_third-party/math/mathjax/script.ejs → _plugins/_page_plugins/mathjax/index.ejs} +2 -2
- package/layout/_plugins/_page_plugins/snackbar/index.ejs +55 -0
- package/layout/{_partial/scripts/counter.ejs → _plugins/analytics/LCCounter.ejs} +0 -0
- package/layout/{_third-party → _plugins}/analytics/script.ejs +43 -5
- package/layout/{_third-party → _plugins}/aplayer/layout.ejs +0 -0
- package/layout/_plugins/aplayer/script.ejs +74 -0
- package/layout/_plugins/chat/gitter/script.ejs +17 -0
- package/layout/_plugins/chat/index.ejs +1 -0
- package/layout/_plugins/chat/tidio/script.ejs +1 -0
- package/layout/_plugins/comments/artalk/script.ejs +59 -0
- package/layout/_plugins/comments/beaudar/script.ejs +61 -0
- package/layout/_plugins/comments/discuss/script.ejs +30 -0
- package/layout/_plugins/comments/disqus/script.ejs +98 -0
- package/layout/_plugins/comments/disqusjs/script.ejs +35 -0
- package/layout/_plugins/comments/giscus/script.ejs +47 -0
- package/layout/_plugins/comments/gitalk/script.ejs +24 -0
- package/layout/_plugins/comments/hashover/script.ejs +5 -0
- package/layout/{_third-party → _plugins}/comments/index.ejs +10 -3
- package/layout/_plugins/comments/isso/script.ejs +27 -0
- package/layout/_plugins/comments/livere/script.ejs +15 -0
- package/layout/_plugins/comments/twikoo/script.ejs +40 -0
- package/layout/_plugins/comments/utterances/script.ejs +43 -0
- package/layout/_plugins/comments/vssue/script.ejs +37 -0
- package/layout/_plugins/comments/waline/script.ejs +62 -0
- package/layout/_plugins/comments/z-custom/script.ejs +1 -0
- package/layout/_plugins/darkmode/script.ejs +114 -0
- package/layout/{_third-party → _plugins}/end-of-support/script.ejs +25 -8
- package/layout/_plugins/github-api/script.ejs +27 -0
- package/layout/_plugins/highlight/highlightjs/script.ejs +26 -0
- package/layout/_plugins/highlight/prismjs/script.ejs +25 -0
- package/layout/_plugins/highlight/script.ejs +1 -0
- package/layout/{_third-party → _plugins}/lazyload/script.ejs +1 -1
- package/layout/{_third-party → _plugins}/nodewaves/script.ejs +1 -1
- package/layout/_plugins/parallax/script.ejs +74 -0
- package/layout/{_third-party → _plugins}/pjax/animate.ejs +31 -31
- package/layout/_plugins/pjax/index.ejs +73 -0
- package/layout/_plugins/pjax/pdata.ejs +56 -0
- package/layout/{_third-party → _plugins}/preload/script.ejs +3 -3
- package/layout/_plugins/rightmenu/layout.ejs +119 -0
- package/layout/_plugins/rightmenus/layout.ejs +137 -0
- package/layout/_plugins/scrollreveal/script.ejs +25 -0
- package/layout/_plugins/search/script.ejs +50 -0
- package/layout/{_third-party → _plugins}/share/layout.ejs +0 -0
- package/layout/_plugins/swiper/script.ejs +37 -0
- package/layout/_pre.ejs +2 -2
- package/layout/_widget/_pre.ejs +5 -0
- package/layout/_widget/blogger.ejs +1 -1
- package/layout/_widget/category.ejs +2 -2
- package/layout/_widget/copyright.ejs +1 -1
- package/layout/_widget/grid.ejs +3 -3
- package/layout/_widget/lastupdate.ejs +27 -0
- package/layout/_widget/list.ejs +2 -2
- package/layout/_widget/load.ejs +18 -0
- package/layout/_widget/music.ejs +3 -2
- package/layout/_widget/page.ejs +1 -1
- package/layout/_widget/qrcode.ejs +1 -1
- package/layout/_widget/related_posts.ejs +1 -1
- package/layout/_widget/tagcloud.ejs +1 -1
- package/layout/_widget/text.ejs +1 -1
- package/layout/_widget/toc.ejs +6 -2
- package/layout/_widget/webinfo.ejs +13 -76
- package/layout/archive.ejs +4 -4
- package/layout/category.ejs +9 -4
- package/layout/docs.ejs +1 -1
- package/layout/friends.ejs +6 -25
- package/layout/index.ejs +1 -1
- package/layout/layout.ejs +30 -12
- package/layout/list.ejs +1 -1
- package/layout/page.ejs +1 -1
- package/layout/post.ejs +1 -1
- package/layout/tag.ejs +8 -3
- package/package.json +5 -3
- package/scripts/events/index.js +13 -0
- package/scripts/events/lib/check-configuration.js +43 -0
- package/scripts/events/lib/check-environment.js +74 -0
- package/scripts/events/lib/config.js +34 -9
- package/scripts/events/lib/render-stylus.js +78 -0
- package/scripts/events/lib/stellar-tag-utils.js +76 -0
- package/scripts/filters/content-visibility.js +25 -0
- package/scripts/{render → filters}/img.js +0 -0
- package/scripts/filters/replace.js +15 -0
- package/scripts/{z-lazyload/lib/process.js → filters/z-lazyload.js} +6 -3
- package/scripts/helpers/custom-files.js +165 -0
- package/scripts/helpers/first-style.js +19 -0
- package/scripts/helpers/head/autoCanonical.js +15 -0
- package/scripts/helpers/head/generate_preload_fontfamily.js +22 -0
- package/scripts/helpers/head/generate_seo.js +24 -0
- package/scripts/helpers/head/generate_title__keywords__description.js +101 -0
- package/scripts/{related_posts/index.js → helpers/related-posts.js} +1 -1
- package/scripts/helpers/revisioned.js +158 -0
- package/scripts/helpers/structured-data/index.js +2 -0
- package/scripts/helpers/structured-data/lib/blogposting.js +77 -0
- package/scripts/helpers/structured-data/lib/breadcrumblist.js +152 -0
- package/scripts/helpers/structured-data/lib/config.js +31 -0
- package/scripts/helpers/structured-data/lib/index.js +30 -0
- package/scripts/helpers/structured-data/lib/organization.js +15 -0
- package/scripts/helpers/structured-data/lib/person.js +16 -0
- package/scripts/helpers/structured-data/lib/website.js +42 -0
- package/scripts/tags/btn.js +6 -1
- package/scripts/tags/btns.js +7 -2
- package/scripts/tags/checkbox.js +12 -2
- package/scripts/tags/contributors.js +100 -0
- package/scripts/tags/dropmenu.js +18 -3
- package/scripts/tags/fancybox.js +44 -10
- package/scripts/tags/folding.js +6 -1
- package/scripts/tags/frame.js +6 -1
- package/scripts/tags/friends.js +99 -0
- package/scripts/tags/ghcard.js +6 -1
- package/scripts/tags/image.js +14 -2
- package/scripts/tags/link.js +6 -1
- package/scripts/tags/md.js +59 -0
- package/scripts/tags/media.js +25 -1
- package/scripts/tags/note.js +36 -3
- package/scripts/tags/site.js +87 -51
- package/scripts/tags/span.js +12 -2
- package/scripts/tags/swiper.js +38 -0
- package/scripts/tags/tabs.js +33 -3
- package/scripts/tags/timeline.js +6 -1
- package/source/css/Readme.md +28 -0
- package/source/css/_defines/AutoPrefixCSS.styl +347 -0
- package/source/css/_defines/Readme.md +3 -0
- package/source/css/_defines/color.styl +41 -1
- package/source/css/_defines/effect.styl +0 -13
- package/source/css/_defines/fonts.styl +17 -18
- package/source/css/_defines/func.styl +12 -30
- package/source/css/_first/base_first.styl +118 -0
- package/source/css/_first/{cover.styl → cover_first.styl} +113 -87
- package/source/css/_first/dark_first.styl +76 -0
- package/source/css/_first/fontfamily_first.styl +17 -0
- package/source/css/_first/{navbar.styl → navbar_first.styl} +4 -10
- package/source/css/_first/search_first.styl +12 -0
- package/source/css/{_base/index.styl → _style/_base/base.styl} +9 -93
- package/source/css/_style/_base/fontfamily_async.styl +8 -0
- package/source/css/{_layout → _style/_layout}/archive.styl +0 -0
- package/source/css/{_layout → _style/_layout}/article.styl +3 -30
- package/source/css/{_layout → _style/_layout}/footer.styl +0 -0
- package/source/css/_style/_layout/friends-simpleuser.styl +23 -0
- package/source/css/_style/_layout/friends-traditional.styl +81 -0
- package/source/css/{_layout → _style/_layout}/img.styl +0 -0
- package/source/css/_style/_layout/loading.styl +14 -0
- package/source/css/{_layout → _style/_layout}/main.styl +19 -7
- package/source/css/{_layout → _style/_layout}/md.styl +0 -0
- package/source/css/{_layout → _style/_layout}/pagination.styl +1 -1
- package/source/css/{_layout → _style/_layout}/posts.styl +2 -0
- package/source/css/{_first → _style/_layout}/search.styl +0 -103
- package/source/css/{_layout → _style/_layout}/sidebar.styl +23 -3
- package/source/css/{_layout → _style/_layout}/snackbar.styl +0 -0
- package/source/css/{_layout → _style/_layout}/toc.styl +3 -3
- package/source/css/{_layout → _style/_layout}/video.styl +0 -0
- package/source/css/_style/_plugins/_dark/dark_async.styl +41 -0
- package/source/css/_style/_plugins/_dark/dark_plugins.styl +136 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/clipboard.styl +36 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/color.styl +96 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/index.styl +102 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/language.styl +63 -0
- package/source/css/_style/_plugins/_highlight/index.styl +1 -0
- package/source/css/_style/_plugins/_highlight/prismjs/clipboard.styl +33 -0
- package/source/css/_style/_plugins/_highlight/prismjs/index.styl +8 -0
- package/source/css/_style/_plugins/_highlight/prismjs/language.styl +63 -0
- package/source/css/_style/_plugins/_rightmenu/reading.styl +56 -0
- package/source/css/{_plugins → _style/_plugins/_rightmenu}/rightmenu.styl +22 -2
- package/source/css/{_plugins → _style/_plugins}/aplayer.styl +8 -1
- package/source/css/{_plugins → _style/_plugins}/cursor.styl +49 -19
- package/source/css/_style/_plugins/fontcolor.styl +84 -0
- package/source/css/{_plugins → _style/_plugins}/gitalk.styl +0 -0
- package/source/css/_style/_plugins/index.styl +24 -0
- package/source/css/{_plugins → _style/_plugins}/mathjax.styl +0 -0
- package/source/css/_style/_plugins/message.styl +14 -0
- package/source/css/{_plugins → _style/_plugins}/pjaxanimate.styl +0 -0
- package/source/css/_style/_tag-plugins/Readme.md +6 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/btns.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/checkbox.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/dropmenu.styl +0 -0
- package/source/css/{_plugins → _style/_tag-plugins}/fancybox.styl +8 -9
- package/source/css/{_tag-plugins → _style/_tag-plugins}/folding.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/frame.styl +0 -0
- package/source/css/_style/_tag-plugins/friends.styl +72 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/ghcard.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/image.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/link.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/media.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/note.styl +0 -0
- package/source/css/_style/_tag-plugins/sites.styl +87 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/span.styl +0 -0
- package/source/css/_style/_tag-plugins/swiper.styl +44 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/table.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/tabs.styl +0 -0
- package/source/css/_style/_tag-plugins/tag.json +35 -0
- package/source/css/_style/_tag-plugins/text.styl +31 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/timeline.styl +0 -0
- package/source/css/_style/index.styl +8 -0
- package/source/css/first.styl +17 -6
- package/source/css/style.styl +9 -7
- package/source/js/app.js +1051 -278
- package/source/js/plugins/aplayer.js +186 -0
- package/source/js/plugins/parallax.js +191 -0
- package/source/js/plugins/rightMenu.js +577 -0
- package/source/js/plugins/rightMenus.js +616 -0
- package/source/js/plugins/tags/contributors.js +92 -0
- package/source/js/plugins/tags/friends.js +93 -0
- package/source/js/plugins/tags/sites.js +96 -0
- package/source/js/search/hexo.js +180 -373
- package/.eslintrc.json +0 -111
- package/layout/_meta/valinecount.ejs +0 -15
- package/layout/_partial/rightmenu.ejs +0 -199
- package/layout/_partial/scripts/cover.ejs +0 -45
- package/layout/_partial/scripts/darkmode.ejs +0 -85
- package/layout/_partial/scripts/import.ejs +0 -3
- package/layout/_partial/scripts/issues.ejs +0 -18
- package/layout/_partial/scripts/search.ejs +0 -62
- package/layout/_partial/snackbar.ejs +0 -22
- package/layout/_third-party/aplayer/script.ejs +0 -26
- package/layout/_third-party/clipboard/script.ejs +0 -54
- package/layout/_third-party/comments/disqus/layout.ejs +0 -5
- package/layout/_third-party/comments/disqus/script.ejs +0 -90
- package/layout/_third-party/comments/disqusjs/layout.ejs +0 -1
- package/layout/_third-party/comments/disqusjs/script.ejs +0 -34
- package/layout/_third-party/comments/gitalk/layout.ejs +0 -1
- package/layout/_third-party/comments/gitalk/script.ejs +0 -22
- package/layout/_third-party/comments/hashover/layout.ejs +0 -2
- package/layout/_third-party/comments/hashover/script.ejs +0 -1
- package/layout/_third-party/comments/isso/layout.ejs +0 -1
- package/layout/_third-party/comments/isso/script.ejs +0 -1
- package/layout/_third-party/comments/livere/layout.ejs +0 -3
- package/layout/_third-party/comments/livere/script.ejs +0 -10
- package/layout/_third-party/comments/minivaline/layout.ejs +0 -3
- package/layout/_third-party/comments/minivaline/script.ejs +0 -34
- package/layout/_third-party/comments/twikoo/layout.ejs +0 -3
- package/layout/_third-party/comments/twikoo/script.ejs +0 -32
- package/layout/_third-party/comments/valine/layout.ejs +0 -3
- package/layout/_third-party/comments/valine/script.ejs +0 -49
- package/layout/_third-party/comments/vssue/layout.ejs +0 -1
- package/layout/_third-party/comments/vssue/script.ejs +0 -21
- package/layout/_third-party/comments/waline/layout.ejs +0 -3
- package/layout/_third-party/comments/waline/script.ejs +0 -33
- package/layout/_third-party/fancybox/script.ejs +0 -61
- package/layout/_third-party/highlightjs/script.ejs +0 -11
- package/layout/_third-party/pjax/index.ejs +0 -78
- package/layout/_third-party/pjax/pdata.ejs +0 -53
- package/layout/_third-party/scrollreveal/script.ejs +0 -21
- package/layout/_third-party/tidio/script.ejs +0 -3
- package/layout/artitalk.ejs +0 -13
- package/layout/bb.ejs +0 -10
- package/package-lock.json +0 -916
- package/scripts/tags/issues.js +0 -41
- package/scripts/z-lazyload/index.js +0 -4
- package/source/css/_highlight/index.styl +0 -316
- package/source/css/_layout/friends.styl +0 -79
- package/source/css/_plugins/clipboard.styl +0 -37
- package/source/css/_plugins/dark.styl +0 -149
- package/source/css/_plugins/darkmode.styl +0 -9
- package/source/css/_plugins/index.styl +0 -18
- package/source/css/_plugins/twikoo.styl +0 -21
- package/source/css/_plugins/valine.styl +0 -183
- package/source/css/_tag-plugins/simpleuser.styl +0 -21
- package/source/css/_tag-plugins/site-card.styl +0 -70
- package/source/js/aplayer.js +0 -167
- package/source/js/issues.js +0 -186
- package/source/js/search/algolia.js +0 -344
- package/source/js/search/azure.js +0 -355
- package/source/js/search/baidu.js +0 -340
- package/source/js/search/google.js +0 -339
- package/source/js/valine.js +0 -5137
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* swiper.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
+
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
|
+
*
|
|
5
|
+
* {% swiper %}
|
|
6
|
+
* 
|
|
7
|
+
* {% endswiper %}
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
hexo.extend.tag.register('swiper', function (args, content) {
|
|
13
|
+
args = hexo.args.map(args, ['width']);
|
|
14
|
+
var el = '';
|
|
15
|
+
function slide() {
|
|
16
|
+
let imgs = hexo.render.renderSync({ text: content, engine: 'markdown' });
|
|
17
|
+
imgs = imgs.match(/<img(.*?)src="(.*?)"(.*?)>/gi);
|
|
18
|
+
if (imgs && imgs.length > 0) {
|
|
19
|
+
imgs.forEach((img, i) => {
|
|
20
|
+
img = img.replace('<img src', '<img no-lazy src');
|
|
21
|
+
el += '<div class="swiper-slide">' + img + '</div>';
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
el += '<div class="tag-plugin swiper-container"';
|
|
26
|
+
if (args.width && args.width.length > 0) {
|
|
27
|
+
el += ' ' + hexo.args.joinTags(args, 'width').join(' ');
|
|
28
|
+
}
|
|
29
|
+
el += '>';
|
|
30
|
+
el += '<div class="swiper-wrapper">';
|
|
31
|
+
slide();
|
|
32
|
+
el += '</div>';
|
|
33
|
+
el += '<div class="swiper-pagination"></div>';
|
|
34
|
+
el += '<div class="swiper-button-prev blur"></div>';
|
|
35
|
+
el += '<div class="swiper-button-next blur"></div>';
|
|
36
|
+
el += '</div>';
|
|
37
|
+
return el;
|
|
38
|
+
}, { ends: true });
|
package/scripts/tags/tabs.js
CHANGED
|
@@ -7,7 +7,12 @@
|
|
|
7
7
|
function postTabs(args, content) {
|
|
8
8
|
var tabBlock = /<!--\s*tab (.*?)\s*-->\n([\w\W\s\S]*?)<!--\s*endtab\s*-->/g;
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
if(/::/g.test(args)){
|
|
11
|
+
args = args.join(' ').split('::');
|
|
12
|
+
}
|
|
13
|
+
else{
|
|
14
|
+
args = args.join(' ').split(',');
|
|
15
|
+
}
|
|
11
16
|
var tabName = args[0];
|
|
12
17
|
var tabActive = Number(args[1]) || 0;
|
|
13
18
|
|
|
@@ -31,8 +36,33 @@ function postTabs(args, content) {
|
|
|
31
36
|
var tabIcon = tabParameters[1] || '';
|
|
32
37
|
var tabHref = '';
|
|
33
38
|
|
|
39
|
+
|
|
40
|
+
// 兼容aplayer插件 https://github.com/volantis-x/hexo-theme-volantis/issues/575
|
|
41
|
+
var aplayerTag=0
|
|
42
|
+
var aplayerTagReg=/\<div.*class=\"aplayer aplayer-tag-marker\"(.|\n)*\<\/script\>/g
|
|
43
|
+
if(/class="aplayer aplayer-tag-marker"/g.test(postContent)){
|
|
44
|
+
aplayerTag=aplayerTagReg.exec(postContent)[0]
|
|
45
|
+
postContent=postContent.replace(aplayerTagReg,"@aplayerTag@")
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 兼容 gallery 标签
|
|
49
|
+
var fancyboxTag=0
|
|
50
|
+
var fancyboxTagReg = /\<div.*galleryFlag(.|\n)*\<\/span\>\<\/div\>\<\/div\>/g
|
|
51
|
+
if(/galleryFlag/g.test(postContent)) {
|
|
52
|
+
fancyboxTag=fancyboxTagReg.exec(postContent)[0]
|
|
53
|
+
postContent=postContent.replace(fancyboxTagReg,"@fancyboxTag@")
|
|
54
|
+
}
|
|
55
|
+
|
|
34
56
|
postContent = hexo.render.renderSync({text: postContent, engine: 'markdown'}).trim();
|
|
35
57
|
|
|
58
|
+
if(aplayerTag){
|
|
59
|
+
postContent=postContent.replace(/\<pre\>\<code\>.*@aplayerTag@.*\<\/code><\/pre>/,aplayerTag)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if(fancyboxTag){
|
|
63
|
+
postContent=postContent.replace(/.*@fancyboxTag@.*/,fancyboxTag)
|
|
64
|
+
}
|
|
65
|
+
|
|
36
66
|
tabId += 1;
|
|
37
67
|
tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');
|
|
38
68
|
|
|
@@ -50,8 +80,8 @@ function postTabs(args, content) {
|
|
|
50
80
|
|
|
51
81
|
tabNav = `<ul class="nav-tabs">${tabNav}</ul>`;
|
|
52
82
|
tabContent = `<div class="tab-content">${tabContent}</div>`;
|
|
53
|
-
|
|
54
|
-
return `<div class="tabs" id="
|
|
83
|
+
// https://github.com/volantis-x/hexo-theme-volantis/issues/703
|
|
84
|
+
return `<div class="tabs" id="tab-${tabName.toLowerCase().split(' ').join('-')}">${tabNav + tabContent}</div>`;
|
|
55
85
|
}
|
|
56
86
|
|
|
57
87
|
hexo.extend.tag.register('tabs', postTabs, {ends: true});
|
package/scripts/tags/timeline.js
CHANGED
|
@@ -13,7 +13,12 @@ function postTimeline(args, content) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function postTimenode(args, content) {
|
|
16
|
-
|
|
16
|
+
if(/::/g.test(args)){
|
|
17
|
+
args = args.join(' ').split('::');
|
|
18
|
+
}
|
|
19
|
+
else{
|
|
20
|
+
args = args.join(' ').split(',');
|
|
21
|
+
}
|
|
17
22
|
var time = args[0];
|
|
18
23
|
return `<div class="timenode"><div class="meta"><p>${hexo.render.renderSync({text: time, engine: 'markdown'})}</p></div><div class="body">${hexo.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')}</div></div>`;
|
|
19
24
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 样式文件说明
|
|
2
|
+
|
|
3
|
+
## 样式拆分说明
|
|
4
|
+
|
|
5
|
+
方案是对 https://blog.skk.moe/post/improve-fcp-for-my-blog/ 的开源实现
|
|
6
|
+
|
|
7
|
+
### first.styl
|
|
8
|
+
|
|
9
|
+
首屏样式, 内含 首屏基础样式、 cover、 navbar、 首屏search、首屏暗黑模式、首屏字体 等样式, 首屏样式采用硬编码的方式写在HTML中.
|
|
10
|
+
|
|
11
|
+
内联硬编码自动化方案 see:scripts/helpers/first-style/index.js
|
|
12
|
+
|
|
13
|
+
### style.styl
|
|
14
|
+
|
|
15
|
+
异步加载样式, 除首屏样式外的其他样式, 最终生成 /css/style.css 异步加载.
|
|
16
|
+
|
|
17
|
+
## 暗黑模式样式说明
|
|
18
|
+
|
|
19
|
+
暗黑模式样式被拆分为首屏暗黑模式样式和异步暗黑模式样式,其中在 source/css/ 文件夹下:
|
|
20
|
+
|
|
21
|
+
_first/dark_first.styl : 包含 首屏暗黑模式样式 的 暗黑模式 CSS 变量 和 强制覆盖样式
|
|
22
|
+
|
|
23
|
+
_style/_plugins/_dark : 异步暗黑模式样式文件夹
|
|
24
|
+
|
|
25
|
+
_style/_plugins/_dark/dark_async.styl : 包含 异步暗黑模式样式 的 暗黑模式 CSS 变量
|
|
26
|
+
|
|
27
|
+
_style/_plugins/_dark/dark_plugins.styl : 包含 异步暗黑模式样式 的 强制覆盖样式
|
|
28
|
+
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
// AutoPrefixCSS
|
|
2
|
+
// https://github.com/stylus/nib
|
|
3
|
+
|
|
4
|
+
vendor-prefixes ?= webkit khtml moz o ms
|
|
5
|
+
|
|
6
|
+
vendor(prop, only = null ,vendor-property = true, args)
|
|
7
|
+
if (only and official in only) or !only
|
|
8
|
+
{prop}: args
|
|
9
|
+
if vendor-property
|
|
10
|
+
for prefix in vendor-prefixes
|
|
11
|
+
unless only and !(prefix in only)
|
|
12
|
+
{'-' + prefix + '-' + prop}: args
|
|
13
|
+
|
|
14
|
+
// A
|
|
15
|
+
|
|
16
|
+
animation()
|
|
17
|
+
vendor(prop:'animation', only: null, vendor-property: true, args:arguments)
|
|
18
|
+
|
|
19
|
+
// B
|
|
20
|
+
box-orient()
|
|
21
|
+
vendor(prop:'box-orient', only: webkit moz ms official, vendor-property: true, args:arguments)
|
|
22
|
+
|
|
23
|
+
box-pack()
|
|
24
|
+
vendor(prop:'box-pack', only: webkit moz ms official, vendor-property: true, args:arguments)
|
|
25
|
+
|
|
26
|
+
border-radius()
|
|
27
|
+
vendor(prop:'border-radius', only: webkit official, vendor-property: true, args:arguments)
|
|
28
|
+
|
|
29
|
+
box-shadow()
|
|
30
|
+
vendor(prop:'box-shadow', only: webkit official, vendor-property: true, args:arguments)
|
|
31
|
+
|
|
32
|
+
border-image()
|
|
33
|
+
vendor(prop:'border-image', only: webkit moz o official, vendor-property: true, args:arguments)
|
|
34
|
+
|
|
35
|
+
background-image()
|
|
36
|
+
if match('-gradient\(', ''+arguments)
|
|
37
|
+
vendor(prop:'background-image', only: null, vendor-property: false, args:arguments)
|
|
38
|
+
else
|
|
39
|
+
background-image arguments
|
|
40
|
+
|
|
41
|
+
box-sizing()
|
|
42
|
+
vendor(prop:'box-sizing', only: webkit moz official, vendor-property: true, args:arguments)
|
|
43
|
+
|
|
44
|
+
backface-visibility()
|
|
45
|
+
vendor(prop:'backface-visibility', only: webkit moz ms official, vendor-property: true, args:arguments)
|
|
46
|
+
|
|
47
|
+
background-size()
|
|
48
|
+
vendor(prop:'background-size', only: webkit moz official, vendor-property: true, args:arguments)
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
* Legacy syntax support for background-clip and background-origin
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
legacy-bg-values(property, args)
|
|
55
|
+
legacy_args = ()
|
|
56
|
+
importance = unquote('')
|
|
57
|
+
for subargs in args
|
|
58
|
+
for arg in subargs
|
|
59
|
+
if arg in (border-box padding-box content-box)
|
|
60
|
+
arg = unquote('border') if arg == border-box
|
|
61
|
+
arg = unquote('padding') if arg == padding-box
|
|
62
|
+
arg = unquote('content') if arg == content-box
|
|
63
|
+
if arg != '!important'
|
|
64
|
+
push(legacy_args,arg)
|
|
65
|
+
else
|
|
66
|
+
importance = !important
|
|
67
|
+
vendor(prop:property, only: moz webkit, vendor-property: true, args: unquote(join(', ',legacy_args)) importance)
|
|
68
|
+
|
|
69
|
+
background-clip()
|
|
70
|
+
if arguments[0] == text
|
|
71
|
+
vendor(prop:'background-clip', only: webkit, vendor-property: true, args:arguments)
|
|
72
|
+
else
|
|
73
|
+
legacy-bg-values('background-clip', arguments)
|
|
74
|
+
background-clip: arguments
|
|
75
|
+
// C
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
column-count()
|
|
79
|
+
vendor(prop:'column-count', only: webkit moz official, vendor-property: true, args:arguments)
|
|
80
|
+
|
|
81
|
+
column-gap()
|
|
82
|
+
vendor(prop:'column-gap', only: webkit moz official, vendor-property: true, args:arguments)
|
|
83
|
+
|
|
84
|
+
column-rule()
|
|
85
|
+
vendor(prop:'column-rule', only: webkit moz official, vendor-property: true, args:arguments)
|
|
86
|
+
|
|
87
|
+
column-rule-color()
|
|
88
|
+
vendor(prop:'column-rule-color', only: webkit moz official, vendor-property: true, args:arguments)
|
|
89
|
+
|
|
90
|
+
column-rule-width()
|
|
91
|
+
vendor(prop:'column-rule-width', only: webkit moz official, vendor-property: true, args:arguments)
|
|
92
|
+
|
|
93
|
+
column-rule-style()
|
|
94
|
+
vendor(prop:'column-rule-style', only: webkit moz official, vendor-property: true, args:arguments)
|
|
95
|
+
|
|
96
|
+
column-width()
|
|
97
|
+
vendor(prop:'column-width', only: webkit moz official, vendor-property: true, args:arguments)
|
|
98
|
+
|
|
99
|
+
column-span()
|
|
100
|
+
vendor(prop:'column-span', only: webkit official, vendor-property: true, args:arguments)
|
|
101
|
+
|
|
102
|
+
column-fill()
|
|
103
|
+
vendor(prop:'column-fill', only: moz, vendor-property: true, args:arguments)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
// D
|
|
107
|
+
display(value)
|
|
108
|
+
// Initializing a flexbox container
|
|
109
|
+
display -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */
|
|
110
|
+
display -moz-box /* OLD - Firefox 19- (buggy but mostly works) */
|
|
111
|
+
if value == inline-flex
|
|
112
|
+
display -ms-inline-flexbox /* TWEENER - IE 10 */
|
|
113
|
+
display -webkit-inline-flex /* NEW - Chrome */
|
|
114
|
+
display value /* NEW, Spec - Opera 12.1, Firefox 20+ */
|
|
115
|
+
else if value == flex
|
|
116
|
+
display -ms-flexbox /* TWEENER - IE 10 */
|
|
117
|
+
display -webkit-flex /* NEW - Chrome */
|
|
118
|
+
display flex /* NEW, Spec - Opera 12.1, Firefox 20+ */
|
|
119
|
+
|
|
120
|
+
if arguments != 'flex'
|
|
121
|
+
display: arguments;
|
|
122
|
+
else
|
|
123
|
+
display: -webkit-box;
|
|
124
|
+
display: -webkit-flex;
|
|
125
|
+
display: -ms-flexbox;
|
|
126
|
+
display: flex;
|
|
127
|
+
|
|
128
|
+
// E
|
|
129
|
+
|
|
130
|
+
// F
|
|
131
|
+
flex-wrap(value)
|
|
132
|
+
// Implementation of the flex-wrap attribute.
|
|
133
|
+
vendor(prop:'flex-wrap',only: null, vendor-property: true, args:value)
|
|
134
|
+
|
|
135
|
+
flex-flow()
|
|
136
|
+
vendor(prop:'flex-flow',only: null, vendor-property: true, args:arguments)
|
|
137
|
+
|
|
138
|
+
flex-direction(value)
|
|
139
|
+
// Implementation of flex-direction attributes.
|
|
140
|
+
if value == row
|
|
141
|
+
-webkit-box-direction normal
|
|
142
|
+
-moz-box-direction normal
|
|
143
|
+
-webkit-box-orient horizontal
|
|
144
|
+
-moz-box-orient horizontal
|
|
145
|
+
else if value == row-reverse
|
|
146
|
+
-webkit-box-direction reverse
|
|
147
|
+
-moz-box-direction reverse
|
|
148
|
+
-webkit-box-orient horizontal
|
|
149
|
+
-moz-box-orient horizontal
|
|
150
|
+
else if value == column
|
|
151
|
+
-webkit-box-direction normal
|
|
152
|
+
-moz-box-direction normal
|
|
153
|
+
-webkit-box-orient vertical
|
|
154
|
+
-moz-box-orient vertical
|
|
155
|
+
else if value == column-reverse
|
|
156
|
+
-webkit-box-direction reverse
|
|
157
|
+
-moz-box-direction reverse
|
|
158
|
+
-webkit-box-orient vertical
|
|
159
|
+
-moz-box-orient vertical
|
|
160
|
+
-webkit-flex-direction value
|
|
161
|
+
-ms-flex-direction value
|
|
162
|
+
flex-direction value
|
|
163
|
+
|
|
164
|
+
flexbox(value)
|
|
165
|
+
// Initializing a flexbox container
|
|
166
|
+
display -webkit-box /* OLD - iOS 6-, Safari 3.1-6 */
|
|
167
|
+
display -moz-box /* OLD - Firefox 19- (buggy but mostly works) */
|
|
168
|
+
if value == inline-flex
|
|
169
|
+
display -ms-inline-flexbox /* TWEENER - IE 10 */
|
|
170
|
+
display -webkit-inline-flex /* NEW - Chrome */
|
|
171
|
+
display value /* NEW, Spec - Opera 12.1, Firefox 20+ */
|
|
172
|
+
else if value == flex
|
|
173
|
+
display -ms-flexbox /* TWEENER - IE 10 */
|
|
174
|
+
display -webkit-flex /* NEW - Chrome */
|
|
175
|
+
display flex /* NEW, Spec - Opera 12.1, Firefox 20+ */
|
|
176
|
+
|
|
177
|
+
flex(grow = 0, shrink = 0)
|
|
178
|
+
// For configuring the flex elements
|
|
179
|
+
-webkit-box-flex grow
|
|
180
|
+
-moz-box-flex grow
|
|
181
|
+
-webkit-flex grow shrink
|
|
182
|
+
-ms-flex grow shrink
|
|
183
|
+
flex grow shrink
|
|
184
|
+
|
|
185
|
+
flex-content(value)
|
|
186
|
+
// Implements the align-content settings
|
|
187
|
+
if value == space-around
|
|
188
|
+
-webkit-align-content value
|
|
189
|
+
-ms-flex-line-pack distribute
|
|
190
|
+
align-content value
|
|
191
|
+
else if value == space-between
|
|
192
|
+
-webkit-align-content value
|
|
193
|
+
-ms-flex-line-pack justify
|
|
194
|
+
align-content value
|
|
195
|
+
else if value == end or value == start
|
|
196
|
+
-webkit-align-content flex-+value
|
|
197
|
+
-ms-flex-line-pack value
|
|
198
|
+
align-content flex-+value
|
|
199
|
+
else
|
|
200
|
+
-webkit-align-content value
|
|
201
|
+
-ms-flex-line-pack value
|
|
202
|
+
align-content value
|
|
203
|
+
|
|
204
|
+
flex-align(value)
|
|
205
|
+
// Function for align-items
|
|
206
|
+
if value == start or value == end
|
|
207
|
+
-webkit-box-align value
|
|
208
|
+
-moz-box-align value
|
|
209
|
+
-webkit-align-items flex-+value
|
|
210
|
+
-ms-flex-align value
|
|
211
|
+
align-items flex-+value
|
|
212
|
+
else
|
|
213
|
+
-webkit-box-align value
|
|
214
|
+
-moz-box-align value
|
|
215
|
+
-webkit-align-items value
|
|
216
|
+
-ms-flex-align value
|
|
217
|
+
|
|
218
|
+
flex-firefox()
|
|
219
|
+
// Helper to manage inline bugs in legacy Firefox
|
|
220
|
+
width 100%
|
|
221
|
+
-moz-box-sizing border-box
|
|
222
|
+
|
|
223
|
+
flex-group(value)
|
|
224
|
+
// Manages ordering of the flex elements within a container
|
|
225
|
+
-webkit-box-ordinal-group value
|
|
226
|
+
-moz-box-ordinal-group value
|
|
227
|
+
-ms-flex-order value
|
|
228
|
+
-webkit-order value
|
|
229
|
+
order value
|
|
230
|
+
|
|
231
|
+
flex-self(value)
|
|
232
|
+
// Function for aligning the flex elements (align-self)
|
|
233
|
+
if value == start or value == end
|
|
234
|
+
-webkit-align-self flex-+value
|
|
235
|
+
-ms-flex-item-align value
|
|
236
|
+
align-self flex-+value
|
|
237
|
+
else
|
|
238
|
+
-webkit-align-self value
|
|
239
|
+
-ms-flex-item-align value
|
|
240
|
+
align-self value
|
|
241
|
+
|
|
242
|
+
flex-justify(value)
|
|
243
|
+
// Implements the justify-content settings.
|
|
244
|
+
if value == start || value == end
|
|
245
|
+
-webkit-box-pack value
|
|
246
|
+
-moz-box-pack value
|
|
247
|
+
-webkit-justify-content flex-+value
|
|
248
|
+
-ms-flex-pack value
|
|
249
|
+
justify-content flex-+value
|
|
250
|
+
else if value == center
|
|
251
|
+
-webkit-box-pack value
|
|
252
|
+
-moz-box-pack value
|
|
253
|
+
-webkit-justify-content value
|
|
254
|
+
-ms-flex-pack value
|
|
255
|
+
justify-content value
|
|
256
|
+
else if value == space-between
|
|
257
|
+
-webkit-box-pack justify
|
|
258
|
+
-moz-box-pack justify
|
|
259
|
+
-webkit-justify-content value
|
|
260
|
+
-ms-flex-pack justify
|
|
261
|
+
justify-content value
|
|
262
|
+
else if value == space-around
|
|
263
|
+
-webkit-box-pack justify
|
|
264
|
+
-moz-box-pack justify
|
|
265
|
+
-webkit-justify-content value
|
|
266
|
+
-ms-flex-pack distribute
|
|
267
|
+
justify-content value
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
font-smoothing()
|
|
271
|
+
vendor(prop:'font-smoothing', only: webkit, vendor-property: true, args:arguments)
|
|
272
|
+
// G
|
|
273
|
+
|
|
274
|
+
// H
|
|
275
|
+
|
|
276
|
+
// I
|
|
277
|
+
|
|
278
|
+
// J
|
|
279
|
+
justify-content()
|
|
280
|
+
vendor(prop:'justify-content',only: null, vendor-property: true, args:arguments)
|
|
281
|
+
|
|
282
|
+
// K
|
|
283
|
+
|
|
284
|
+
// L
|
|
285
|
+
|
|
286
|
+
// M
|
|
287
|
+
|
|
288
|
+
// N
|
|
289
|
+
|
|
290
|
+
// O
|
|
291
|
+
|
|
292
|
+
opacity()
|
|
293
|
+
vendor(prop:'opacity', only: webkit moz official, vendor-property: true, args:arguments)
|
|
294
|
+
|
|
295
|
+
// P
|
|
296
|
+
print-color-adjust()
|
|
297
|
+
vendor(prop:'print-color-adjust',only: null, vendor-property: true, args:arguments)
|
|
298
|
+
|
|
299
|
+
// Q
|
|
300
|
+
|
|
301
|
+
// R
|
|
302
|
+
|
|
303
|
+
// S
|
|
304
|
+
|
|
305
|
+
// T
|
|
306
|
+
text-size-adjust()
|
|
307
|
+
vendor(prop:'text-size-adjust', only: null, vendor-property: true, args:arguments)
|
|
308
|
+
|
|
309
|
+
transition()
|
|
310
|
+
vendor(prop:'transition', only: null, vendor-property: true, args:arguments)
|
|
311
|
+
|
|
312
|
+
transition-property()
|
|
313
|
+
vendor(prop:'transition-property', only: null, vendor-property: true, args:arguments)
|
|
314
|
+
|
|
315
|
+
transition-duration()
|
|
316
|
+
vendor(prop:'transition-duration', only: null, vendor-property: true, args:arguments)
|
|
317
|
+
|
|
318
|
+
transition-timing-function()
|
|
319
|
+
vendor(prop:'transition-timing-function', only: null, vendor-property: true, args:arguments)
|
|
320
|
+
|
|
321
|
+
transition-delay()
|
|
322
|
+
vendor(prop:'transition-delay', only: null, vendor-property: true, args:arguments)
|
|
323
|
+
|
|
324
|
+
transform()
|
|
325
|
+
vendor(prop:'transform', only: null, vendor-property: true, args:arguments)
|
|
326
|
+
|
|
327
|
+
transform-origin()
|
|
328
|
+
vendor(prop:'transform-origin', only: null, vendor-property: true, args:arguments)
|
|
329
|
+
|
|
330
|
+
transform-style()
|
|
331
|
+
vendor(prop:'transform-style', only: null, vendor-property: true, args:arguments)
|
|
332
|
+
|
|
333
|
+
// U
|
|
334
|
+
user-select()
|
|
335
|
+
vendor(prop:'user-select', only: webkit moz ms official, vendor-property: true, args:arguments)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
// V
|
|
339
|
+
|
|
340
|
+
// W
|
|
341
|
+
|
|
342
|
+
// X
|
|
343
|
+
|
|
344
|
+
// Y
|
|
345
|
+
|
|
346
|
+
// Z
|
|
347
|
+
|
|
@@ -29,6 +29,9 @@ $color-google-green = #3AA757
|
|
|
29
29
|
$color-google-yellow = #FABB2D
|
|
30
30
|
$color-google-red = #E8453C
|
|
31
31
|
|
|
32
|
+
$color-read-bkg = #e0d8c8
|
|
33
|
+
$color-read-post = #f8f1e2
|
|
34
|
+
|
|
32
35
|
|
|
33
36
|
// common
|
|
34
37
|
$color-theme = convert(hexo-config('color_scheme.common.theme'))
|
|
@@ -62,8 +65,29 @@ $color-list-hl = convert(hexo-config('color_scheme.light.list_hl'))
|
|
|
62
65
|
$color-meta = convert(hexo-config('color_scheme.light.meta'))
|
|
63
66
|
|
|
64
67
|
// 深色配色方案在 darkmode.styl 中按需加载
|
|
68
|
+
$color-dark-site-body = convert(hexo-config('color_scheme.dark.site_bd')) // Dark Grey 1
|
|
69
|
+
$color-dark-read-bkg = convert(hexo-config('color_scheme.dark.site_bg'))
|
|
70
|
+
$color-dark-read-post = convert(hexo-config('color_scheme.dark.card'))
|
|
71
|
+
$color-dark-site-bg = convert(hexo-config('color_scheme.dark.site_bg')) // Dark Grey 2
|
|
72
|
+
$color-dark-site-inner = convert(hexo-config('color_scheme.dark.site_inner'))
|
|
73
|
+
$color-dark-site-footer = convert(hexo-config('color_scheme.dark.site_footer'))
|
|
74
|
+
$color-dark-card = convert(hexo-config('color_scheme.dark.card')) // Dark Grey 3
|
|
75
|
+
$color-dark-text = convert(hexo-config('color_scheme.dark.text'))
|
|
65
76
|
|
|
66
|
-
|
|
77
|
+
$color-dark-block = convert(hexo-config('color_scheme.dark.block')) // Dark Grey 4
|
|
78
|
+
$color-dark-codeblock = convert(hexo-config('color_scheme.dark.codeblock'))
|
|
79
|
+
$color-dark-inlinecode = convert(hexo-config('color_scheme.dark.inlinecode'))
|
|
80
|
+
$color-dark-h1 = convert(hexo-config('color_scheme.dark.h1'))
|
|
81
|
+
$color-dark-h2 = convert(hexo-config('color_scheme.dark.h2'))
|
|
82
|
+
$color-dark-h3 = convert(hexo-config('color_scheme.dark.h3'))
|
|
83
|
+
$color-dark-h4 = convert(hexo-config('color_scheme.dark.h4'))
|
|
84
|
+
$color-dark-h5 = convert(hexo-config('color_scheme.dark.h5'))
|
|
85
|
+
$color-dark-h6 = convert(hexo-config('color_scheme.dark.h6'))
|
|
86
|
+
$color-dark-p = convert(hexo-config('color_scheme.dark.p'))
|
|
87
|
+
$color-dark-list = convert(hexo-config('color_scheme.dark.list'))
|
|
88
|
+
$color-dark-list-hl = convert(hexo-config('color_scheme.dark.list_hl'))
|
|
89
|
+
$color-dark-meta = convert(hexo-config('color_scheme.dark.meta'))
|
|
90
|
+
$color-dark-link = convert(hexo-config('color_scheme.dark.meta'))
|
|
67
91
|
|
|
68
92
|
bgcolor($c, $mix = 10)
|
|
69
93
|
return mix($c, $color-card, $mix)
|
|
@@ -73,3 +97,19 @@ list_active()
|
|
|
73
97
|
list_hover()
|
|
74
98
|
color: var(--color-list-hl)
|
|
75
99
|
background: var(--color-site-bg)
|
|
100
|
+
|
|
101
|
+
// tag plugin from stellar : color
|
|
102
|
+
// 浅色页面
|
|
103
|
+
$c-site-bg-light = #f8f8f8
|
|
104
|
+
$c-block-light = #f2f2f2
|
|
105
|
+
$c-title-light = #000
|
|
106
|
+
$c-text-light = #222
|
|
107
|
+
$c-card-light = white
|
|
108
|
+
|
|
109
|
+
// 深色页面
|
|
110
|
+
$c-site-bg-dark = black
|
|
111
|
+
$c-block-dark = #111
|
|
112
|
+
$c-title-dark = #fff
|
|
113
|
+
$c-text-dark = #fff
|
|
114
|
+
$c-card-dark = #333
|
|
115
|
+
|
|
@@ -9,16 +9,3 @@ $boxshadow-dropmenu = 0 2px 4px 0px rgba(0, 0, 0, 0.08), 0 4px 8px 0px rgba(0, 0
|
|
|
9
9
|
|
|
10
10
|
$textshadow = 0 1px 2px 0px rgba(0, 0, 0, 0.1)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
.blur
|
|
14
|
-
@supports (backdrop-filter: blur(20px))
|
|
15
|
-
background: alpha($color-card, .9) !important
|
|
16
|
-
backdrop-filter: saturate(200%) blur(20px)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.shadow
|
|
20
|
-
box-shadow: $boxshadow-card
|
|
21
|
-
&.floatable
|
|
22
|
-
trans()
|
|
23
|
-
&:hover
|
|
24
|
-
box-shadow: $boxshadow-card-float
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
$fontfamily = "PingFang SC", "Microsoft YaHei", Helvetica, Arial, Menlo, Monaco, monospace, "Lucida Console", sans-serif
|
|
2
2
|
if hexo-config('custom_css.fontfamily.bodyfont')
|
|
3
|
-
if hexo-config('custom_css.fontfamily.bodyfont.name')
|
|
4
|
-
@font-face
|
|
5
|
-
font-family: hexo-config('custom_css.fontfamily.bodyfont.name')
|
|
6
|
-
src: url(hexo-config('custom_css.fontfamily.bodyfont.url'))
|
|
7
|
-
font-weight: hexo-config('custom_css.fontfamily.bodyfont.weight')
|
|
8
|
-
font-style: hexo-config('custom_css.fontfamily.bodyfont.style')
|
|
9
3
|
if hexo-config('custom_css.fontfamily.bodyfont.fontfamily')
|
|
10
4
|
$fontfamily = convert(hexo-config('custom_css.fontfamily.bodyfont.fontfamily')), Menlo, Monaco, monospace, sans-serif
|
|
11
5
|
|
|
12
6
|
|
|
13
7
|
$fontfamily-code = Menlo, Monaco, monospace, courier, sans-serif
|
|
14
8
|
if hexo-config('custom_css.fontfamily.codefont')
|
|
15
|
-
if hexo-config('custom_css.fontfamily.codefont.name')
|
|
16
|
-
@font-face
|
|
17
|
-
font-family: hexo-config('custom_css.fontfamily.codefont.name')
|
|
18
|
-
src: url(hexo-config('custom_css.fontfamily.codefont.url'))
|
|
19
|
-
font-weight: hexo-config('custom_css.fontfamily.codefont.weight')
|
|
20
|
-
font-style: hexo-config('custom_css.fontfamily.codefont.style')
|
|
21
9
|
if hexo-config('custom_css.fontfamily.codefont.fontfamily')
|
|
22
10
|
$fontfamily-code = convert(hexo-config('custom_css.fontfamily.codefont.fontfamily')), monospace, courier, sans-serif
|
|
23
11
|
|
|
@@ -25,12 +13,6 @@ if hexo-config('custom_css.fontfamily.codefont')
|
|
|
25
13
|
|
|
26
14
|
$fontfamily-logo = $fontfamily
|
|
27
15
|
if hexo-config('custom_css.fontfamily.logofont')
|
|
28
|
-
if hexo-config('custom_css.fontfamily.logofont.name')
|
|
29
|
-
@font-face
|
|
30
|
-
font-family: hexo-config('custom_css.fontfamily.logofont.name')
|
|
31
|
-
src: url(hexo-config('custom_css.fontfamily.logofont.url'))
|
|
32
|
-
font-weight: hexo-config('custom_css.fontfamily.logofont.weight')
|
|
33
|
-
font-style: hexo-config('custom_css.fontfamily.logofont.style')
|
|
34
16
|
if hexo-config('custom_css.fontfamily.logofont.fontfamily')
|
|
35
17
|
$fontfamily-logo = convert(hexo-config('custom_css.fontfamily.logofont.fontfamily')), Helvetica, monospace
|
|
36
18
|
|
|
@@ -56,3 +38,20 @@ $lineheight = hexo-config('custom_css.gap.line_height') || 1.7
|
|
|
56
38
|
$fontsize-large = 2.5rem
|
|
57
39
|
$fontsize-huge = 4rem
|
|
58
40
|
$fontsize-ultra = 6rem
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// font size
|
|
44
|
+
$fs-root = 16px
|
|
45
|
+
$fs-15 = .9375rem
|
|
46
|
+
$fs-14 = .875rem
|
|
47
|
+
$fs-13 = .8125rem
|
|
48
|
+
$fs-12 = .75rem
|
|
49
|
+
|
|
50
|
+
$fs-h1 = 2rem // 32px
|
|
51
|
+
$fs-h2 = 1.5rem // 24px
|
|
52
|
+
$fs-h3 = 1.375rem // 22px
|
|
53
|
+
$fs-h4 = 1.125rem // 18px
|
|
54
|
+
$fs-h5 = $fs-15
|
|
55
|
+
$fs-h6 = $fs-12
|
|
56
|
+
$fs-p = $fs-15
|
|
57
|
+
$fs-code = $fs-13
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
// 为1个属性设置动画
|
|
2
|
+
trans1($op, $time = 0.2s)
|
|
3
|
+
transition: $op $time ease-out
|
|
1
4
|
|
|
5
|
+
// 为2个属性设置动画
|
|
6
|
+
trans2($op1, $op2)
|
|
7
|
+
transition: $op1 0.2s ease-out, $op2 0.2s ease-out
|
|
8
|
+
|
|
9
|
+
trans2pro($op1, $t1, $op2, $t2)
|
|
10
|
+
transition: $op1 $t1 ease-out, $op2 $t2 ease-out
|
|
11
|
+
|
|
12
|
+
trans3($op1, $op2, $op3)
|
|
13
|
+
transition: $op1 0.2s ease-out, $op2 0.2s ease-out, $op3 0.2s ease-out
|
|
2
14
|
|
|
3
15
|
trans($time = 0.28s)
|
|
4
16
|
transition: all $time ease
|
|
5
|
-
-moz-transition: all $time ease
|
|
6
|
-
-webkit-transition: all $time ease
|
|
7
|
-
-o-transition: all $time ease
|
|
8
|
-
|
|
9
17
|
|
|
10
18
|
hoverable-card()
|
|
11
19
|
trans()
|
|
@@ -28,9 +36,6 @@ placeholder(rules)
|
|
|
28
36
|
rules()
|
|
29
37
|
|
|
30
38
|
disable-user-select()
|
|
31
|
-
-moz-user-select: none
|
|
32
|
-
-ms-user-select: none
|
|
33
|
-
-webkit-user-select: none
|
|
34
39
|
user-select: none
|
|
35
40
|
|
|
36
41
|
scrollbar($w = 4px, $b = 2px, $c = $color-theme, $h = $color-hover)
|
|
@@ -62,26 +67,3 @@ scrollbar-codeblock()
|
|
|
62
67
|
background: alpha($color-text, .5)
|
|
63
68
|
&:hover
|
|
64
69
|
background: $color-hover
|
|
65
|
-
|
|
66
|
-
dark()
|
|
67
|
-
--color-site-body: black
|
|
68
|
-
--color-site-bg: convert(hexo-config('color_scheme.dark.site_bg'))
|
|
69
|
-
--color-site-inner: convert(hexo-config('color_scheme.dark.site_inner'))
|
|
70
|
-
--color-site-footer: convert(hexo-config('color_scheme.dark.site_footer'))
|
|
71
|
-
--color-card: convert(hexo-config('color_scheme.dark.card'))
|
|
72
|
-
--color-text: convert(hexo-config('color_scheme.dark.text'))
|
|
73
|
-
|
|
74
|
-
--color-block: convert(hexo-config('color_scheme.dark.block'))
|
|
75
|
-
--color-codeblock: convert(hexo-config('color_scheme.dark.codeblock'))
|
|
76
|
-
--color-inlinecode: convert(hexo-config('color_scheme.dark.inlinecode'))
|
|
77
|
-
--color-h1: convert(hexo-config('color_scheme.dark.h1'))
|
|
78
|
-
--color-h2: convert(hexo-config('color_scheme.dark.h2'))
|
|
79
|
-
--color-h3: convert(hexo-config('color_scheme.dark.h3'))
|
|
80
|
-
--color-h4: convert(hexo-config('color_scheme.dark.h4'))
|
|
81
|
-
--color-h5: convert(hexo-config('color_scheme.dark.h5'))
|
|
82
|
-
--color-h6: convert(hexo-config('color_scheme.dark.h6'))
|
|
83
|
-
--color-p: convert(hexo-config('color_scheme.dark.p'))
|
|
84
|
-
--color-list: convert(hexo-config('color_scheme.dark.list'))
|
|
85
|
-
--color-list-hl: convert(hexo-config('color_scheme.dark.list_hl'))
|
|
86
|
-
--color-meta: convert(hexo-config('color_scheme.dark.meta'))
|
|
87
|
-
--color-link: convert(hexo-config('color_scheme.dark.meta'))
|