hexo-theme-solitude 1.4.6 → 1.5.0
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 +16 -3
- package/README.md +2 -2
- package/README_EN.md +2 -2
- package/_config.yml +155 -230
- package/languages/en-US.yml +5 -2
- package/languages/zh-CN.yml +5 -2
- package/languages/zh-TW.yml +5 -2
- package/layout/404.pug +2 -2
- package/layout/includes/footer.pug +8 -6
- package/layout/includes/head/config.pug +7 -7
- package/layout/includes/head/opengraph.pug +5 -4
- package/layout/includes/head/pwa.pug +2 -3
- package/layout/includes/inject/body.pug +17 -19
- package/layout/includes/inject/head.pug +3 -2
- package/layout/includes/mixins/pagination.pug +1 -1
- package/layout/includes/nav.pug +3 -3
- package/layout/includes/page/says.pug +44 -7
- package/layout/includes/sidebar.pug +1 -1
- package/layout/includes/widgets/aside/asideInfoCard.pug +4 -3
- package/layout/includes/widgets/home/banner.pug +11 -4
- package/layout/includes/widgets/home/bbTimeList.pug +13 -7
- package/layout/includes/widgets/home/categoryGroup.pug +11 -8
- package/layout/includes/widgets/home/hometop.pug +1 -2
- package/layout/includes/widgets/home/postList.pug +3 -3
- package/layout/includes/widgets/nav/group.pug +13 -0
- package/layout/includes/widgets/nav/menu.pug +20 -16
- package/layout/includes/widgets/page/about/award.pug +1 -1
- package/layout/includes/widgets/page/banner.pug +8 -13
- package/layout/includes/widgets/page/equipment/content.pug +1 -1
- package/layout/includes/widgets/page/links/linksCard.pug +0 -1
- package/layout/includes/widgets/third-party/comments/waline.pug +2 -0
- package/layout/includes/widgets/third-party/news-comment/twikoo.pug +2 -2
- package/layout/includes/widgets/third-party/news-comment/waline.pug +2 -2
- package/layout/includes/widgets/third-party/search/algolia-search.pug +1 -1
- package/layout/includes/widgets/third-party/search/local-search.pug +1 -1
- package/layout/index.pug +6 -6
- package/layout/page.pug +0 -2
- package/package.json +1 -1
- package/plugins.yml +0 -5
- package/scripts/event/init.js +18 -17
- package/scripts/event/welcome.js +1 -1
- package/scripts/generator/gallery.js +29 -27
- package/scripts/helper/getArchiveLength.js +5 -9
- package/scripts/helper/related_post.js +28 -39
- package/scripts/helper/stylus.js +23 -8
- package/source/css/_global/animation.styl +313 -0
- package/source/css/_layout/basic.styl +10 -1
- package/source/css/_layout/header.styl +5 -5
- package/source/css/_layout/index.styl +0 -1
- package/source/css/_page/_about/skills.styl +1 -1
- package/source/css/_page/_home/category-bar.styl +14 -14
- package/source/css/_page/_home/home-top.styl +57 -45
- package/source/css/_page/_home/recent-post.styl +1 -1
- package/source/css/_page/equipment.styl +3 -2
- package/source/css/_page/home.styl +0 -15
- package/source/css/_page/index.styl +0 -2
- package/source/css/_page/links.styl +9 -8
- package/source/css/_page/says.styl +1 -2
- package/source/css/_page/share.styl +30 -67
- package/source/css/_widgets/_aside/index.styl +1 -1
- package/source/css/_widgets/_aside/info.styl +1 -1
- package/source/css/_widgets/_comment/twikoo.styl +4 -6
- package/source/css/_widgets/_comment/waline.styl +435 -72
- package/source/css/_widgets/_extra/console.styl +1 -1
- package/source/css/_widgets/_extra/fullpage.styl +1 -1
- package/source/css/_widgets/_mixins/footer.styl +1 -1
- package/source/css/_widgets/_post/content.styl +1 -11
- package/source/css/_widgets/_post/meta.styl +2 -2
- package/source/css/_widgets/_post/relatedPost.styl +1 -1
- package/source/css/_widgets/_post/tools.styl +1 -1
- package/source/css/_widgets/_search/algolia-search.styl +4 -2
- package/source/css/_widgets/_tags/note.styl +4 -0
- package/source/css/index.styl +0 -1
- package/source/js/comment/twikoo_commentBarrage.js +76 -75
- package/source/js/covercolor/local.js +11 -10
- package/source/js/main.js +27 -35
- package/source/js/music.js +89 -49
- package/layout/includes/page/rss.pug +0 -20
- package/layout/includes/widgets/home/bb/json.pug +0 -25
- package/layout/includes/widgets/home/bb/local.pug +0 -20
- package/layout/includes/widgets/home/bb/memos.pug +0 -28
- package/layout/includes/widgets/nav/left.pug +0 -10
- package/layout/includes/widgets/page/says/json.pug +0 -82
- package/layout/includes/widgets/page/says/local.pug +0 -44
- package/layout/includes/widgets/page/says/memos.pug +0 -111
- package/source/css/_global/animation.css +0 -813
- package/source/css/_page/rss.styl +0 -82
@@ -1,82 +0,0 @@
|
|
1
|
-
case theme.says.style
|
2
|
-
when 1
|
3
|
-
script.
|
4
|
-
!async function () {
|
5
|
-
document.querySelector('#waterfall').innerHTML = '<li class="item"><div class="bber-content"><p class="datacont"><i class="scoicon sco-loading-line"></i></p></div></li>'
|
6
|
-
await fetch('!{url_for(theme.says.mode_link)}')
|
7
|
-
.then(res => res.json())
|
8
|
-
.then(res => {
|
9
|
-
let list = res.slice(0, !{theme.says.strip})
|
10
|
-
let aplayer = null
|
11
|
-
let video = null
|
12
|
-
let imageBox = null
|
13
|
-
|
14
|
-
document.querySelector('#waterfall').innerHTML = list.map(item => {
|
15
|
-
aplayer = item.aplayer ? `<div class="bber-music"><meting-js server="${item.aplayer.server}" type="song" id="${item.aplayer.id}" mutex="true" preload="none" theme="var(--sco-main)" data-lrctype="0"></meting-js></div>` : null
|
16
|
-
video = item.player ? `<div class="bber-video"><video src="${item.player}" controls="controls" style="objectfit: cover;"></video></div>` : item.bilibili ? `<div class="bber-video"><iframe src="//player.bilibili.com/player.html?autop-lay=0&bvid=${item.bilibili}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe></div>` : null
|
17
|
-
imageBox = item.images ? `<div class="bber-content-img">${item.images.map(img => `<img src="${img}" title="即刻短文配图" />`).join('')}</div>` : null
|
18
|
-
return `<li class="item">
|
19
|
-
<div id="bber-content">
|
20
|
-
<p class="datacont">${item.content || ''}</p>
|
21
|
-
${imageBox || ''}
|
22
|
-
</div>
|
23
|
-
${video || ''}
|
24
|
-
${aplayer || ''}
|
25
|
-
<hr>
|
26
|
-
<div class="bber-bottom">
|
27
|
-
<div class="bber-info">
|
28
|
-
<div class="bber-info-time">
|
29
|
-
<i class="scoicon sco-calendar-todo-fill"></i>
|
30
|
-
<time class="datetime" datetime="${item.date}"></time>
|
31
|
-
</div>
|
32
|
-
${item.link ? `<a class="bber-content-link" href="${item.link}" title="跳转到短文指引的链接" target="_blank"><i class="scoicon sco-link-m-line"></i>链接</a>` : ''}
|
33
|
-
</div>
|
34
|
-
${item.content ? `<a class="bber-reply goComment" onclick="sco.toTalk('${item.content}')"><i class="scoicon sco-chat-fill" style="font-size: 1rem;"></i></a>` : ''}
|
35
|
-
</div>
|
36
|
-
</li>`
|
37
|
-
}).join('')
|
38
|
-
sco.reflashEssayWaterFall();
|
39
|
-
GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
|
40
|
-
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
|
41
|
-
changeTimeFormat();
|
42
|
-
})
|
43
|
-
}()
|
44
|
-
when 2
|
45
|
-
script.
|
46
|
-
!async function () {
|
47
|
-
document.querySelector('#waterfall').innerHTML = '<li class="item"><div class="bber-content"><p class="datacont"><i class="scoicon sco-loading-line"></i></p></div></li>'
|
48
|
-
await fetch('!{url_for(theme.says.mode_link)}')
|
49
|
-
.then(res => res.json())
|
50
|
-
.then(res => {
|
51
|
-
let list = res.slice(0, !{theme.says.strip})
|
52
|
-
let aplayer = null
|
53
|
-
let video = null
|
54
|
-
let imageBox = null
|
55
|
-
|
56
|
-
document.querySelector('#waterfall').innerHTML = list.map(item => {
|
57
|
-
aplayer = item.aplayer ? `<div class="bber-music"><meting-js server="${item.aplayer.server}" type="song" id="${item.aplayer.id}" mutex="true" preload="none" theme="var(--sco-main)" data-lrctype="0"></meting-js></div>` : null
|
58
|
-
video = item.player ? `<div class="bber-video"><video src="${item.player}" controls="controls" style="object-fit: cover;"></video></div>` : item.bilibili ? `<div class="bber-video"><iframe src="//player.bilibili.com/player.html?autoplay=0&bvid=${item.bilibili}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe></div>` : null
|
59
|
-
imageBox = item.images ? `<div class="bber-content-img">${item.images.map(img => `<img src="${img}" title="即刻短文配图" />`).join('')}</div>` : null
|
60
|
-
return `<li class="item">
|
61
|
-
<div class="meta">
|
62
|
-
<img class="no-lightbox nolazyload avatar" src="!{theme.aside.card.author.img}">
|
63
|
-
<div class="info">
|
64
|
-
<span class="bber_nick">#{config.author}</span>
|
65
|
-
<time class="datetime bber_date" datetime="${item.date}"></time>
|
66
|
-
</div>
|
67
|
-
${item.content ? `<a class="bber-reply goComment" onclick="sco.toTalk('${item.content}')"><i class="scoicon sco-chat-fill" style="font-size: 1rem;"></i></a>` : ''}
|
68
|
-
</div>
|
69
|
-
<div id="bber-content">
|
70
|
-
<p class="datacont">${item.content || ''}</p>
|
71
|
-
${imageBox || ''}
|
72
|
-
</div>
|
73
|
-
${video || ''}
|
74
|
-
${aplayer || ''}
|
75
|
-
</li>`
|
76
|
-
}).join('')
|
77
|
-
sco.reflashEssayWaterFall();
|
78
|
-
GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
|
79
|
-
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
|
80
|
-
changeTimeFormat();
|
81
|
-
})
|
82
|
-
}()
|
@@ -1,44 +0,0 @@
|
|
1
|
-
each item in site.data.essay.essay_list.slice(0, theme.says.strip)
|
2
|
-
li.item
|
3
|
-
if theme.says.style === 2
|
4
|
-
.meta
|
5
|
-
img.avatar(src=theme.aside.card.author.img)
|
6
|
-
.info
|
7
|
-
span.bber_nick= config.author
|
8
|
-
time.datetime.bber_date(datetime=moment(item.date).format())
|
9
|
-
if item.content
|
10
|
-
a.bber-reply.goComment(onclick=`sco.toTalk('${item.content}')`)
|
11
|
-
i.scoicon.sco-chat-fill
|
12
|
-
|
13
|
-
#bber-content
|
14
|
-
p.datacont= item.content
|
15
|
-
if item.image
|
16
|
-
.bber-content-img
|
17
|
-
each img in item.image
|
18
|
-
img(src=img title="即刻短文配图")
|
19
|
-
|
20
|
-
if item.aplayer
|
21
|
-
.bber-music
|
22
|
-
meting-js(server=item.aplayer.server type="song" id=item.aplayer.id mutex="true" preload="none" theme="var(--sco-main)" data-lrctype="0")
|
23
|
-
|
24
|
-
if item.video
|
25
|
-
.bber-video
|
26
|
-
if item.video.player
|
27
|
-
video(src=item.video.player controls="controls" style="object-fit: cover;")
|
28
|
-
if item.video.bilibili
|
29
|
-
iframe(src='//player.bilibili.com/player.html?auto-play=0&bvid=' + item.video.bilibili scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true")
|
30
|
-
|
31
|
-
if theme.says.style === 1
|
32
|
-
hr
|
33
|
-
.bber-bottom
|
34
|
-
.bber-info
|
35
|
-
.bber-info-time
|
36
|
-
i.scoicon.sco-calendar-todo-fill
|
37
|
-
time.datetime(datetime=moment(item.date).format())
|
38
|
-
if item.link
|
39
|
-
a.bber-content-link(href=url_for(item.link) title="跳转到短文指引的链接" target="_blank")
|
40
|
-
i.scoicon.sco-link-m-line
|
41
|
-
| 链接
|
42
|
-
if item.content
|
43
|
-
a.bber-reply(onclick=`sco.toTalk('${item.content}')`)
|
44
|
-
i.scoicon.sco-chat-fill
|
@@ -1,111 +0,0 @@
|
|
1
|
-
case theme.says.style
|
2
|
-
when 1
|
3
|
-
script.
|
4
|
-
!async function () {
|
5
|
-
let aplayerRegex = /{aplayer,(.*?),(.*?)}/g;
|
6
|
-
let linkRegex = /(?<!\!)\[([^\]]*)\]\(([^\)]*)\)/g;
|
7
|
-
let bilibiliRegex = /{bilibili,(.*?)}/g;
|
8
|
-
let playerRegex = /{player,(.*?)}/g;
|
9
|
-
let imageRegex = /!\[\]\((.*?)\)/g;
|
10
|
-
let contentRegex = /#.*?\s([^{\n]*)/g;
|
11
|
-
|
12
|
-
document.querySelector('#waterfall').innerHTML = '<i class="scoicon sco-loading-line"></i>'
|
13
|
-
|
14
|
-
await fetch("!{url_for(theme.says.mode_link)}")
|
15
|
-
.then(res => res.json())
|
16
|
-
.then(data => {
|
17
|
-
let list = data.slice(0, !{theme.says.strip});
|
18
|
-
let aplayer = null;
|
19
|
-
let video = null;
|
20
|
-
let imageBox = null;
|
21
|
-
|
22
|
-
document.querySelector('#waterfall').innerHTML = list.map(item => {
|
23
|
-
aplayer = item.content.match(aplayerRegex);
|
24
|
-
aplayer = aplayer ? `<div class="bber-music"><meting-js server="${aplayer[0].replace(aplayerRegex, '$1')}" type="song" id="${aplayer[0].replace(aplayerRegex, '$2')}" mutex="true" preload="none" theme="var(--sco-main)" data-lrctype="0"></meting-js></div>` : null;
|
25
|
-
video = item.content.match(playerRegex);
|
26
|
-
video = video ? `<div class="bber-video"><video src="${video[0].replace(playerRegex, '$1')}" controls="controls" style="object-fit: cover;"></video></div>` : item.content.match(bilibiliRegex);
|
27
|
-
video = item.content.match(bilibiliRegex) ? `<div class="bber-video"><iframe src="//player.bilibili.com/player.html?autoplay=0&bvid=${video[0].replace(bilibiliRegex, '$1')}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe></div>` : video;
|
28
|
-
imageBox = item.content.match(imageRegex);
|
29
|
-
imageBox = imageBox ? `<div class="bber-content-img">${imageBox.map(img => `<img src="${img.replace(imageRegex, '$1')}" title="即刻短文配图" />`).join('')}</div>` : '';
|
30
|
-
let time = new Date(item.createdTs * 1000).toISOString().replace('Z', '+08:00');
|
31
|
-
let content = item.content.match(contentRegex).map(item => item.replace(contentRegex, '$1'));
|
32
|
-
let link = item.content.match(linkRegex);
|
33
|
-
link = link ? `<a class="bber-content-link" href='${link[0].replace(linkRegex, '$2')}' title="${link[0].replace(linkRegex, '$1')}" target="_blank"><i class="scoicon sco-link-m-line"></i>链接</a>` : '';
|
34
|
-
return `<li class="item">
|
35
|
-
<div id="bber-content">
|
36
|
-
<p class="datacont">${content}</p>
|
37
|
-
${imageBox || ''}
|
38
|
-
</div>
|
39
|
-
${video || ''}
|
40
|
-
${aplayer || ''}
|
41
|
-
<hr>
|
42
|
-
<div class="bber-bottom">
|
43
|
-
<div class="bber-info">
|
44
|
-
<div class="bber-info-time">
|
45
|
-
<i class="scoicon sco-calendar-todo-fill"></i>
|
46
|
-
<time class="datetime" datetime="${time}"></time>
|
47
|
-
</div>
|
48
|
-
${link}
|
49
|
-
</div>
|
50
|
-
${content ? `<a class="bber-reply goComment" onclick="sco.toTalk('${content}')"><i class="scoicon sco-chat-fill" style="font-size: 1rem;"></i></a>` : ''}
|
51
|
-
</div>
|
52
|
-
</li>`;
|
53
|
-
}).join('');
|
54
|
-
sco.reflashEssayWaterFall();
|
55
|
-
GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
|
56
|
-
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
|
57
|
-
changeTimeFormat();
|
58
|
-
}).catch(error => console.log(error));
|
59
|
-
}();
|
60
|
-
when 2
|
61
|
-
script.
|
62
|
-
!async function () {
|
63
|
-
let aplayerRegex = /{aplayer,(.*?),(.*?)}/g;
|
64
|
-
let bilibiliRegex = /{bilibili,(.*?)}/g;
|
65
|
-
let playerRegex = /{player,(.*?)}/g;
|
66
|
-
let imageRegex = /!\[\]\((.*?)\)/g;
|
67
|
-
let contentRegex = /#.*?\s([^{\n]*)/g
|
68
|
-
|
69
|
-
document.querySelector('#waterfall').innerHTML = '<i class="scoicon sco-loading-line"></i>'
|
70
|
-
|
71
|
-
await fetch("!{url_for(theme.says.mode_link)}")
|
72
|
-
.then(res => res.json())
|
73
|
-
.then(data => {
|
74
|
-
let list = data.slice(0, !{theme.says.strip})
|
75
|
-
let aplayer = null;
|
76
|
-
let video = null;
|
77
|
-
let imageBox = null;
|
78
|
-
|
79
|
-
document.querySelector('#waterfall').innerHTML = list.map(item => {
|
80
|
-
aplayer = item.content.match(aplayerRegex);
|
81
|
-
aplayer = aplayer ? `<div class="bber-music"><meting-js server="${aplayer[0].replace(aplayerRegex, '$1')}" type="song" id="${aplayer[0].replace(aplayerRegex, '$2')}" mutex="true" preload="none" theme="var(--sco-main)" data-lrctype="0"></meting-js></div>` : null;
|
82
|
-
video = item.content.match(playerRegex);
|
83
|
-
video = video ? `<div class="bber-video"><video src="${video[0].replace(playerRegex, '$1')}" controls="controls" style="object-fit: cover;"></video></div>` : item.content.match(bilibiliRegex);
|
84
|
-
video = item.content.match(bilibiliRegex) ? `<div class="bber-video"><iframe src="//player.bilibili.com/player.html?autoplay=0&bvid=${video[0].replace(bilibiliRegex, '$1')}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe></div>` : video;
|
85
|
-
imageBox = item.content.match(imageRegex);
|
86
|
-
imageBox = imageBox ? `<div class="bber-content-img">${imageBox.map(img => `<img src="${img.replace(imageRegex, '$1')}" title="即刻短文配图" />`).join('')}</div>` : '';
|
87
|
-
let time = new Date(item.createdTs * 1000).toISOString().replace('Z', '+08:00');
|
88
|
-
let content = item.content.match(contentRegex).map(item => item.replace(contentRegex, '$1'));
|
89
|
-
return `<li class="item">
|
90
|
-
<div class="meta">
|
91
|
-
<img class="no-lightbox nolazyload avatar" src="!{theme.aside.card.author.img}">
|
92
|
-
<div class="info">
|
93
|
-
<span class="bber_nick">#{config.author}</span>
|
94
|
-
<time class="datetime bber_date" datetime="${time}"></time>
|
95
|
-
</div>
|
96
|
-
${content ? `<a class="bber-reply goComment" onclick="sco.toTalk('${content}')"><i class="scoicon sco-chat-fill" style="font-size: 1rem;"></i></a>` : ''}
|
97
|
-
</div>
|
98
|
-
<div id="bber-content">
|
99
|
-
<p class="datacont">${content}</p>
|
100
|
-
${imageBox || ''}
|
101
|
-
</div>
|
102
|
-
${video || ''}
|
103
|
-
${aplayer || ''}
|
104
|
-
</li>`;
|
105
|
-
}).join('');
|
106
|
-
sco.reflashEssayWaterFall();
|
107
|
-
GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
|
108
|
-
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
|
109
|
-
changeTimeFormat();
|
110
|
-
}).catch(error => console.log(error));
|
111
|
-
}();
|