hexo-theme-solitude 1.1.0 → 1.2.1
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/LICENSE +674 -19
- package/README.md +56 -19
- package/README_EN.md +98 -0
- package/_config.yml +274 -224
- package/languages/en-US.yml +1 -0
- package/languages/zh-CN.yml +8 -8
- package/layout/404.pug +24 -0
- package/layout/archive.pug +11 -0
- package/layout/category.pug +16 -0
- package/layout/includes/console.pug +42 -0
- package/layout/includes/footer.pug +71 -0
- package/layout/includes/head/config.pug +79 -0
- package/layout/includes/head/pwa.pug +59 -0
- package/layout/includes/head.pug +29 -0
- package/layout/includes/header.pug +4 -0
- package/layout/includes/inject/body.pug +68 -0
- package/layout/{partial/compoment/inject/head.ejs → includes/inject/head.pug} +60 -37
- package/layout/includes/layout.pug +35 -0
- package/layout/{partial/loading.ejs → includes/loading.pug} +19 -17
- package/layout/includes/mixins/articleSort.pug +14 -0
- package/layout/includes/mixins/pagination.pug +8 -0
- package/layout/includes/nav.pug +22 -0
- package/layout/includes/page/about.pug +10 -0
- package/layout/includes/page/categories.pug +8 -0
- package/layout/includes/page/default.pug +2 -0
- package/layout/includes/page/echarts.pug +7 -0
- package/layout/includes/page/equipment.pug +3 -0
- package/layout/includes/page/links.pug +35 -0
- package/layout/includes/page/moments.pug +5 -0
- package/layout/includes/page/rss.pug +22 -0
- package/layout/includes/page/says.pug +20 -0
- package/layout/includes/page/tags.pug +8 -0
- package/layout/includes/page/tlink.pug +9 -0
- package/layout/includes/recent-posts.pug +9 -0
- package/layout/includes/sidebar.pug +17 -0
- package/layout/includes/widgets/aside/aside.pug +18 -0
- package/layout/includes/widgets/aside/asideAllInfo.pug +8 -0
- package/layout/includes/widgets/aside/asideArchive.pug +9 -0
- package/layout/includes/widgets/aside/asideFlipCard.pug +5 -0
- package/layout/includes/widgets/aside/asideHistory.pug +8 -0
- package/layout/includes/widgets/aside/asideInfoCard.pug +22 -0
- package/layout/includes/widgets/aside/asideNewestPost.pug +16 -0
- package/layout/includes/widgets/aside/asidePower.pug +19 -0
- package/layout/includes/widgets/aside/asideSwitch.pug +26 -0
- package/layout/includes/widgets/aside/asideTag.pug +11 -0
- package/layout/includes/widgets/aside/asideToc.pug +5 -0
- package/layout/includes/widgets/aside/asideWebInfo.pug +40 -0
- package/layout/includes/widgets/aside/asideWelcome.pug +12 -0
- package/layout/includes/widgets/home/banner.pug +16 -0
- package/layout/includes/widgets/home/bbTimeList.pug +8 -0
- package/layout/includes/widgets/home/categoryBar.pug +10 -0
- package/layout/includes/widgets/home/categoryGroup.pug +9 -0
- package/layout/includes/widgets/home/hometop.pug +9 -0
- package/layout/includes/widgets/home/postList.pug +26 -0
- package/layout/includes/widgets/home/rencentPost.pug +26 -0
- package/layout/includes/widgets/home/topGroup.pug +27 -0
- package/layout/includes/widgets/nav/left.pug +10 -0
- package/layout/includes/widgets/nav/menu.pug +16 -0
- package/layout/includes/widgets/nav/right.pug +23 -0
- package/layout/includes/widgets/page/about/authorinfo.pug +12 -0
- package/layout/includes/widgets/page/about/award.pug +34 -0
- package/layout/includes/widgets/page/about/contentinfo.pug +38 -0
- package/layout/includes/widgets/page/about/hobbies.pug +33 -0
- package/layout/includes/widgets/page/about/motto.pug +19 -0
- package/layout/includes/widgets/page/about/other.pug +61 -0
- package/layout/includes/widgets/page/about/personalities.pug +16 -0
- package/layout/includes/widgets/page/about/skillsinfo.pug +41 -0
- package/layout/includes/widgets/page/banner.pug +14 -0
- package/layout/includes/widgets/page/equipment/content.pug +23 -0
- package/layout/includes/widgets/page/links/banner.pug +30 -0
- package/layout/includes/widgets/page/links/linksCard.pug +18 -0
- package/layout/includes/widgets/page/links/linksItem.pug +14 -0
- package/layout/includes/widgets/page/moments/angle.pug +24 -0
- package/layout/includes/widgets/page/moments/index.pug +18 -0
- package/layout/includes/widgets/page/says/saysBottom.pug +11 -0
- package/layout/includes/widgets/page/says/saysContent.pug +6 -0
- package/layout/includes/widgets/page/says/saysFunction.pug +10 -0
- package/layout/includes/widgets/page/says/saysMeta.pug +7 -0
- package/layout/includes/widgets/post/award.pug +48 -0
- package/layout/includes/widgets/post/copyright.pug +27 -0
- package/layout/includes/widgets/post/postMeta.pug +55 -0
- package/layout/includes/widgets/post/postNav.pug +25 -0
- package/layout/includes/widgets/post/wave.pug +9 -0
- package/layout/includes/widgets/randomlink.pug +32 -0
- package/layout/includes/widgets/rightside/index.pug +74 -0
- package/layout/includes/widgets/third-party/comments/comment.pug +14 -0
- package/layout/includes/widgets/third-party/comments/gitalk.pug +0 -0
- package/layout/{partial/compoment/third-party/comments/twikoo.ejs → includes/widgets/third-party/comments/twikoo.pug} +8 -9
- package/layout/includes/widgets/third-party/comments/valine.pug +0 -0
- package/layout/includes/widgets/third-party/music.pug +3 -0
- package/layout/includes/widgets/third-party/pjax.pug +30 -0
- package/layout/includes/widgets/third-party/search/algolia-search.pug +16 -0
- package/layout/includes/widgets/third-party/search/index.pug +7 -0
- package/layout/includes/widgets/third-party/search/local-search.pug +15 -0
- package/layout/index.pug +20 -0
- package/layout/page.pug +32 -0
- package/layout/post.pug +43 -0
- package/layout/tag.pug +19 -0
- package/package.json +3 -3
- package/scripts/event/page.js +20 -2
- package/scripts/filter/checkThemeConfig.js +0 -1
- package/scripts/filter/randomPosts.js +0 -1
- package/scripts/helper/{charts.js → echarts.js} +21 -11
- package/scripts/helper/related_post.js +10 -3
- package/scripts/helper/stylus.js +23 -0
- package/scripts/tags/bvideo.js +1 -36
- package/scripts/tags/fold.js +2 -3
- package/scripts/tags/note.js +6 -2
- package/scripts/tags/tabs.js +1 -1
- package/source/css/_comment/index.styl +121 -0
- package/source/css/_comment/twikoo.styl +515 -0
- package/source/css/_extra/console.styl +354 -0
- package/source/css/_extra/rightmenu.styl +83 -0
- package/source/css/_global/animation.css +756 -0
- package/source/css/_global/function.styl +83 -0
- package/source/css/_global/index.styl +120 -0
- package/source/css/_global/var.styl +1 -0
- package/source/css/_layout/articleSort.styl +199 -0
- package/source/css/_layout/base.styl +392 -0
- package/source/css/_layout/footer.styl +359 -0
- package/source/css/_layout/header.styl +1331 -0
- package/source/css/_layout/index.styl +293 -0
- package/source/css/_layout/sidebar.styl +226 -0
- package/source/css/_mode/index.styl +52 -0
- package/source/css/_page/about.styl +944 -0
- package/source/css/_page/category.styl +141 -0
- package/source/css/_page/equipment.styl +108 -0
- package/source/css/_page/error.styl +161 -0
- package/source/css/_page/home.styl +58 -0
- package/source/css/_page/homeTop.styl +1035 -0
- package/source/css/_page/index.styl +22 -0
- package/source/css/_page/link.styl +433 -0
- package/source/css/_page/moment.styl +186 -0
- package/source/css/_page/rss.styl +87 -0
- package/source/css/_page/says.styl +353 -0
- package/source/css/_page/tag.styl +56 -0
- package/source/css/_post/commentBarrage.styl +149 -0
- package/source/css/_post/externalTags.styl +694 -0
- package/source/css/_post/highlight.styl +96 -0
- package/source/css/_post/index.styl +935 -0
- package/source/css/_post/pagination.styl +467 -0
- package/source/css/_post/postContent.styl +957 -0
- package/source/css/_post/relatedPost.styl +160 -0
- package/source/css/_post/reward.styl +217 -0
- package/source/css/_search/algolia-search.styl +206 -0
- package/source/css/_search/local-search.styl +112 -0
- package/source/css/_widgets/aside/allinfo.styl +134 -0
- package/source/css/_widgets/aside/flip.styl +68 -0
- package/source/css/_widgets/aside/history.styl +35 -0
- package/source/css/_widgets/aside/index.styl +156 -0
- package/source/css/_widgets/aside/info.styl +263 -0
- package/source/css/_widgets/aside/newPost.styl +55 -0
- package/source/css/_widgets/aside/power.styl +90 -0
- package/source/css/_widgets/aside/toc.styl +85 -0
- package/source/css/_widgets/aside/welcome.styl +14 -0
- package/source/css/_widgets/index.styl +3 -0
- package/source/css/index.styl +40 -0
- package/source/img/default.png +0 -0
- package/source/img/logo-horizontal_version.png +0 -0
- package/source/img/pwa/16.png +0 -0
- package/source/img/pwa/180.png +0 -0
- package/source/img/pwa/192.png +0 -0
- package/source/img/pwa/32.png +0 -0
- package/source/img/pwa/512.png +0 -0
- package/source/img/pwa/logo.png +0 -0
- package/source/img/pwa/siteicon/splash-1125x2436.png +0 -0
- package/source/img/pwa/siteicon/splash-1136x640.png +0 -0
- package/source/img/pwa/siteicon/splash-1170x2532.png +0 -0
- package/source/img/pwa/siteicon/splash-1179x2556.png +0 -0
- package/source/img/pwa/siteicon/splash-1242x2208.png +0 -0
- package/source/img/pwa/siteicon/splash-1242x2688.png +0 -0
- package/source/img/pwa/siteicon/splash-1248x2778.png +0 -0
- package/source/img/pwa/siteicon/splash-1290x2796.png +0 -0
- package/source/img/pwa/siteicon/splash-1334x750.png +0 -0
- package/source/img/pwa/siteicon/splash-1536x2048.png +0 -0
- package/source/img/pwa/siteicon/splash-1620x2160.png +0 -0
- package/source/img/pwa/siteicon/splash-1668x2224.png +0 -0
- package/source/img/pwa/siteicon/splash-1668x2388.png +0 -0
- package/source/img/pwa/siteicon/splash-1792x828.png +0 -0
- package/source/img/pwa/siteicon/splash-2048x1536.png +0 -0
- package/source/img/pwa/siteicon/splash-2048x2732.png +0 -0
- package/source/img/pwa/siteicon/splash-2160x1620.png +0 -0
- package/source/img/pwa/siteicon/splash-2208x1242.png +0 -0
- package/source/img/pwa/siteicon/splash-2224x1668.png +0 -0
- package/source/img/pwa/siteicon/splash-2388x1668.png +0 -0
- package/source/img/pwa/siteicon/splash-2436x1125.png +0 -0
- package/source/img/pwa/siteicon/splash-2532x1170.png +0 -0
- package/source/img/pwa/siteicon/splash-2556x1179.png +0 -0
- package/source/img/pwa/siteicon/splash-2688x1242.png +0 -0
- package/source/img/pwa/siteicon/splash-2732x2048.png +0 -0
- package/source/img/pwa/siteicon/splash-2778x1248.png +0 -0
- package/source/img/pwa/siteicon/splash-2796x1290.png +0 -0
- package/source/img/pwa/siteicon/splash-640x1136.png +0 -0
- package/source/img/pwa/siteicon/splash-750x1334.png +0 -0
- package/source/img/pwa/siteicon/splash-828x1792.png +0 -0
- package/source/img/solitude-show.jpg +0 -0
- package/source/js/commentBarrage.js +8 -5
- package/source/js/extend/console/comment.js +60 -63
- package/source/js/extend/covercolor/local.js +105 -95
- package/source/js/extend/search/algolia-search.js +104 -111
- package/source/js/extend/search/local-search.js +7 -7
- package/source/js/main.js +673 -520
- package/source/js/utils.js +131 -137
- package/source/lib/chuckle-post-ai.js +1 -1
- package/layout/404.ejs +0 -34
- package/layout/archive.ejs +0 -10
- package/layout/category.ejs +0 -18
- package/layout/index.ejs +0 -20
- package/layout/layout.ejs +0 -30
- package/layout/page/about.ejs +0 -13
- package/layout/page/categories.ejs +0 -12
- package/layout/page/circle.ejs +0 -5
- package/layout/page/echarts.ejs +0 -14
- package/layout/page/equipment.ejs +0 -2
- package/layout/page/links.ejs +0 -46
- package/layout/page/page.ejs +0 -3
- package/layout/page/rss.ejs +0 -37
- package/layout/page/says.ejs +0 -17
- package/layout/page/tags.ejs +0 -12
- package/layout/page/tlink.ejs +0 -11
- package/layout/page.ejs +0 -45
- package/layout/partial/body.ejs +0 -7
- package/layout/partial/compoment/about/authorinfo.ejs +0 -18
- package/layout/partial/compoment/about/award.ejs +0 -59
- package/layout/partial/compoment/about/contentinfo.ejs +0 -33
- package/layout/partial/compoment/about/hobbies.ejs +0 -53
- package/layout/partial/compoment/about/motto.ejs +0 -17
- package/layout/partial/compoment/about/other.ejs +0 -76
- package/layout/partial/compoment/about/personalities.ejs +0 -11
- package/layout/partial/compoment/about/skillsinfo.ejs +0 -62
- package/layout/partial/compoment/aside/aside.ejs +0 -28
- package/layout/partial/compoment/aside/asideAllInfo.ejs +0 -6
- package/layout/partial/compoment/aside/asideArchive.ejs +0 -11
- package/layout/partial/compoment/aside/asideFlipCard.ejs +0 -72
- package/layout/partial/compoment/aside/asideHistory.ejs +0 -49
- package/layout/partial/compoment/aside/asideInfoCard.ejs +0 -39
- package/layout/partial/compoment/aside/asideNewestPost.ejs +0 -31
- package/layout/partial/compoment/aside/asidePower.ejs +0 -31
- package/layout/partial/compoment/aside/asideSwitch.ejs +0 -41
- package/layout/partial/compoment/aside/asideTag.ejs +0 -5
- package/layout/partial/compoment/aside/asideToc.ejs +0 -11
- package/layout/partial/compoment/aside/asideWebInfo.ejs +0 -60
- package/layout/partial/compoment/aside/asideWelcome.ejs +0 -33
- package/layout/partial/compoment/circle/angle.ejs +0 -26
- package/layout/partial/compoment/circle/banner.ejs +0 -11
- package/layout/partial/compoment/circle/content.ejs +0 -19
- package/layout/partial/compoment/dorakika/rightmenu.ejs +0 -100
- package/layout/partial/compoment/equipment/list.ejs +0 -37
- package/layout/partial/compoment/home/homeCategoryBar.ejs +0 -11
- package/layout/partial/compoment/home/postList.ejs +0 -37
- package/layout/partial/compoment/hometop/bbTimeList.ejs +0 -15
- package/layout/partial/compoment/hometop/categoryGroup.ejs +0 -19
- package/layout/partial/compoment/hometop/groupTag.ejs +0 -30
- package/layout/partial/compoment/hometop/topGroup.ejs +0 -41
- package/layout/partial/compoment/inject/body.ejs +0 -72
- package/layout/partial/compoment/links/angle.ejs +0 -26
- package/layout/partial/compoment/links/banner.ejs +0 -42
- package/layout/partial/compoment/links/linksCard.ejs +0 -27
- package/layout/partial/compoment/links/linksItem.ejs +0 -21
- package/layout/partial/compoment/mixins/articleSort.ejs +0 -26
- package/layout/partial/compoment/mixins/pagination.ejs +0 -11
- package/layout/partial/compoment/nav/left.ejs +0 -22
- package/layout/partial/compoment/nav/menu.ejs +0 -25
- package/layout/partial/compoment/nav/right.ejs +0 -42
- package/layout/partial/compoment/post/award.ejs +0 -52
- package/layout/partial/compoment/post/copyright.ejs +0 -37
- package/layout/partial/compoment/post/postMeta.ejs +0 -83
- package/layout/partial/compoment/post/postNav.ejs +0 -41
- package/layout/partial/compoment/post/wave.ejs +0 -14
- package/layout/partial/compoment/says/banner.ejs +0 -10
- package/layout/partial/compoment/says/saysBottom.ejs +0 -18
- package/layout/partial/compoment/says/saysContent.ejs +0 -10
- package/layout/partial/compoment/says/saysFunction.ejs +0 -15
- package/layout/partial/compoment/third-party/comments/comment.ejs +0 -12
- package/layout/partial/compoment/third-party/comments/twikoo_k.ejs +0 -29
- package/layout/partial/compoment/third-party/music.ejs +0 -5
- package/layout/partial/compoment/third-party/pjax.ejs +0 -31
- package/layout/partial/compoment/third-party/search/algolia-search.ejs +0 -20
- package/layout/partial/compoment/third-party/search/index.ejs +0 -10
- package/layout/partial/compoment/third-party/search/local-search.ejs +0 -22
- package/layout/partial/compoment/tlink/banner.ejs +0 -10
- package/layout/partial/console.ejs +0 -68
- package/layout/partial/footer.ejs +0 -104
- package/layout/partial/head.ejs +0 -37
- package/layout/partial/header.ejs +0 -6
- package/layout/partial/hometop.ejs +0 -15
- package/layout/partial/nav.ejs +0 -34
- package/layout/partial/pwa.ejs +0 -40
- package/layout/partial/sidebar.ejs +0 -31
- package/layout/post.ejs +0 -52
- package/layout/tag.ejs +0 -19
- package/scripts/filter/katex.js +0 -25
- package/scripts/helper/randomLinks.js +0 -16
- package/scripts/helper/themeJsExport.js +0 -79
- package/scripts/tags/expand.js +0 -4
- package/scripts/tags/hide.js +0 -70
- package/source/css/commentBarrage.css +0 -174
- package/source/css/custom.css +0 -901
- package/source/css/main.css +0 -16420
- package/source/css/search/algolia-search.css +0 -141
- package/source/css/search/local-search.css +0 -138
- package/source/css/var.css +0 -189
- package/source/js/extend/covercolor/web.js +0 -137
- /package/source/js/{rightmenu.js → rightside.js} +0 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
- var datalinks = []
|
2
|
+
- var data = site.data.links.links
|
3
|
+
if(data)
|
4
|
+
each item in data
|
5
|
+
if item.type === "item"
|
6
|
+
each y in item.link_list
|
7
|
+
- datalinks.push({ name: y.name,link: y.link})
|
8
|
+
|
9
|
+
script.
|
10
|
+
const links = !{JSON.stringify(datalinks)}
|
11
|
+
function travelling() {
|
12
|
+
const link = links[utils.randomNum(links.length)];
|
13
|
+
utils.snackbarShow('您即将前往 ⌈ ' + link.name + ' ⌋ , 安全性未知', false, 3000);
|
14
|
+
setTimeout(() => {
|
15
|
+
window.open(link.link, "_blank")
|
16
|
+
}, 3000)
|
17
|
+
}
|
18
|
+
|
19
|
+
if theme.footer.randomlink
|
20
|
+
script.
|
21
|
+
function randomLinksList(){
|
22
|
+
let data='';
|
23
|
+
let linksCopy = [...links];
|
24
|
+
let count = Math.min(3, linksCopy.length);
|
25
|
+
for (let i = 0; i < count; i++) {
|
26
|
+
let index = utils.randomNum(linksCopy.length);
|
27
|
+
const link = linksCopy[index];
|
28
|
+
data += '<a class="footer-item" href="' + link.link + '" target="_blank" rel="noopener nofollow">' + link.name + '</a>';
|
29
|
+
linksCopy.splice(index, 1);
|
30
|
+
}
|
31
|
+
document.getElementById('friend-links-in-footer').innerHTML = data + '<a class="footer-item" href="/links/">更多</a>';
|
32
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
div#rightMenu
|
2
|
+
div.rightMenu-group.rightMenu-small
|
3
|
+
div.rightMenu-item#menu-backward
|
4
|
+
i.scoicon.sco-arrow-left-line
|
5
|
+
div.rightMenu-item#menu-forward
|
6
|
+
i.scoicon.sco-arrow-right-line
|
7
|
+
div.rightMenu-item#menu-refresh
|
8
|
+
i.scoicon.sco-restart-line(style="font-size: 19px;")
|
9
|
+
div.rightMenu-item#menu-top
|
10
|
+
i.scoicon.sco-arrow-up-line
|
11
|
+
div.rightMenu-group.rightMenu-line.rightMenuPlugin
|
12
|
+
div.rightMenu-item#menu-copytext
|
13
|
+
i.scoicon.sco-copy-fill
|
14
|
+
span 复制选中文本
|
15
|
+
div.rightMenu-item#menu-pastetext
|
16
|
+
i.scoicon.sco-clipboard-fill
|
17
|
+
span 粘贴文本
|
18
|
+
a.rightMenu-item#menu-commenttext(data-pjax-state="")
|
19
|
+
i.scoicon.sco-chat-new-fill
|
20
|
+
span 引用到评论
|
21
|
+
div.rightMenu-item#menu-newwindow
|
22
|
+
i.scoicon.sco-window-fill
|
23
|
+
span 新窗口打开
|
24
|
+
div.rightMenu-item#menu-copylink
|
25
|
+
i.scoicon.sco-link-line
|
26
|
+
span 复制链接地址
|
27
|
+
div.rightMenu-item#menu-copyimg
|
28
|
+
i.scoicon.sco-copy-fill
|
29
|
+
span 复制此图片
|
30
|
+
div.rightMenu-item#menu-downloadimg
|
31
|
+
i.scoicon.sco-download-cloud-fill
|
32
|
+
span 下载此图片
|
33
|
+
div.rightMenu-item#menu-search
|
34
|
+
i.scoicon.sco-search-line
|
35
|
+
span 站内搜索
|
36
|
+
div.rightMenu-item#menu-searchBaidu
|
37
|
+
i.scoicon.sco-baidu-fill
|
38
|
+
span 百度搜索
|
39
|
+
div.rightMenu-item#menu-music-toggle
|
40
|
+
i.scoicon.sco-play-fill
|
41
|
+
span 播放音乐
|
42
|
+
div.rightMenu-item#menu-music-back
|
43
|
+
i.scoicon.sco-skip-back-fill
|
44
|
+
span 切换到上一首
|
45
|
+
div.rightMenu-item#menu-music-forward
|
46
|
+
i.scoicon.sco-skip-forward-fill
|
47
|
+
span 切换到下一首
|
48
|
+
div.rightMenu-item#menu-music-playlist(onclick=`window.open('${theme.thirdparty.aplayer.server === 'tencent' ? `https://y.qq.com/n/ryqq/playlist/${theme.thirdparty.aplayer.id}` : `https://music.163.com/#/playlist?id=${theme.thirdparty.aplayer.id}`}', '_blank');`)
|
49
|
+
i.scoicon.sco-play-list-2-line
|
50
|
+
span 查看所有歌曲
|
51
|
+
div.rightMenu-item#menu-music-copyMusicName
|
52
|
+
i.scoicon.sco-copy-fill
|
53
|
+
span 复制歌名
|
54
|
+
div.rightMenu-group.rightMenu-line.rightMenuOther
|
55
|
+
a.rightMenu-item.menu-Link#menu-randomPost(data-pjax-state="")
|
56
|
+
i.scoicon.sco-signal-tower-fill
|
57
|
+
span 随便逛逛
|
58
|
+
a.rightMenu-item.menu-link(href="/categories/", data-pjax-state="")
|
59
|
+
i.scoicon.sco-checkbox-multiple-blank-fill
|
60
|
+
span 博客分类
|
61
|
+
a.rightMenu-item.menu-link(href="/tags/", data-pjax-state="")
|
62
|
+
i.scoicon.sco-price-tag-fill
|
63
|
+
span 文章标签
|
64
|
+
div.rightMenu-group.rightMenu-line.rightMenuOther
|
65
|
+
div.rightMenu-item#menu-copy
|
66
|
+
i.scoicon.sco-external-link-fill
|
67
|
+
span 复制地址
|
68
|
+
div.rightMenu-item#menu-commentBarrage
|
69
|
+
i.scoicon.sco-chat-fill
|
70
|
+
span.menu-commentBarrage-text 关闭热评
|
71
|
+
div.rightMenu-item#menu-darkmode
|
72
|
+
i.scoicon.sco-moon-clear-fill
|
73
|
+
span.menu-darkmode-text 浅色模式
|
74
|
+
div#rightmenu-mask
|
@@ -0,0 +1,14 @@
|
|
1
|
+
div#post-comment(view-image)
|
2
|
+
.comment-head
|
3
|
+
.comment-headline
|
4
|
+
i.scoicon.sco-chat-fill
|
5
|
+
span 评论
|
6
|
+
.comment-wrap
|
7
|
+
#comment
|
8
|
+
case theme.comment.type
|
9
|
+
when 'twikoo'
|
10
|
+
include ./twikoo.pug
|
11
|
+
when 'gitalk'
|
12
|
+
include ./gitalk.pug
|
13
|
+
when 'valine'
|
14
|
+
include ./valine.pug
|
File without changes
|
@@ -1,19 +1,19 @@
|
|
1
|
-
|
1
|
+
script.
|
2
2
|
async function initComment(){
|
3
3
|
var initOptions = Object.assign(
|
4
|
-
|
4
|
+
!{JSON.stringify(theme.comment.twikoo || {})},
|
5
5
|
{
|
6
6
|
el: '#comment',
|
7
7
|
onCommentLoaded: function() {
|
8
|
-
|
8
|
+
GLOBAL_CONFIG.lightbox && sco.lightbox('#article-container img, #twikoo .tk-content img:not(.tk-owo-emotion)')
|
9
9
|
},
|
10
|
-
lang: '
|
10
|
+
lang: '#{theme.comment.twikoo.lang}',
|
11
11
|
}
|
12
12
|
)
|
13
13
|
await twikoo.init(initOptions)
|
14
|
-
|
14
|
+
if (#{theme.post.meta.comment && is_post()}) {
|
15
15
|
var countOptions = Object.assign(
|
16
|
-
|
16
|
+
!{JSON.stringify(theme.comment.twikoo || {})},
|
17
17
|
{
|
18
18
|
urls: [window.location.pathname],
|
19
19
|
includeReply: false
|
@@ -25,6 +25,5 @@
|
|
25
25
|
}catch (e) {
|
26
26
|
document.getElementById('twikoo-count').innerText = '加载错误'
|
27
27
|
}
|
28
|
-
|
29
|
-
}
|
30
|
-
</script>
|
28
|
+
}
|
29
|
+
}
|
File without changes
|
@@ -0,0 +1,3 @@
|
|
1
|
+
div.needEndHide#nav-music(onclick="sco.musicToggle()")
|
2
|
+
div#nav-music-hoverTips= "音乐已暂停"
|
3
|
+
meting-js(id=theme.thirdparty.aplayer.id, server=theme.thirdparty.aplayer.server, type="playlist", mutex="true", preload="none", data-lrctype="0", order="random", theme="var(--sco-main)")
|
@@ -0,0 +1,30 @@
|
|
1
|
+
script.
|
2
|
+
let pjaxSelectors = [
|
3
|
+
'title',
|
4
|
+
'#body-wrap',
|
5
|
+
'#site-config',
|
6
|
+
'meta[name="description"]',
|
7
|
+
'#js-pjax'
|
8
|
+
]
|
9
|
+
|
10
|
+
const pjax = new Pjax({
|
11
|
+
elements: 'a:not([target="_blank"])',
|
12
|
+
selectors: pjaxSelectors,
|
13
|
+
cacheBust: false,
|
14
|
+
analytics: false,
|
15
|
+
scrollRestoration: false
|
16
|
+
})
|
17
|
+
|
18
|
+
document.querySelectorAll('script[data-pjax]').forEach(item => {
|
19
|
+
const newScript = document.createElement('script')
|
20
|
+
const content = item.text || item.textContent || item.innerHTML || ""
|
21
|
+
Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
|
22
|
+
newScript.appendChild(document.createTextNode(content))
|
23
|
+
item.parentNode.replaceChild(newScript, item)
|
24
|
+
})
|
25
|
+
|
26
|
+
document.addEventListener('pjax:error', (e) => {
|
27
|
+
if (e.request.status === 404) {
|
28
|
+
pjax.loadUrl('/404.html')
|
29
|
+
}
|
30
|
+
})
|
@@ -0,0 +1,16 @@
|
|
1
|
+
div#algolia-search
|
2
|
+
div.search-dialog
|
3
|
+
div.search-dialog__title#algolia-search-title= "搜索"
|
4
|
+
div#algolia-input-panel
|
5
|
+
div#algolia-search-input
|
6
|
+
div#search-results
|
7
|
+
div#algolia-hits
|
8
|
+
div#algolia-pagination
|
9
|
+
div#algolia-stats
|
10
|
+
div.algolia-poweredBy
|
11
|
+
div#algolia-tips
|
12
|
+
i.scoicon.sco-algolia-fill
|
13
|
+
span.algolia-tips-text= "Algolia 提供搜索服务"
|
14
|
+
span.search-close-button
|
15
|
+
i.scoicon.sco-close-fill
|
16
|
+
div#search-mask
|
@@ -0,0 +1,7 @@
|
|
1
|
+
if theme.thirdparty.search.enable
|
2
|
+
if theme.thirdparty.search.type==="algolia"
|
3
|
+
include ./algolia-search.pug
|
4
|
+
script(src="/js/extend/search/algolia-search.js")
|
5
|
+
else if theme.thirdparty.search.type === "local"
|
6
|
+
include ./local-search.pug
|
7
|
+
script(src="/js/extend/search/local-search.js")
|
@@ -0,0 +1,15 @@
|
|
1
|
+
div#local-search
|
2
|
+
div.search-dialog
|
3
|
+
nav.search-nav
|
4
|
+
span.search-dialog-title 搜索
|
5
|
+
button.search-close-button
|
6
|
+
i.scoicon.sco-close-fill
|
7
|
+
div#loading-database
|
8
|
+
i.scoicon.sco-loading-line
|
9
|
+
span 加载中
|
10
|
+
div.search-wrap
|
11
|
+
div.search-box
|
12
|
+
input.search-box-input(type="text", id="search-input", autocomplete="off", spellcheck="false", autocorrect="off", autocapitalize="off", placeholder=__('search.placeholder'))
|
13
|
+
div#loading-status
|
14
|
+
div#search-results
|
15
|
+
div#search-mask
|
package/layout/index.pug
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
extends includes/layout.pug
|
2
|
+
|
3
|
+
block content
|
4
|
+
div#home_top
|
5
|
+
if(theme.says.home_mini)
|
6
|
+
include ./includes/widgets/home/bbTimeList.pug
|
7
|
+
if(theme.hometop.banner.enable)
|
8
|
+
include ./includes/widgets/home/hometop.pug
|
9
|
+
main(class="layout", id="content-inner")
|
10
|
+
div(class="recent-posts", id="recent-posts")
|
11
|
+
div#category-bar
|
12
|
+
include ./includes/widgets/home/categoryBar.pug
|
13
|
+
|
14
|
+
include ./includes/widgets/home/postList.pug
|
15
|
+
|
16
|
+
// pageination
|
17
|
+
include ./includes/mixins/pagination.pug
|
18
|
+
|
19
|
+
// aside
|
20
|
+
include ./includes/widgets/aside/aside.pug
|
package/layout/page.pug
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
extends includes/layout.pug
|
2
|
+
|
3
|
+
block content
|
4
|
+
main.layout(class=page.aside ? '' : 'hide-aside', id='content-inner')
|
5
|
+
div#page
|
6
|
+
case page.type
|
7
|
+
when 'categories'
|
8
|
+
include includes/page/categories
|
9
|
+
when 'tags'
|
10
|
+
include includes/page/tags
|
11
|
+
when 'links'
|
12
|
+
include includes/page/links
|
13
|
+
when 'tlink'
|
14
|
+
include includes/page/tlink
|
15
|
+
when 'about'
|
16
|
+
include includes/page/about
|
17
|
+
when 'says'
|
18
|
+
include includes/page/says
|
19
|
+
when 'equipment'
|
20
|
+
include includes/page/equipment
|
21
|
+
when 'moments'
|
22
|
+
include includes/page/moments
|
23
|
+
when 'echarts'
|
24
|
+
include includes/page/echarts
|
25
|
+
when 'rss'
|
26
|
+
include includes/page/rss
|
27
|
+
default
|
28
|
+
include includes/page/default
|
29
|
+
if page.comment
|
30
|
+
include includes/widgets/third-party/comments/comment
|
31
|
+
if page.aside
|
32
|
+
include includes/widgets/aside/aside
|
package/layout/post.pug
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
extends includes/layout.pug
|
2
|
+
|
3
|
+
block content
|
4
|
+
main.layout#content-inner
|
5
|
+
#post
|
6
|
+
article.post-content#article-container!= page.content
|
7
|
+
include includes/widgets/post/copyright
|
8
|
+
.post-tools-right
|
9
|
+
.tag_share
|
10
|
+
.post-meta__tag-list
|
11
|
+
each data in page.tags.data
|
12
|
+
a(href=url_for(data.path)).post-meta__tags
|
13
|
+
span.tags-punctuation
|
14
|
+
| #{data.name}
|
15
|
+
span.tagsPageCount #{data.length}
|
16
|
+
if site.posts.length > 1
|
17
|
+
include includes/widgets/post/postNav
|
18
|
+
!= related_posts(page, site.posts)
|
19
|
+
if page.comment
|
20
|
+
include includes/widgets/third-party/comments/comment
|
21
|
+
include includes/widgets/aside/aside
|
22
|
+
if theme.thirdparty.ai.enable
|
23
|
+
- let ai_black_list = theme.thirdparty.ai.BlackWhite_List.mode === 'black' ? theme.thirdparty.ai.BlackWhite_List.List.map(item => `'${item}'`).join(', ') : '';
|
24
|
+
- let ai_white_list = theme.thirdparty.ai.BlackWhite_List.mode === 'white' ? theme.thirdparty.ai.BlackWhite_List.List.map(item => `'${item}'`).join(', ') : '';
|
25
|
+
script(data-pjax, defer).
|
26
|
+
new ChucklePostAI({
|
27
|
+
el: '#post #article-container',
|
28
|
+
key: '#{theme.thirdparty.ai.key}',
|
29
|
+
title_el: '.post-title',
|
30
|
+
rec_method: '#{theme.thirdparty.ai.rec_method || 'web'}',
|
31
|
+
interface: {
|
32
|
+
name: "#{theme.thirdparty.ai.ai_name || 'Solitude AI'}",
|
33
|
+
introduce: "#{theme.thirdparty.ai.ai_introduce || '我是文章辅助AI生成工具: Solitude AI。你可以点击下方的按钮,让我生成本文简介、推荐相关文章等。'}",
|
34
|
+
version: "#{theme.thirdparty.ai.ai_tips || 'GPT 4'}",
|
35
|
+
},
|
36
|
+
hide_shuttle: !{!!theme.thirdparty.ai.hide_shuttle},
|
37
|
+
typewriter: !{!!theme.thirdparty.ai.typewriter},
|
38
|
+
speed: !{!!theme.thirdparty.ai.speed},
|
39
|
+
eliminate: [!{ai_black_list}],
|
40
|
+
whitelist: [!{ai_white_list}],
|
41
|
+
total_length: !{page.ai_total_length ? page.ai_total_length : 0},
|
42
|
+
ratio_string: !{page.ai_ratio_string ? page.ai_ratio_string : 0},
|
43
|
+
})
|
package/layout/tag.pug
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
extends includes/layout.pug
|
2
|
+
|
3
|
+
block content
|
4
|
+
main.layout#content-inner
|
5
|
+
div#tag
|
6
|
+
div#tag-page-tags
|
7
|
+
each tag in site.tags.find({ parent: { $exists: false } }).data
|
8
|
+
a(id=tag.name class=(tag.name === page.tag ? 'select' : '') href=url_for(tag.path))
|
9
|
+
span.tags-punctuation
|
10
|
+
| #{tag.name}
|
11
|
+
span.tagsPageCount #{tag.length}
|
12
|
+
div.recent-posts#recent-posts
|
13
|
+
- const currentTag = page.tag
|
14
|
+
each post in site.posts.data
|
15
|
+
each tag in post.tags.data
|
16
|
+
if tag.name === currentTag
|
17
|
+
include includes/widgets/home/postList
|
18
|
+
include includes/mixins/pagination
|
19
|
+
include includes/widgets/aside/aside
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-solitude",
|
3
|
-
"version": "1.1
|
3
|
+
"version": "1.2.1",
|
4
4
|
"description": "A beautiful, powerful, and efficient Hexo theme developed by the DuoSco team",
|
5
5
|
"scripts": {
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
@@ -14,8 +14,8 @@
|
|
14
14
|
"theme",
|
15
15
|
"hexo-theme-solitude"
|
16
16
|
],
|
17
|
-
"author": "Hexo-Theme-Solitude<
|
18
|
-
"license": "
|
17
|
+
"author": "Hexo-Theme-Solitude<wzsco@qq.com>",
|
18
|
+
"license": "GNU",
|
19
19
|
"bugs": {
|
20
20
|
"url": "https://github.com/DuoSco/Hexo-theme-solitude/issues"
|
21
21
|
},
|
package/scripts/event/page.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
hexo.extend.generator.register('404', function (locals) {
|
2
3
|
if(!this.theme.config.page.error)return
|
3
4
|
return {
|
@@ -14,11 +15,12 @@ hexo.extend.generator.register('404', function (locals) {
|
|
14
15
|
// generate tags Page
|
15
16
|
hexo.extend.generator.register('tags', function(locals) {
|
16
17
|
if(!this.theme.config.page.tags)return
|
18
|
+
const lang = hexo.theme.i18n.get(this.config.language || 'zh-CN')
|
17
19
|
return {
|
18
20
|
path: 'tags/index.html',
|
19
21
|
layout: ['page'],
|
20
22
|
data: {
|
21
|
-
title:
|
23
|
+
title: lang["page.tag"],
|
22
24
|
type: 'tags',
|
23
25
|
comment: false
|
24
26
|
}
|
@@ -28,13 +30,29 @@ hexo.extend.generator.register('tags', function(locals) {
|
|
28
30
|
// generate categories Page
|
29
31
|
hexo.extend.generator.register('categories', function(locals) {
|
30
32
|
if(!this.theme.config.page.categories)return
|
33
|
+
const lang = hexo.theme.i18n.get(this.config.language || 'zh-CN')
|
31
34
|
return {
|
32
35
|
path: 'categories/index.html',
|
33
36
|
layout: ['page'],
|
34
37
|
data: {
|
35
|
-
title:
|
38
|
+
title: lang["page.category"],
|
36
39
|
type: 'categories',
|
37
40
|
comment: false
|
38
41
|
}
|
39
42
|
};
|
40
43
|
});
|
44
|
+
|
45
|
+
// generate echarts Page
|
46
|
+
hexo.extend.generator.register('echarts', function(locals) {
|
47
|
+
if(!this.theme.config.about.echarts && !this.theme.config.about.enable)return
|
48
|
+
const lang = hexo.theme.i18n.get(this.config.language || 'zh-CN')
|
49
|
+
return {
|
50
|
+
path: 'echart/index.html',
|
51
|
+
layout: ['page'],
|
52
|
+
data: {
|
53
|
+
title: lang["page.echarts"],
|
54
|
+
type: 'echarts',
|
55
|
+
comment: false
|
56
|
+
}
|
57
|
+
};
|
58
|
+
});
|
@@ -4,6 +4,5 @@ hexo.extend.filter.register('after_render:html', function (data) {
|
|
4
4
|
if (post.random !== false) posts.push(post.path)
|
5
5
|
})
|
6
6
|
data += `<script>const posts=${JSON.stringify(posts)};function toRandomPost(){ pjax.loadUrl('/'+posts[Math.floor(Math.random()*posts.length)]); };</script>`
|
7
|
-
//data += `<script>const posts=${JSON.stringify(posts)};function toRandomPost(){ window.pjax ? : window.open('/'+posts[Math.floor(Math.random()*posts.length)], "_self"); };</script>`
|
8
7
|
return data
|
9
8
|
})
|
@@ -1,7 +1,8 @@
|
|
1
|
-
const cheerio = require('cheerio')
|
2
|
-
const moment = require('moment')
|
3
|
-
|
4
1
|
hexo.extend.filter.register('after_render:html', function (locals) {
|
2
|
+
const {config, theme} = this
|
3
|
+
if (!theme.config.about.echarts.enable) return
|
4
|
+
|
5
|
+
const cheerio = require('cheerio')
|
5
6
|
const $ = cheerio.load(locals)
|
6
7
|
const post = $('#posts-chart')
|
7
8
|
const tag = $('#tags-chart')
|
@@ -32,7 +33,8 @@ hexo.extend.filter.register('after_render:html', function (locals) {
|
|
32
33
|
}
|
33
34
|
}, 15)
|
34
35
|
|
35
|
-
function postsChart
|
36
|
+
function postsChart(startMonth) {
|
37
|
+
const moment = require('moment')
|
36
38
|
const startDate = moment(startMonth || '2020-01')
|
37
39
|
const endDate = moment()
|
38
40
|
|
@@ -164,12 +166,14 @@ function postsChart (startMonth) {
|
|
164
166
|
</script>`
|
165
167
|
}
|
166
168
|
|
167
|
-
function tagsChart
|
169
|
+
function tagsChart(len) {
|
168
170
|
const tagArr = []
|
169
171
|
hexo.locals.get('tags').map(function (tag) {
|
170
|
-
tagArr.push({
|
172
|
+
tagArr.push({name: tag.name, value: tag.length, path: tag.path})
|
173
|
+
})
|
174
|
+
tagArr.sort((a, b) => {
|
175
|
+
return b.value - a.value
|
171
176
|
})
|
172
|
-
tagArr.sort((a, b) => { return b.value - a.value })
|
173
177
|
|
174
178
|
const dataLength = Math.min(tagArr.length, len) || tagArr.length
|
175
179
|
const tagNameArr = []
|
@@ -285,7 +289,7 @@ function tagsChart (len) {
|
|
285
289
|
</script>`
|
286
290
|
}
|
287
291
|
|
288
|
-
function categoriesChart
|
292
|
+
function categoriesChart(dataParent) {
|
289
293
|
const categoryArr = []
|
290
294
|
let categoryParentFlag = false
|
291
295
|
hexo.locals.get('categories').map(function (category) {
|
@@ -299,8 +303,11 @@ function categoriesChart (dataParent) {
|
|
299
303
|
})
|
300
304
|
})
|
301
305
|
categoryParentFlag = categoryParentFlag && dataParent === 'true'
|
302
|
-
categoryArr.sort((a, b) => {
|
303
|
-
|
306
|
+
categoryArr.sort((a, b) => {
|
307
|
+
return b.value - a.value
|
308
|
+
})
|
309
|
+
|
310
|
+
function translateListToTree(data, parent) {
|
304
311
|
let tree = []
|
305
312
|
let temp
|
306
313
|
data.forEach((item, index) => {
|
@@ -316,7 +323,10 @@ function categoriesChart (dataParent) {
|
|
316
323
|
})
|
317
324
|
return tree
|
318
325
|
}
|
319
|
-
|
326
|
+
|
327
|
+
const categoryNameJson = JSON.stringify(categoryArr.map(function (category) {
|
328
|
+
return category.name
|
329
|
+
}))
|
320
330
|
const categoryArrJson = JSON.stringify(categoryArr)
|
321
331
|
const categoryArrParentJson = JSON.stringify(translateListToTree(categoryArr, '0'))
|
322
332
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* Solitude
|
3
3
|
* Related Posts
|
4
4
|
* According the tag
|
5
5
|
*/
|
@@ -42,7 +42,7 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) {
|
|
42
42
|
const dateType = config.related_post.date_type || 'created'
|
43
43
|
const headlineLang = this._p('喜欢这篇的人也看了')
|
44
44
|
|
45
|
-
relatedPosts = relatedPosts.sort(compare('weight'))
|
45
|
+
relatedPosts = relatedPosts.sort(compare('weight', dateType))
|
46
46
|
|
47
47
|
if (relatedPosts.length > 0) {
|
48
48
|
result += '<div class="relatedPosts">'
|
@@ -82,10 +82,17 @@ function findItem(arrayToSearch, attr, val) {
|
|
82
82
|
return -1
|
83
83
|
}
|
84
84
|
|
85
|
-
function compare(attr) {
|
85
|
+
function compare(attr, dateType) {
|
86
86
|
return function (a, b) {
|
87
87
|
const val1 = a[attr]
|
88
88
|
const val2 = b[attr]
|
89
|
+
if (val1 === val2) {
|
90
|
+
if (dateType === 'created') {
|
91
|
+
return b.created - a.created
|
92
|
+
} else if (dateType === 'updated') {
|
93
|
+
return b.updated - a.updated
|
94
|
+
}
|
95
|
+
}
|
89
96
|
return val2 - val1
|
90
97
|
}
|
91
98
|
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
hexo.extend.filter.register('stylus:renderer', function (style) {
|
2
|
+
const {config, theme} = this
|
3
|
+
|
4
|
+
// 侧边栏标签高亮
|
5
|
+
if (theme.config.aside.tags.highlight) {
|
6
|
+
let array = theme.config.aside.tags.list.map(item => encodeURIComponent(item));
|
7
|
+
style.define('highlightTags', array);
|
8
|
+
}
|
9
|
+
|
10
|
+
// 侧边栏加载样式控制
|
11
|
+
let aside = [
|
12
|
+
theme.config.aside.home.noSticky,
|
13
|
+
theme.config.aside.home.Sticky,
|
14
|
+
theme.config.aside.post.noSticky,
|
15
|
+
theme.config.aside.post.Sticky,
|
16
|
+
theme.config.aside.page.Sticky,
|
17
|
+
theme.config.aside.page.noSticky
|
18
|
+
].join(',').split(',');
|
19
|
+
let uniqueArr = [...new Set(aside)]; // 去重
|
20
|
+
if (uniqueArr.length > 0) { // 是否为空
|
21
|
+
style.define('aside', uniqueArr);
|
22
|
+
}
|
23
|
+
});
|
package/scripts/tags/bvideo.js
CHANGED
@@ -1,42 +1,7 @@
|
|
1
1
|
'use strict'
|
2
|
-
let playIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 20 20" fill="none" class="icon"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.67735 4.2798C5.98983 4.1725 7.85812 4.0625 10 4.0625C12.1421 4.0625 14.0105 4.17252 15.323 4.27983C16.2216 4.3533 16.9184 5.04049 16.9989 5.9318C17.0962 7.00837 17.1875 8.43614 17.1875 10C17.1875 11.5639 17.0962 12.9916 16.9989 14.0682C16.9184 14.9595 16.2216 15.6467 15.323 15.7202C14.0105 15.8275 12.1421 15.9375 10 15.9375C7.85812 15.9375 5.98983 15.8275 4.67735 15.7202C3.77861 15.6467 3.08174 14.9593 3.00119 14.0678C2.90388 12.9908 2.8125 11.5627 2.8125 10C2.8125 8.43727 2.90388 7.00924 3.00119 5.93221C3.08174 5.04067 3.77861 4.35327 4.67735 4.2798ZM10 2.8125C7.81674 2.8125 5.9136 2.92456 4.5755 3.03395C3.07738 3.15643 1.8921 4.31616 1.75626 5.81973C1.65651 6.92379 1.5625 8.39058 1.5625 10C1.5625 11.6094 1.65651 13.0762 1.75626 14.1803C1.8921 15.6838 3.07738 16.8436 4.5755 16.966C5.9136 17.0754 7.81674 17.1875 10 17.1875C12.1835 17.1875 14.0868 17.0754 15.4249 16.966C16.9228 16.8436 18.108 15.6841 18.2438 14.1807C18.3435 13.077 18.4375 11.6105 18.4375 10C18.4375 8.38948 18.3435 6.92296 18.2438 5.81931C18.108 4.31588 16.9228 3.15645 15.4249 3.03398C14.0868 2.92458 12.1835 2.8125 10 2.8125ZM12.1876 10.722C12.7431 10.4013 12.7431 9.59941 12.1876 9.27866L9.06133 7.47373C8.50577 7.15298 7.81133 7.55392 7.81133 8.19542V11.8053C7.81133 12.4468 8.50577 12.8477 9.06133 12.527L12.1876 10.722Z" fill="#9499A0"/></svg>`
|
3
|
-
let likeIcon = `<svg width="18" height="18" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg" class="icon"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.77234 30.8573V11.7471H7.54573C5.50932 11.7471 3.85742 13.3931 3.85742 15.425V27.1794C3.85742 29.2112 5.50932 30.8573 7.54573 30.8573H9.77234ZM11.9902 30.8573V11.7054C14.9897 10.627 16.6942 7.8853 17.1055 3.33591C17.2666 1.55463 18.9633 0.814421 20.5803 1.59505C22.1847 2.36964 23.243 4.32583 23.243 6.93947C23.243 8.50265 23.0478 10.1054 22.6582 11.7471H29.7324C31.7739 11.7471 33.4289 13.402 33.4289 15.4435C33.4289 15.7416 33.3928 16.0386 33.3215 16.328L30.9883 25.7957C30.2558 28.7683 27.5894 30.8573 24.528 30.8573H11.9911H11.9902Z"></path></svg>`
|
4
|
-
let coinIcon = `<svg width="18" height="18" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" class="icon" style="fill:;"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.045 25.5454C7.69377 25.5454 2.54504 20.3967 2.54504 14.0454C2.54504 7.69413 7.69377 2.54541 14.045 2.54541C20.3963 2.54541 25.545 7.69413 25.545 14.0454C25.545 17.0954 24.3334 20.0205 22.1768 22.1771C20.0201 24.3338 17.095 25.5454 14.045 25.5454ZM9.66202 6.81624H18.2761C18.825 6.81624 19.27 7.22183 19.27 7.72216C19.27 8.22248 18.825 8.62807 18.2761 8.62807H14.95V10.2903C17.989 10.4444 20.3766 12.9487 20.3855 15.9916V17.1995C20.3854 17.6997 19.9799 18.1052 19.4796 18.1052C18.9793 18.1052 18.5738 17.6997 18.5737 17.1995V15.9916C18.5667 13.9478 16.9882 12.2535 14.95 12.1022V20.5574C14.95 21.0577 14.5444 21.4633 14.0441 21.4633C13.5437 21.4633 13.1382 21.0577 13.1382 20.5574V12.1022C11.1 12.2535 9.52148 13.9478 9.51448 15.9916V17.1995C9.5144 17.6997 9.10883 18.1052 8.60856 18.1052C8.1083 18.1052 7.70273 17.6997 7.70265 17.1995V15.9916C7.71158 12.9487 10.0992 10.4444 13.1382 10.2903V8.62807H9.66202C9.11309 8.62807 8.66809 8.22248 8.66809 7.72216C8.66809 7.22183 9.11309 6.81624 9.66202 6.81624Z"></path></svg>`
|
5
2
|
|
6
3
|
function bilibili(args) {
|
7
|
-
|
8
|
-
const time = args[1]
|
9
|
-
return `
|
10
|
-
<a href="https://www.bilibili.com/video/${id}/" class="bilibili_box" id="${id}" onclick="event.stopPropagation()"></a>
|
11
|
-
|
12
|
-
<script>
|
13
|
-
bilibili()
|
14
|
-
function bilibili() {
|
15
|
-
let dom = document.getElementById('${id}')
|
16
|
-
fetch('https://api.320.ink/api/b?id=${id}').then(res=>res.json()).then(data=>{
|
17
|
-
dom.innerHTML = \`
|
18
|
-
<div class="bilibili_cover">
|
19
|
-
<img src="https://s1.hdslb.com/bfs/static/player/img/play.svg" class="play_icon nolazyload">
|
20
|
-
<img src="\${data.pic + '&h=300'}" class="nolazyload">
|
21
|
-
${time ? `<span>${time}</span>` : ''}
|
22
|
-
</div>
|
23
|
-
<div class="bilibili_info">
|
24
|
-
<div class="title">\${data.title}</div>
|
25
|
-
<div class="stat">
|
26
|
-
<span>${playIcon}\${data.view}</span>
|
27
|
-
<span>${likeIcon}\${data.like}</span>
|
28
|
-
<span>${coinIcon}\${data.coin}</span>
|
29
|
-
</div>
|
30
|
-
<div class="owner">
|
31
|
-
<span class="tip">视频</span>
|
32
|
-
<img src="\${data.face + '&h=100'}" class="nolazyload">
|
33
|
-
<span>\${data.owner}</span>
|
34
|
-
</div>
|
35
|
-
</div>\`
|
36
|
-
})
|
37
|
-
}
|
38
|
-
</script>
|
39
|
-
`
|
4
|
+
return `<iframe class="bvideo" src="${args}"></iframe>`
|
40
5
|
}
|
41
6
|
|
42
7
|
hexo.extend.tag.register('bilibili', bilibili, { ends: false })
|
package/scripts/tags/fold.js
CHANGED
@@ -7,10 +7,9 @@
|
|
7
7
|
|
8
8
|
function postTabs(args, content) {
|
9
9
|
const title = args[0] ? args[0] : ""
|
10
|
-
const
|
11
|
-
const open = args[2] ? args[2] : ""
|
10
|
+
const open = args[1] ? args[1] : ""
|
12
11
|
|
13
|
-
return `<details ${open}><summary>${title
|
12
|
+
return `<details ${open}><summary>${title}</summary><div class="content">${hexo.render.renderSync({
|
14
13
|
text: content,
|
15
14
|
engine: 'markdown'
|
16
15
|
})}</div></details>`
|
package/scripts/tags/note.js
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
-
hexo.extend.tag.register('note', function(
|
2
|
-
|
1
|
+
hexo.extend.tag.register('note', function (types, content) {
|
2
|
+
let type = ""
|
3
|
+
for (let i = 0; i < types.length; i++) {
|
4
|
+
type += " " + types[i]
|
5
|
+
}
|
6
|
+
return `<div class="note ${type}">${hexo.render.renderSync({text: content, engine: 'markdown'})}</div>`
|
3
7
|
}, {ends: true});
|