hexo-theme-solitude 1.2.6 → 1.3.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/CONTRIBUTING.md +41 -0
- package/README.md +8 -8
- package/README_EN.md +6 -6
- package/_config.yml +502 -297
- package/languages/en-US.yml +105 -8
- package/languages/zh-CN.yml +98 -1
- package/layout/archive.pug +4 -5
- package/layout/category.pug +4 -5
- package/layout/includes/body/mode.pug +40 -0
- package/layout/includes/console.pug +15 -16
- package/layout/includes/footer.pug +26 -28
- package/layout/includes/head/config.pug +27 -8
- package/layout/includes/head/fest.pug +22 -0
- package/layout/includes/head/opengraph.pug +11 -0
- package/layout/includes/head.pug +1 -3
- package/layout/includes/header.pug +1 -1
- package/layout/includes/inject/body.pug +36 -13
- package/layout/includes/inject/head.pug +30 -20
- package/layout/includes/layout.pug +12 -8
- package/layout/includes/loading.pug +1 -64
- package/layout/includes/mixins/articleSort.pug +4 -4
- package/layout/includes/mixins/pagination.pug +1 -1
- package/layout/includes/nav.pug +10 -10
- package/layout/includes/page/about.pug +1 -0
- package/layout/includes/page/categories.pug +3 -3
- package/layout/includes/page/default.pug +1 -1
- package/layout/includes/page/echarts.pug +3 -3
- package/layout/includes/page/equipment.pug +0 -1
- package/layout/includes/page/links.pug +5 -26
- package/layout/includes/page/moments.pug +0 -1
- package/layout/includes/page/music.pug +19 -0
- package/layout/includes/page/not_configured.pug +18 -0
- package/layout/includes/page/rss.pug +20 -22
- package/layout/includes/page/says.pug +1 -2
- package/layout/includes/page/tags.pug +3 -3
- package/layout/includes/page/tlink.pug +0 -1
- package/layout/includes/sidebar.pug +7 -7
- package/layout/includes/widgets/aside/aside.pug +13 -1
- package/layout/includes/widgets/aside/asideArchive.pug +5 -3
- package/layout/includes/widgets/aside/asideCustom.pug +6 -0
- package/layout/includes/widgets/aside/asideHistory.pug +3 -3
- package/layout/includes/widgets/aside/asideInfoCard.pug +4 -6
- package/layout/includes/widgets/aside/asideNewestPost.pug +1 -1
- package/layout/includes/widgets/aside/asideSwitch.pug +0 -11
- package/layout/includes/widgets/aside/asideTag.pug +2 -2
- package/layout/includes/widgets/aside/asideToc.pug +1 -1
- package/layout/includes/widgets/aside/asideWebInfo.pug +6 -6
- package/layout/includes/widgets/aside/asideWelcome.pug +1 -1
- package/layout/includes/widgets/home/banner.pug +2 -2
- package/layout/includes/widgets/home/bbTimeList.pug +3 -3
- package/layout/includes/widgets/home/categoryBar.pug +3 -3
- package/layout/includes/widgets/home/categoryGroup.pug +2 -2
- package/layout/includes/widgets/home/hometop.pug +7 -7
- package/layout/includes/widgets/home/postList.pug +12 -8
- package/layout/includes/widgets/home/topGroup.pug +17 -13
- package/layout/includes/widgets/nav/left.pug +6 -6
- package/layout/includes/widgets/nav/menu.pug +4 -4
- package/layout/includes/widgets/nav/right.pug +14 -14
- package/layout/includes/widgets/page/about/authorinfo.pug +1 -1
- package/layout/includes/widgets/page/about/award.pug +11 -9
- package/layout/includes/widgets/page/about/contentinfo.pug +7 -7
- package/layout/includes/widgets/page/about/hobbies.pug +1 -1
- package/layout/includes/widgets/page/about/motto.pug +2 -2
- package/layout/includes/widgets/page/about/other.pug +10 -9
- package/layout/includes/widgets/page/about/personalities.pug +2 -2
- package/layout/includes/widgets/page/about/skillsinfo.pug +10 -12
- package/layout/includes/widgets/page/about/tenyear.pug +48 -0
- package/layout/includes/widgets/page/banner.pug +2 -2
- package/layout/includes/widgets/page/links/banner.pug +12 -14
- package/layout/includes/widgets/page/links/linksItem.pug +0 -1
- package/layout/includes/widgets/page/moments/angle.pug +7 -12
- package/layout/includes/widgets/page/moments/index.pug +7 -2
- package/layout/includes/widgets/post/award.pug +12 -8
- package/layout/includes/widgets/post/copyright.pug +16 -14
- package/layout/includes/widgets/post/postMeta.pug +36 -25
- package/layout/includes/widgets/post/postNav.pug +15 -15
- package/layout/includes/widgets/randomlink.pug +10 -5
- package/layout/includes/widgets/rightside/index.pug +9 -8
- package/layout/includes/widgets/third-party/ai/index.pug +12 -0
- package/layout/includes/widgets/third-party/comments/comment.pug +6 -1
- package/layout/includes/widgets/third-party/comments/twikoo.pug +5 -4
- package/layout/includes/widgets/third-party/comments/waline.pug +4 -5
- package/layout/includes/widgets/third-party/music.pug +1 -1
- package/layout/includes/widgets/third-party/pjax.pug +6 -1
- package/layout/includes/widgets/third-party/search/algolia-search.pug +4 -3
- package/layout/includes/widgets/third-party/search/index.pug +2 -2
- package/layout/includes/widgets/third-party/search/local-search.pug +3 -3
- package/layout/index.pug +5 -6
- package/layout/page.pug +34 -29
- package/layout/post.pug +3 -23
- package/layout/tag.pug +3 -3
- package/package.json +2 -2
- package/scripts/filter/checkThemeConfig.js +0 -5
- package/scripts/helper/cdn.js +12 -0
- package/scripts/helper/page.js +13 -0
- package/scripts/helper/related_post.js +0 -1
- package/scripts/tags/button.js +21 -0
- package/scripts/tags/card.js +9 -0
- package/scripts/tags/checkbox.js +51 -0
- package/scripts/tags/fold.js +0 -5
- package/scripts/tags/image.js +75 -0
- package/scripts/tags/inline-image.js +12 -0
- package/scripts/tags/label.js +10 -0
- package/scripts/tags/link.js +2 -0
- package/scripts/tags/media.js +29 -0
- package/scripts/tags/span.js +17 -0
- package/scripts/tags/timeline.js +2 -15
- package/scripts/tags/u.js +7 -0
- package/source/css/_global/animation.css +57 -0
- package/source/css/_global/index.styl +5 -20
- package/source/css/_global/var.styl +16 -1
- package/source/css/_layout/{base.styl → basic.styl} +24 -116
- package/source/css/_layout/header.styl +204 -616
- package/source/css/_layout/index.styl +29 -271
- package/source/css/_mode/index.styl +102 -93
- package/source/css/_page/_home/category-bar.styl +74 -0
- package/source/css/_page/_home/home-top.styl +541 -0
- package/source/css/_page/_home/index.styl +15 -0
- package/source/css/_page/_home/pagination.styl +176 -0
- package/source/css/_page/_home/recent-post.styl +204 -0
- package/source/css/_page/about/index.styl +1 -0
- package/source/css/_page/about/tenyear.styl +56 -0
- package/source/css/_page/about.styl +555 -626
- package/source/css/_page/category.styl +95 -119
- package/source/css/_page/douban.styl +126 -0
- package/source/css/_page/equipment.styl +100 -99
- package/source/css/_page/error.styl +130 -146
- package/source/css/_page/home.styl +41 -50
- package/source/css/_page/index.styl +42 -10
- package/source/css/_page/links.styl +306 -0
- package/source/css/_page/moment.styl +51 -51
- package/source/css/_page/music.styl +506 -0
- package/source/css/_page/rss.styl +62 -67
- package/source/css/_page/says.styl +375 -344
- package/source/css/_page/tag.styl +15 -13
- package/source/css/_widgets/{aside → _aside}/flip.styl +7 -5
- package/source/css/_widgets/{aside → _aside}/history.styl +9 -2
- package/source/css/_widgets/_aside/index.styl +96 -0
- package/source/css/_widgets/{aside → _aside}/info.styl +86 -89
- package/source/css/_widgets/{aside → _aside}/newPost.styl +7 -1
- package/source/css/_widgets/{aside → _aside}/toc.styl +28 -5
- package/source/css/_widgets/{comment → _comment}/index.styl +4 -12
- package/source/css/_widgets/{comment → _comment}/twikoo.styl +5 -2
- package/source/css/_widgets/{comment → _comment}/waline.styl +21 -5
- package/source/css/{_extra → _widgets/_extra}/console.styl +33 -10
- package/source/css/_widgets/_extra/fullpage.styl +46 -0
- package/source/css/_widgets/_extra/music.styl +218 -0
- package/source/css/_widgets/_extra/pace.styl +39 -0
- package/source/css/_widgets/_extra/rightmenu.styl +78 -0
- package/source/css/_widgets/_mixins/article-sort.styl +93 -0
- package/source/css/_widgets/_mixins/footer.styl +273 -0
- package/source/css/_widgets/_mixins/other.styl +34 -0
- package/source/css/_widgets/_mixins/sidebar.styl +230 -0
- package/source/css/_widgets/_post/_highlight/diff.styl +75 -0
- package/source/css/_widgets/_post/_highlight/index.styl +144 -0
- package/source/css/_widgets/_post/_highlight/theme/default.styl +12 -0
- package/source/css/_widgets/_post/_highlight/theme/mac.styl +25 -0
- package/source/css/_widgets/_post/_highlight/theme.styl +68 -0
- package/source/css/_widgets/_post/commentBarrage.styl +144 -0
- package/source/css/_widgets/_post/content.styl +152 -0
- package/source/css/_widgets/_post/copyright.styl +98 -0
- package/source/css/_widgets/_post/index.styl +20 -0
- package/source/css/_widgets/_post/meta.styl +420 -0
- package/source/css/_widgets/_post/pagination.styl +177 -0
- package/source/css/_widgets/_post/postAI.styl +131 -0
- package/source/css/{_post → _widgets/_post}/relatedPost.styl +4 -1
- package/source/css/_widgets/_post/tools.styl +249 -0
- package/source/css/{_search → _widgets/_search}/algolia-search.styl +4 -0
- package/source/css/{_search → _widgets/_search}/local-search.styl +15 -5
- package/source/css/_widgets/_tags/button.styl +60 -0
- package/source/css/_widgets/_tags/bvideo.styl +8 -0
- package/source/css/_widgets/_tags/card.styl +52 -0
- package/source/css/_widgets/_tags/checkbox.styl +85 -0
- package/source/css/_widgets/_tags/fold.styl +79 -0
- package/source/css/_widgets/_tags/image.styl +10 -0
- package/source/css/_widgets/_tags/index.styl +61 -0
- package/source/css/_widgets/_tags/inline-image.styl +6 -0
- package/source/css/_widgets/_tags/label.styl +3 -0
- package/source/css/_widgets/_tags/link.styl +80 -0
- package/source/css/_widgets/_tags/note.styl +101 -0
- package/source/css/_widgets/_tags/span.styl +61 -0
- package/source/css/_widgets/_tags/tabs.styl +105 -0
- package/source/css/_widgets/_tags/timeline.styl +80 -0
- package/source/css/_widgets/index.styl +50 -1
- package/source/css/index.styl +0 -25
- package/source/js/{commentBarrage.js → extend/comment/twikoo/commentBarrage.js} +0 -4
- package/source/js/extend/comment/{twikoo.js → twikoo/twikoo.js} +12 -40
- package/source/js/extend/comment/waline/commentBarrage.js +155 -0
- package/source/js/extend/comment/{waline.js → waline/waline.js} +10 -11
- package/source/js/extend/search/algolia-search.js +1 -5
- package/source/js/extend/search/local-search.js +33 -13
- package/source/js/main.js +135 -171
- package/source/js/music.js +129 -0
- package/source/js/utils.js +4 -7
- package/source/lib/cover-color.min.js +7 -0
- package/source/lib/rightside.min.js +1 -0
- package/source/lib/sco-ai.min.js +8 -0
- package/source/lib/snackbar.min.css +1 -1
- package/source/lib/txmap.min.js +1 -0
- package/source/lib/universe.min.js +1 -0
- package/source/lib/view-image.min.js +1 -1
- package/layout/includes/widgets/aside/asidePower.pug +0 -19
- package/layout/includes/widgets/home/rencentPost.pug +0 -26
- package/source/css/_extra/rightmenu.styl +0 -83
- package/source/css/_layout/articleSort.styl +0 -199
- package/source/css/_layout/footer.styl +0 -359
- package/source/css/_layout/sidebar.styl +0 -226
- package/source/css/_page/homeTop.styl +0 -1035
- package/source/css/_page/link.styl +0 -433
- package/source/css/_post/commentBarrage.styl +0 -149
- package/source/css/_post/externalTags.styl +0 -694
- package/source/css/_post/highlight.styl +0 -96
- package/source/css/_post/index.styl +0 -935
- package/source/css/_post/pagination.styl +0 -467
- package/source/css/_post/postContent.styl +0 -957
- package/source/css/_post/reward.styl +0 -217
- package/source/css/_widgets/aside/index.styl +0 -156
- package/source/css/_widgets/aside/power.styl +0 -90
- 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/extend/covercolor/local.js +0 -160
- package/source/js/rightside.js +0 -402
- package/source/js/txmap.js +0 -236
- package/source/lib/chuckle-post-ai.js +0 -1
- /package/source/css/_widgets/{aside → _aside}/allinfo.styl +0 -0
- /package/source/css/_widgets/{aside → _aside}/welcome.styl +0 -0
- /package/source/img/{theme/avatar.png → avatar.png} +0 -0
@@ -2,7 +2,7 @@ if theme.aside.history.enable
|
|
2
2
|
.card-widget.card-history
|
3
3
|
.item-headline
|
4
4
|
i(class=theme.aside.history.icon || 'scoicon sco-clock-fill')
|
5
|
-
span= theme.aside.history.title || '
|
6
|
-
#history-baidu
|
5
|
+
span= theme.aside.history.title || _p('aside.history')
|
6
|
+
#history-baidu
|
7
7
|
#history-container.history_swiper-container(style="width: 100%;height: 100%;margin-top: 6px")
|
8
|
-
#history_container_wrapper.swiper-wrapper
|
8
|
+
#history_container_wrapper.swiper-wrapper
|
@@ -2,18 +2,16 @@
|
|
2
2
|
.card-content
|
3
3
|
.card-info-avatar.is-center
|
4
4
|
.author-info__top-group
|
5
|
-
.author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")
|
5
|
+
.author-info__sayhi#author-info__sayhi(onclick="sco.changeSayHelloText()")= _p('sayhello.morning')
|
6
6
|
.avatar-img-group
|
7
|
-
img.avatar-img(alt=
|
7
|
+
img.avatar-img(alt=_p('aside.avatar'), src=theme.aside.card.author.img)
|
8
8
|
.avatar-sticker
|
9
|
-
|
10
|
-
use(xlink:href=theme.aside.card.author.state)
|
11
|
-
script(src=url_for(theme.aside.card.author.js))
|
9
|
+
img.avatar-sticker-img(src=theme.aside.card.author.sticker, alt=_p('aside.sticker'))
|
12
10
|
.author-info__description_group
|
13
11
|
.author-info__description!= theme.aside.card.content
|
14
12
|
.author-info__description2!= theme.aside.card.content2
|
15
13
|
.author-info__bottom-group
|
16
|
-
a.author-info__bottom-group-left(href=theme.about ? "/about" : "/"
|
14
|
+
a.author-info__bottom-group-left(href=theme.about ? "/about" : "/")
|
17
15
|
.author-info__name= config.author
|
18
16
|
.author-info__desc!= config.subtitle
|
19
17
|
.card-info-social-icons.is-center
|
@@ -1,6 +1,4 @@
|
|
1
1
|
case item
|
2
|
-
when 'power'
|
3
|
-
include ./asidePower.pug
|
4
2
|
when 'about'
|
5
3
|
include ./asideInfoCard.pug
|
6
4
|
when 'flip'
|
@@ -11,15 +9,6 @@ case item
|
|
11
9
|
include ./asideHistory.pug
|
12
10
|
when 'newestPost'
|
13
11
|
include ./asideNewestPost.pug
|
14
|
-
when 'tag'
|
15
|
-
.card-widget.card-tags
|
16
|
-
include ./asideTag.pug
|
17
|
-
when 'archive'
|
18
|
-
.card-widget.card-archives
|
19
|
-
include ./asideArchive.pug
|
20
|
-
when 'webInfo'
|
21
|
-
.card-widget.card-webinfo
|
22
|
-
include ./asideWebInfo.pug
|
23
12
|
when 'allInfo'
|
24
13
|
include ./asideAllInfo.pug
|
25
14
|
default
|
@@ -1,9 +1,9 @@
|
|
1
1
|
.card-tag-cloud
|
2
2
|
each tag in site.tags.find({ parent: { $exists: false } }).data
|
3
|
-
a(href=url_for(tag.path)
|
3
|
+
a(href=url_for(tag.path))= tag.name
|
4
4
|
sup= tag.length
|
5
5
|
if site.tags.length > 50
|
6
|
-
a#more-tags-btn(href="javascript:void(0);",
|
6
|
+
a#more-tags-btn(href="javascript:void(0);", onclick="sco.openAllTags();")= __('aside.tagmore')
|
7
7
|
else
|
8
8
|
style.
|
9
9
|
.card-tag-cloud::after {
|
@@ -3,38 +3,38 @@
|
|
3
3
|
.webinfo-item
|
4
4
|
.webinfo-item-title
|
5
5
|
i.item-icon.scoicon.sco-folder-fill
|
6
|
-
.item-name
|
6
|
+
.item-name= __('aside.postcount')
|
7
7
|
.item-count= site.posts.length
|
8
8
|
if theme.thirdparty.busuanzi
|
9
9
|
if theme.aside.siteinfo.pv
|
10
10
|
.webinfo-item
|
11
11
|
.webinfo-item-title
|
12
12
|
i.item-icon.scoicon.sco-visitor-line
|
13
|
-
.item-name
|
13
|
+
.item-name= __('aside.pv')
|
14
14
|
span#busuanzi_value_site_pv
|
15
15
|
i.scoicon.sco-loading-line
|
16
16
|
if theme.aside.siteinfo.uv
|
17
17
|
.webinfo-item
|
18
18
|
.webinfo-item-title
|
19
19
|
i.item-icon.scoicon.sco-team-fill
|
20
|
-
.item-name
|
20
|
+
.item-name= __('aside.uv')
|
21
21
|
span#busuanzi_value_site_uv
|
22
22
|
i.scoicon.sco-loading-line
|
23
23
|
if theme.aside.siteinfo.runtimeenable
|
24
24
|
.webinfo-item
|
25
25
|
.webinfo-item-title
|
26
26
|
i.item-icon.scoicon.sco-calendar-todo-fill
|
27
|
-
.item-name
|
27
|
+
.item-name= __('aside.runtime')
|
28
28
|
.item-count#runtimeshow
|
29
29
|
if theme.aside.siteinfo.updatetime
|
30
30
|
.webinfo-item
|
31
31
|
.webinfo-item-title
|
32
32
|
i.item-icon.scoicon.sco-loop-left-fill
|
33
|
-
.item-name
|
33
|
+
.item-name= __('aside.updatetime')
|
34
34
|
time.item-count(datetime=new Date())
|
35
35
|
if theme.thirdparty.wordcount && theme.aside.siteinfo.wordcount
|
36
36
|
.webinfo-item
|
37
37
|
.webinfo-item-title
|
38
38
|
i.item-icon.scoicon.sco-word-fill
|
39
|
-
.item-name
|
39
|
+
.item-name= __('aside.wordcount')
|
40
40
|
.item-count= totalcount(site)
|
@@ -2,7 +2,7 @@ if theme.aside.welcome.enable
|
|
2
2
|
.card-widget.card-welcome
|
3
3
|
.item-headline
|
4
4
|
i(class=theme.aside.welcome.icon || 'scoicon sco-map-pin-fill')
|
5
|
-
span= theme.aside.welcome.title || '
|
5
|
+
span= theme.aside.welcome.title || __('aside.welcome')
|
6
6
|
#welcome-info
|
7
7
|
|
8
8
|
script(data-pjax).
|
@@ -11,6 +11,6 @@ div.tags-group-all
|
|
11
11
|
each key in pair
|
12
12
|
.tags-group-icon(style=`background: ${theme.hometop.banner.icon[key].color}`)
|
13
13
|
img(src=theme.hometop.banner.icon[key].img, title=key)
|
14
|
-
a#banner-hover(onclick="toRandomPost()"
|
15
|
-
span.bannerText
|
14
|
+
a#banner-hover(onclick="toRandomPost()")
|
15
|
+
span.bannerText= _p('home.bannertext')
|
16
16
|
i.scoicon.sco-arrow-2-right-line.banner-righticon
|
@@ -1,8 +1,8 @@
|
|
1
1
|
.bbTimeList.container#bbTimeList
|
2
|
-
i.bber-logo.scoicon.sco-
|
2
|
+
i.bber-logo.scoicon.sco-bblogo(onclick="pjax.loadUrl('/essay/')")
|
3
3
|
.swiper-container.swiper-no-swiping.swiper-container-initialized.swiper-container-vertical.swiper-container-pointer-events#bbtalk(tabindex="-1", onclick="pjax.loadUrl('/essay/')")
|
4
4
|
.swiper-wrapper#bber-talk
|
5
5
|
each item, i in site.data.essay.essay_list
|
6
6
|
if i < 10
|
7
|
-
.li-style.swiper-slide= item.image ? item.content + '
|
8
|
-
i.bber-gotobb.scoicon.sco-right-btn-fill(
|
7
|
+
.li-style.swiper-slide= item.image ? item.content + _p('home.bbtime.image') : item.content
|
8
|
+
i.bber-gotobb.scoicon.sco-right-btn-fill(title=_p('home.bbtime.text'), onclick="pjax.loadUrl('/essay/')")
|
@@ -1,10 +1,10 @@
|
|
1
1
|
.category-bar-items#category-bar-items
|
2
2
|
.category-bar-item(class=is_home() ? 'select' : '', id="category-bar-home")
|
3
|
-
a(href="/")
|
3
|
+
a(href="/")= __('home.categoryBar.home')
|
4
4
|
each item in site.categories.find({ parent: { $exists: false } }).data
|
5
5
|
.category-bar-item(class=select ? (select === item.name ? 'select' : '') : '', id=item.name)
|
6
6
|
a(href=url_for(item.path))= item.name
|
7
|
-
if site.categories.length >
|
7
|
+
if site.categories.length > 13
|
8
8
|
.category-bar-next#category-bar-next(onclick="sco.scrollCategoryBarToRight()")
|
9
9
|
i.scoicon.sco-show-right-line
|
10
|
-
a.category-bar-more(href="/categories/")
|
10
|
+
a.category-bar-more(href="/categories/")= __('home.categoryBar.more')
|
@@ -1,9 +1,9 @@
|
|
1
1
|
- var groupNames = ['G1', 'G2', 'G3'];
|
2
2
|
- var styles = ['--sco-shadow-blue', '--sco-shadow-red', '--sco-shadow-green'];
|
3
|
-
- var classes = ['
|
3
|
+
- var classes = ['bikan', 'remen', 'shiyong'];
|
4
4
|
|
5
5
|
each groupName, index in groupNames
|
6
6
|
.categoryItem(style=`box-shadow: var(${styles[index]});`)
|
7
7
|
a.categoryButton(class=classes[index], href=url_for(theme.hometop.categoryGroup[groupName].url))
|
8
8
|
span.categoryButtonText= theme.hometop.categoryGroup[groupName].name
|
9
|
-
i(class=theme.hometop.categoryGroup[groupName].icon)
|
9
|
+
i(class=theme.hometop.categoryGroup[groupName].icon)
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
.recent-top-post-group#recent-top-post-group
|
2
|
+
.recent-post-top#recent-post-top
|
3
|
+
#bannerGroup
|
4
|
+
#banners
|
5
5
|
include ./banner.pug
|
6
|
-
|
6
|
+
.categoryGroup
|
7
7
|
include ./categoryGroup.pug
|
8
|
-
|
9
|
-
include ./
|
8
|
+
.topGroup
|
9
|
+
include ./topGroup.pug
|
@@ -1,24 +1,28 @@
|
|
1
|
-
div
|
2
|
-
div.post_cover
|
1
|
+
div.recent-post-item(onclick="pjax.loadUrl('/" + post.path + "')")
|
2
|
+
div.post_cover
|
3
3
|
a(href=url_for(post.path), title=post.title)
|
4
|
-
img(src=url_for(post.cover), alt=post.title
|
4
|
+
img.post_bg(src=url_for(post.cover), alt=post.title)
|
5
5
|
div.recent-post-info
|
6
6
|
div.recent-post-info-top
|
7
7
|
div.recent-post-info-top-tips
|
8
|
+
if post.sticky && is_home()
|
9
|
+
span.article-meta.sticky-warp
|
10
|
+
i.scoicon.sco-thumbtack-solid.sticky.orange
|
11
|
+
span.sticky.orange= _p('home.recent-post.sticky')
|
8
12
|
each category in post.categories.data
|
9
|
-
span
|
13
|
+
span.original= category.name
|
10
14
|
|
11
15
|
if post.prev == null && is_home()
|
12
|
-
span(
|
16
|
+
span.original= _p('home.recent-post.new')
|
13
17
|
|
14
|
-
a
|
18
|
+
a.unvisited-post(href=url_for(post.path))= _p('home.recent-post.read')
|
15
19
|
|
16
|
-
a
|
20
|
+
a.article-title(href=url_for(post.path), title=post.title)= post.title
|
17
21
|
|
18
22
|
div.article-meta-wrap
|
19
23
|
span.article-meta.tags
|
20
24
|
each tag in post.tags.data
|
21
|
-
a
|
25
|
+
a.article-meta__tags(href=url_for(tag.path), onclick="event.stopPropagation();")
|
22
26
|
span.tags-punctuation=tag.name
|
23
27
|
|
24
28
|
span.post-meta-date
|
@@ -1,22 +1,14 @@
|
|
1
1
|
- var filteredPosts = site.posts.data.filter(item => item.recommend === true).slice(0,6)
|
2
2
|
each post in filteredPosts
|
3
3
|
.recent-post-item
|
4
|
-
.post_cover
|
4
|
+
.post_cover
|
5
5
|
a(href=url_for(post.path), title=post.title)
|
6
|
-
span.recent-post-top-text
|
7
|
-
img.post_bg(alt=post.title, src=post.cover
|
6
|
+
span.recent-post-top-text= _p('home.top-group.recommend')
|
7
|
+
img.post_bg(alt=post.title, src=post.cover)
|
8
8
|
.recent-post-info
|
9
9
|
a.article-title(href=url_for(post.path), title=post.title)= post.title
|
10
10
|
|
11
|
-
|
12
|
-
.todayCard#todayCard(onclick=`pjax.loadUrl('${theme.hometop.recommendList.url}')`, style="z-index: 1;")
|
13
|
-
else
|
14
|
-
script.
|
15
|
-
function GoTodayCard() {
|
16
|
-
window.open("#{theme.hometop.recommendList.url}", "_blank");
|
17
|
-
}
|
18
|
-
.todayCard#todayCard(onclick="GoTodayCard()", style="z-index: 1;")
|
19
|
-
|
11
|
+
mixin todayCardContent
|
20
12
|
.todayCard-info
|
21
13
|
.todayCard-tips= theme.hometop.recommendList.sup
|
22
14
|
.todayCard-title= theme.hometop.recommendList.title
|
@@ -24,4 +16,16 @@ else
|
|
24
16
|
.banner-button-group
|
25
17
|
a.banner-button(onclick="window.event.cancelBubble=true;sco.hideTodayCard();")
|
26
18
|
i.scoicon.sco-add-fill
|
27
|
-
span.banner-button-text
|
19
|
+
span.banner-button-text= _p('home.top-group.recommendmore')
|
20
|
+
|
21
|
+
case theme.hometop.recommendList.url.startsWith('/')
|
22
|
+
when true
|
23
|
+
.todayCard#todayCard(onclick=`pjax.loadUrl('${theme.hometop.recommendList.url}')`)
|
24
|
+
+todayCardContent()
|
25
|
+
when false
|
26
|
+
script.
|
27
|
+
function GoTodayCard() {
|
28
|
+
window.open("#{theme.hometop.recommendList.url}", "_blank");
|
29
|
+
}
|
30
|
+
.todayCard#todayCard(onclick="GoTodayCard()")
|
31
|
+
+todayCardContent()
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
.back-menu-list-groups
|
2
2
|
- var menu = theme.nav && theme.nav.left && theme.nav.left.menu ? theme.nav.left.menu : {}
|
3
3
|
each groupData, x in menu
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
.back-menu-list-group
|
5
|
+
.back-menu-list-title= x
|
6
|
+
.back-menu-list
|
7
7
|
each data, y in groupData
|
8
|
-
a.back-menu-item(href=url_for(data.url),
|
9
|
-
img.back-menu-item-icon(src=data.icon,
|
8
|
+
a.back-menu-item(href=url_for(data.url), title=y)
|
9
|
+
img.back-menu-item-icon(src=data.icon, alt=x)
|
10
10
|
span.back-menu-item-text= y
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
1
|
+
.menus_items
|
2
2
|
- var menu = theme.nav && theme.nav.menu ? theme.nav.menu : {}
|
3
3
|
each value, x in menu
|
4
|
-
|
4
|
+
.menus_item
|
5
5
|
if !value.url
|
6
|
-
a.site-page(href="javascript:void(0);"
|
6
|
+
a.site-page(href="javascript:void(0);")
|
7
7
|
span= x
|
8
8
|
ul.menus_item_child
|
9
9
|
each childValue, y in value.child
|
@@ -12,5 +12,5 @@ div.menus_items
|
|
12
12
|
i(class=childValue.icon)
|
13
13
|
span= y
|
14
14
|
else
|
15
|
-
a.site-page.not-child(href=url_for(value.url)
|
15
|
+
a.site-page.not-child(href=url_for(value.url))
|
16
16
|
span= x
|
@@ -1,23 +1,23 @@
|
|
1
1
|
if theme.nav.right.travellings
|
2
|
-
|
3
|
-
a.site-page(
|
4
|
-
i.scoicon.sco-train-line
|
2
|
+
.nav-button.only-home#travellings_button
|
3
|
+
a.site-page(href="https://www.travellings.cn/go.html", title=_p('nav.travellings'), target="_blank")
|
4
|
+
i.scoicon.sco-train-line
|
5
5
|
if theme.nav.right.random
|
6
|
-
|
7
|
-
a.site-page(onclick="toRandomPost()", title="
|
8
|
-
i.scoicon.sco-signal-tower-fill
|
6
|
+
.nav-button#randomPost_button
|
7
|
+
a.site-page(onclick="toRandomPost()", title=_p('nav.randompost'), href="javascript:void(0);")
|
8
|
+
i.scoicon.sco-signal-tower-fill
|
9
9
|
if theme.thirdparty.search.enable
|
10
|
-
|
11
|
-
a.site-page.social-icon.search(href="javascript:void(0);",
|
12
|
-
i.scoicon.sco-search-line
|
10
|
+
.nav-button#search-button
|
11
|
+
a.site-page.social-icon.search(href="javascript:void(0);", title=_p('nav.search'))
|
12
|
+
i.scoicon.sco-search-line
|
13
13
|
if theme.nav.right.console
|
14
|
-
|
15
|
-
a.console_switchbutton(onclick="sco.showConsole()", title=
|
16
|
-
i.scoicon.sco-dashboard-fill
|
17
|
-
|
14
|
+
.nav-button#nav-console
|
15
|
+
a.console_switchbutton(onclick="sco.showConsole()", title=_p('nav.console'), href="javascript:void(0);")
|
16
|
+
i.scoicon.sco-dashboard-fill
|
17
|
+
.nav-button#nav-totop(onclick="sco.toTop()")
|
18
18
|
a.totopbtn
|
19
19
|
i.scoicon.sco-arrow-up-line
|
20
20
|
span#percent= "0"
|
21
|
-
|
21
|
+
#toggle-menu
|
22
22
|
a.site-page
|
23
23
|
i.scoicon.sco-menu-line
|
@@ -1,34 +1,36 @@
|
|
1
|
+
- award = site.data.about.award
|
2
|
+
|
1
3
|
- var sum = 0
|
2
4
|
if site.data.about.rewardList
|
3
5
|
.author-content
|
4
6
|
.author-content-item.single.reward
|
5
|
-
.author-content-item-tips
|
6
|
-
span.author-content-item-title
|
7
|
+
.author-content-item-tips= _p('award.about.tip')
|
8
|
+
span.author-content-item-title= _p('award.about.title')
|
7
9
|
.author-content-item-description
|
8
|
-
=
|
10
|
+
= award.description
|
9
11
|
.reward-list-all
|
10
12
|
each reward in site.data.about.rewardList
|
11
13
|
- sum += reward.money
|
12
14
|
.reward-list-item
|
13
15
|
.reward-list-item-name= reward.name
|
14
16
|
.reward-list-bottom-group
|
15
|
-
.reward-list-item-money(style=reward.vip ? "background: var(--sco-vip);" : "") ¥ #{reward.money}
|
17
|
+
.reward-list-item-money(style=(reward.vip ? "background: var(--sco-vip);" : "")) ¥ #{reward.money}
|
16
18
|
time.datatime.reward-list-item-time(datetime=moment(reward.time).format())
|
17
19
|
if theme.post.award.enable
|
18
20
|
.post-reward
|
19
21
|
.post-reward(onclick="AddRewardMask()")
|
20
|
-
.reward-button(title=
|
22
|
+
.reward-button(title=_p('award.about.tip1'))
|
21
23
|
i.scoicon.sco-hand-heart-fill
|
22
|
-
=
|
24
|
+
= _p('award.about.tip1')
|
23
25
|
.reward-main
|
24
26
|
ul.reward-all
|
25
|
-
span.reward-title
|
27
|
+
span.reward-title= _p('award.about.tip2')
|
26
28
|
ul.reward-group
|
27
|
-
- var rewards = [{image: theme
|
29
|
+
- var rewards = [{image: theme.post.award.wechat, description: _p('award.wechat')}, {image: theme.post.award.alipay, description: _p('award.alipay')}]
|
28
30
|
each reward in rewards
|
29
31
|
li.reward-item
|
30
32
|
a(href=reward.image, target="_blank")
|
31
33
|
img.post-qr-code-img(alt=reward.description, src=reward.image)
|
32
34
|
.post-qr-code-desc= reward.description
|
33
35
|
.reward-list-tips
|
34
|
-
p
|
36
|
+
p= award.tips.replace('{sum}', sum)
|
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
.author-content
|
4
4
|
.author-content-item.myInfoAndSayHello
|
5
|
-
.title1
|
6
|
-
.title2
|
5
|
+
.title1= _p('about.info.title1')
|
6
|
+
.title2= _p('about.info.title2')
|
7
7
|
span.inline-word= contentinfo.name
|
8
|
-
.title1
|
8
|
+
.title1= _p('about.info.title3') + contentinfo.title
|
9
9
|
.aboutsiteTips.author-content-item
|
10
|
-
.author-content-item-tips
|
10
|
+
.author-content-item-tips= _p('about.info.tip1')
|
11
11
|
h2
|
12
|
-
|
12
|
+
= _p('about.info.tip2')
|
13
13
|
br
|
14
|
-
|
15
|
-
span.inline-word
|
14
|
+
= _p('about.info.tip3')
|
15
|
+
span.inline-word= _p('about.info.tip4')
|
16
16
|
.mask
|
17
17
|
span.first-tips(data-show='')= contentinfo.product
|
18
18
|
span= contentinfo.design
|
@@ -28,6 +28,6 @@ if site.data.about.likes
|
|
28
28
|
.tips= like.subtips
|
29
29
|
if like.button
|
30
30
|
.banner-button-group
|
31
|
-
a.banner-button(href=like.button_link
|
31
|
+
a.banner-button(href=like.button_link)
|
32
32
|
i.scoicon.sco-right-btn-fill
|
33
33
|
span.banner-button-text= like.button_text
|
@@ -5,13 +5,13 @@
|
|
5
5
|
.author-content-item.maxim
|
6
6
|
.author-content-item-tips= motto.title
|
7
7
|
span.maxim-title
|
8
|
-
span
|
8
|
+
span= motto.prefix
|
9
9
|
span= motto.content
|
10
10
|
.author-content-item.buff
|
11
11
|
.card-content
|
12
12
|
.author-content-item-tips= expertise.title
|
13
13
|
span.buff-title
|
14
|
-
span
|
14
|
+
span
|
15
15
|
| #{expertise.prefix}
|
16
16
|
span.inline-word= expertise.specialist
|
17
17
|
span
|
@@ -7,31 +7,32 @@
|
|
7
7
|
#statistic
|
8
8
|
.post-tips
|
9
9
|
| 统计信息来自
|
10
|
-
a(href="https://invite.51.la/1NzKqTeb?target=V6"
|
10
|
+
a(href="https://invite.51.la/1NzKqTeb?target=V6") 51la网站统计
|
11
11
|
if theme.about.echarts.enable
|
12
12
|
.banner-button-group
|
13
|
-
a.banner-button(onclick="pjax.loadUrl('/echart/');"
|
13
|
+
a.banner-button(onclick="pjax.loadUrl('/echart/');")
|
14
14
|
i.scoicon.sco-right-btn-fill
|
15
15
|
span.banner-button-text 文章统计
|
16
16
|
script.
|
17
17
|
fetch("#{site.data.about.tj.url}")
|
18
18
|
.then(res => res.text())
|
19
19
|
.then(data => {
|
20
|
-
|
20
|
+
const title = ["最近活跃", "今日人数", "今日访问", "昨日人数", "昨日访问", "本月访问", "总访问量"];
|
21
21
|
let num = data.match(/(<\/span><span>).*?(\/span><\/p>)/g);
|
22
22
|
num = num.map(el => {
|
23
23
|
let val = el.replace(/(<\/span><span>)/g, "");
|
24
|
-
|
25
|
-
return str;
|
24
|
+
return val.replace(/(<\/span><\/p>)/g, "");
|
26
25
|
});
|
27
|
-
|
28
|
-
let
|
26
|
+
const s = document.getElementById("statistic");
|
27
|
+
let html = '';
|
29
28
|
for (let i = 0; i < num.length; i++) {
|
30
|
-
if (i
|
31
|
-
|
29
|
+
if (i === 0 || i === num.length - 1) continue;
|
30
|
+
html += `<div><span>${title[i]}</span><span id="${title[i]}">${num[i]}</span></div>`;
|
32
31
|
}
|
32
|
+
s.innerHTML = html;
|
33
33
|
});
|
34
34
|
|
35
|
+
|
35
36
|
if site.data.about.oneself
|
36
37
|
style.
|
37
38
|
:root {
|
@@ -9,8 +9,8 @@
|
|
9
9
|
img(src=personalities.image)
|
10
10
|
.post-tips
|
11
11
|
| 在
|
12
|
-
a(href="https://www.16personalities.com/"
|
12
|
+
a(href="https://www.16personalities.com/")= personalities.linkText
|
13
13
|
| 了解更多关于
|
14
|
-
a(
|
14
|
+
a(href=personalities.typeLink)= personalities.typeName
|
15
15
|
.author-content-item.myphoto
|
16
16
|
img.author-content-img(src=personalities.myphoto, alt="自拍")
|
@@ -9,18 +9,16 @@
|
|
9
9
|
.skills-style-group
|
10
10
|
.tags-group-all
|
11
11
|
.tags-group-wrapper
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
.tags-group-icon
|
20
|
-
|
21
|
-
|
22
|
-
img(src=item.icon, title=item.title)
|
23
|
-
- pair = []
|
12
|
+
each i in [1,2]
|
13
|
+
- var pair = []
|
14
|
+
each tag, index in skills.tags
|
15
|
+
- pair.push(tag)
|
16
|
+
if pair.length === 2 || index === skills.tags.length - 1
|
17
|
+
.tags-group-icon-pair
|
18
|
+
each item in pair
|
19
|
+
.tags-group-icon(style=`background:${item.color}`)
|
20
|
+
img(src=item.icon, title=item.title)
|
21
|
+
- pair = []
|
24
22
|
.skills-list
|
25
23
|
each tag in skills.tags
|
26
24
|
.skill-info
|
@@ -0,0 +1,48 @@
|
|
1
|
+
- var tenyear = site.data.about.tenyear
|
2
|
+
if tenyear
|
3
|
+
.author-content#tenyear
|
4
|
+
.create-site-post.author-content-item.single
|
5
|
+
.author-content-item-tips=tenyear.tips
|
6
|
+
.author-content-item-title=tenyear.title
|
7
|
+
p=tenyear.text
|
8
|
+
.tenyear-timeline
|
9
|
+
.progress
|
10
|
+
.past-time
|
11
|
+
.percentage-label
|
12
|
+
.time-labels
|
13
|
+
.start-time#tenyear-start-time= tenyear.start
|
14
|
+
.end-time#tenyear-end-time= tenyear.end
|
15
|
+
|
16
|
+
script.
|
17
|
+
function parseDateString(e) {
|
18
|
+
return e.replace(/年|月/g, '-').replace(/日/g, '');
|
19
|
+
}
|
20
|
+
|
21
|
+
function tenYear() {
|
22
|
+
let progressElement = document.querySelector(".progress");
|
23
|
+
let pastTimeElement = document.querySelector(".past-time");
|
24
|
+
let percentageLabelElement = document.querySelector(".percentage-label");
|
25
|
+
let startTimeElement = document.getElementById("tenyear-start-time");
|
26
|
+
let endTimeElement = document.getElementById("tenyear-end-time");
|
27
|
+
|
28
|
+
let startTime = new Date(parseDateString(startTimeElement.textContent)).getTime();
|
29
|
+
let endTime = new Date(parseDateString(endTimeElement.textContent)).getTime();
|
30
|
+
|
31
|
+
function updateProgress() {
|
32
|
+
let currentTime = new Date().getTime();
|
33
|
+
let progress = ((currentTime - startTime) / (endTime - startTime) * 100);
|
34
|
+
let progressPercentage = progress <= 100 ? progress + "%" : "100%";
|
35
|
+
|
36
|
+
pastTimeElement.style.setProperty("--past-time-percentage", progress + "%");
|
37
|
+
progressElement.style.setProperty("--progress-percentage", progressPercentage);
|
38
|
+
if(progress > 5){
|
39
|
+
percentageLabelElement.textContent = `${progress.toFixed(0)}%`;
|
40
|
+
percentageLabelElement.style.left = `calc(${progress}% - 28px)`;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
percentageLabelElement.style.visibility = "visible";
|
45
|
+
updateProgress();
|
46
|
+
}
|
47
|
+
|
48
|
+
document.getElementById("tenyear") && tenYear() && window.Pjax.on('complete', tenYear)
|