hexo-theme-solitude 1.4.2 → 1.4.4

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.
Files changed (77) hide show
  1. package/CONTRIBUTING.md +1 -1
  2. package/README.md +1 -1
  3. package/README_EN.md +1 -1
  4. package/_config.yml +165 -151
  5. package/languages/en-US.yml +31 -2
  6. package/languages/zh-CN.yml +32 -2
  7. package/languages/zh-TW.yml +147 -0
  8. package/layout/includes/footer.pug +2 -5
  9. package/layout/includes/head/config.pug +15 -2
  10. package/layout/includes/inject/body.pug +13 -4
  11. package/layout/includes/inject/head.pug +1 -4
  12. package/layout/includes/layout.pug +4 -0
  13. package/layout/includes/loading.pug +1 -1
  14. package/layout/includes/page/album.pug +4 -22
  15. package/layout/includes/page/gallery.pug +2 -2
  16. package/layout/includes/page/music.pug +1 -4
  17. package/layout/includes/page/says.pug +1 -3
  18. package/layout/includes/widgets/aside/asideInfoCard.pug +1 -1
  19. package/layout/includes/widgets/home/bb/json.pug +3 -2
  20. package/layout/includes/widgets/home/bb/local.pug +2 -3
  21. package/layout/includes/widgets/home/bb/memos.pug +4 -2
  22. package/layout/includes/widgets/page/about/authorinfo.pug +1 -1
  23. package/layout/includes/widgets/page/about/award.pug +6 -3
  24. package/layout/includes/widgets/page/about/hobbies.pug +2 -2
  25. package/layout/includes/widgets/page/about/motto.pug +17 -15
  26. package/layout/includes/widgets/page/about/skillsinfo.pug +38 -36
  27. package/layout/includes/widgets/page/about/tenyear.pug +1 -1
  28. package/layout/includes/widgets/page/says/json.pug +13 -9
  29. package/layout/includes/widgets/page/says/local.pug +1 -1
  30. package/layout/includes/widgets/page/says/memos.pug +10 -6
  31. package/layout/includes/widgets/rightside/index.pug +33 -22
  32. package/package.json +1 -1
  33. package/plugins.yml +7 -3
  34. package/scripts/event/cdn.js +5 -1
  35. package/scripts/event/init.js +18 -19
  36. package/scripts/event/page.js +0 -5
  37. package/scripts/filter/checkThemeConfig.js +23 -7
  38. package/scripts/filter/lazyload.js +2 -3
  39. package/scripts/generator/gallery.js +47 -0
  40. package/scripts/helper/related_post.js +0 -6
  41. package/scripts/helper/stylus.js +8 -3
  42. package/source/css/_layout/basic.styl +0 -3
  43. package/source/css/_layout/index.styl +54 -34
  44. package/source/css/_page/_about/index.styl +49 -0
  45. package/source/css/_page/{about → _about}/reward.styl +7 -0
  46. package/source/css/_page/{gallery → _gallery}/index.styl +16 -8
  47. package/source/css/_page/_home/home-top.styl +125 -302
  48. package/source/css/_page/_home/index.styl +9 -4
  49. package/source/css/_page/_home/recent-post.styl +1 -0
  50. package/source/css/_page/index.styl +3 -152
  51. package/source/css/_page/share.styl +318 -0
  52. package/source/css/_widgets/_aside/info.styl +3 -0
  53. package/source/css/_widgets/_comment/twikoo.styl +1 -1
  54. package/source/img/loading.gif +0 -0
  55. package/source/js/covercolor/local.js +11 -11
  56. package/source/js/main.js +63 -55
  57. package/source/js/rightside.js +159 -342
  58. package/source/js/search/algolia.js +1 -3
  59. package/source/js/search/local.js +1 -3
  60. package/source/js/tw_cn.js +76 -0
  61. package/source/js/utils.js +8 -27
  62. package/layout/includes/page/not_configured.pug +0 -18
  63. package/scripts/helper/cdn.js +0 -12
  64. package/source/css/_page/about/index.styl +0 -39
  65. /package/source/css/_page/{about → _about}/author.styl +0 -0
  66. /package/source/css/_page/{about → _about}/buff.styl +0 -0
  67. /package/source/css/_page/{about → _about}/careers.styl +0 -0
  68. /package/source/css/_page/{about → _about}/contentinfo.styl +0 -0
  69. /package/source/css/_page/{about → _about}/game.styl +0 -0
  70. /package/source/css/_page/{about → _about}/like.styl +0 -0
  71. /package/source/css/_page/{about → _about}/maxim.styl +0 -0
  72. /package/source/css/_page/{about → _about}/myphoto.styl +0 -0
  73. /package/source/css/_page/{about → _about}/oneself.styl +0 -0
  74. /package/source/css/_page/{about → _about}/personalities.styl +0 -0
  75. /package/source/css/_page/{about → _about}/skills.styl +0 -0
  76. /package/source/css/_page/{about → _about}/statistic.styl +0 -0
  77. /package/source/css/_page/{about → _about}/tenyear.styl +0 -0
@@ -49,11 +49,8 @@ div#footer-bar
49
49
  div.copyright © #{moment(theme.aside.siteinfo.runtime).year()} - #{new Date().getFullYear()} By 
50
50
  a.footer-bar-link(href="/")= config.author
51
51
  div.footer-bar-right
52
- if theme.footer.rss
53
- a.footer-bar-link(href=theme.footer.rss)= _p('footer.rss')
54
- a.footer-bar-link(href="https://github.com/DuoSco/hexo-theme-solitude")= _p('footer.theme')
55
- if theme.site && theme.site.icp
56
- a.footer-bar-link(href=theme.site.icp_url || "https://beian.miit.gov.cn/#/Integrated/index")= theme.site.icp
52
+ each item in theme.footer.links
53
+ a.footer-bar-link(href=url_for(item.url), title=item.name)= item.name
57
54
  a.footer-bar-link.cc(href=theme.footer.license)
58
55
  i.scoicon.sco-copyright-line
59
56
  i.scoicon.sco-creative-commons-by-line
@@ -22,6 +22,14 @@
22
22
  }
23
23
  }
24
24
 
25
+ let translate = 'undefined';
26
+ if (theme.translate && theme.translate.enable) {
27
+ translate = JSON.stringify({
28
+ defaultEncoding: theme.translate.defaultEncoding,
29
+ translateDelay: theme.translate.translateDelay,
30
+ })
31
+ }
32
+
25
33
  const commentInfoStart = theme.comment.randomInfoStart.map(item => `"${item}"`) || ""
26
34
  const commentInfoEnd = theme.comment.randomInfoEnd.map(item => `"${item}"`) || ""
27
35
  var sayhello2 = theme.aside.card.sayhello2.map(item => `"${item}"`) || []
@@ -64,6 +72,10 @@ script.
64
72
  empty: '!{_p('search.empty')}',
65
73
  hit: '!{_p('search.hit')}',
66
74
  placeholder: '!{_p('search.placeholder')}',
75
+ },
76
+ chs: {
77
+ chs_to_cht: '!{_p('chs.chs_tw')}',
78
+ cht_to_chs: '!{_p('chs.chs_cn')}',
67
79
  }
68
80
  },
69
81
  aside: {
@@ -93,7 +105,7 @@ script.
93
105
  url: '!{theme.comment.waline.envId}',
94
106
  }
95
107
  },
96
- lightbox: '!{ theme.mediumZoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null" )}',
108
+ lightbox: '!{ theme.mediumZoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null")}',
97
109
  rightside: {
98
110
  enable: !{theme.rightside.enable}
99
111
  },
@@ -105,5 +117,6 @@ script.
105
117
  },
106
118
  music: {
107
119
  enable: !{theme.music.enable},
108
- }
120
+ },
121
+ translate: !{translate},
109
122
  }
@@ -2,10 +2,23 @@
2
2
 
3
3
  div
4
4
  script(src=url_for(theme.cdn.main))
5
+ script(src=url_for(theme.cdn.utils))
5
6
 
6
7
  if theme.album.enable
7
8
  script(src=url_for(theme.cdn.macy_js))
8
9
 
10
+ if theme.rightside.enable
11
+ include ../widgets/rightside/index
12
+ script(src=url_for(theme.cdn.rightside_js))
13
+
14
+ if theme.display_mode.universe
15
+ script(src=url_for(theme.cdn.universe_js))
16
+ script.
17
+ dark()
18
+
19
+ if theme.translate.enable
20
+ script(src=url_for(theme.cdn.translate))
21
+
9
22
  mixin katex
10
23
  link(rel="stylesheet", href=url_for(theme.cdn.katex))
11
24
  if theme.katex.copytex
@@ -37,10 +50,6 @@ div
37
50
  if theme.says.home_mini
38
51
  script(src=url_for(theme.cdn.swiper_js))
39
52
 
40
- if theme.rightside.enable
41
- include ../widgets/rightside/index
42
- script(src=url_for(theme.cdn.rightside_js))
43
-
44
53
  // post-ai)
45
54
  if theme.post_ai.enable
46
55
  script(src=url_for(theme.cdn.sco_ai_js))
@@ -12,7 +12,7 @@ if theme.capsule.enable || theme.music.enable
12
12
  if theme.says.home_mini
13
13
  link(rel="stylesheet", href=url_for(theme.cdn.swiper_css))
14
14
 
15
- if theme.fancybox
15
+ if theme.lightbox && theme.fancybox
16
16
  link(rel="stylesheet", href=url_for(theme.cdn.fancyapps_css))
17
17
 
18
18
  // Open Graph
@@ -79,9 +79,6 @@ script.
79
79
  "color: #fff; background: linear-gradient(-25deg, #a8edea, #fed6e3); padding: 8px 15px; border-radius: 8px; text-shadow: 2px 2px 4px white; color: black;"
80
80
  );
81
81
 
82
- div
83
- script(src=url_for(theme.cdn.utils))
84
-
85
82
  // custom inject
86
83
  if theme.extends.head
87
84
  each item in theme.extends.head
@@ -5,6 +5,10 @@ html(lang=config.language, data-theme="light")
5
5
  head
6
6
  include ./head.pug
7
7
  body#body(data-type=page.type)
8
+ // universe
9
+ if theme.display_mode.universe
10
+ canvas#universe
11
+
8
12
  // loading
9
13
  if theme.loading.fullpage
10
14
  include ./loading.pug
@@ -1,6 +1,6 @@
1
1
  div(id="loading-box" onclick="preloader.endLoading();" style="zoom:1")
2
2
  div.loading-bg
3
- img.loading-img(src=url_for(theme.site.icon), alt="loading image")
3
+ img.loading-img.nolazyload(src=url_for(theme.site.icon), alt="loading image")
4
4
 
5
5
  script.
6
6
  const preloader = {
@@ -1,7 +1,6 @@
1
1
  include ../widgets/page/banner
2
2
 
3
- - var gallery = site.data.gallery.gallery
4
- - var album = gallery.find(item => item.album = page.album)
3
+ - var album = page.album
5
4
  - var {limit} = theme.album
6
5
 
7
6
  if album
@@ -11,12 +10,7 @@ if album
11
10
  script.
12
11
  function initGallery() {
13
12
  let macy = Macy({ container: '#sco-container', trueOrder: false, waitForImages: true, margin: 5, columns: !{limit}, breakAt: { 1200: 5, 940: 3, 520: 2, 400: 1 }})
14
- macy.runOnImageLoad(function () {
15
- setTimeout(function () {
16
- GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".sco-gallery-item img"));
17
- macy.recalculate(true)
18
- }, 500);
19
- }, true)
13
+ macy.runOnImageLoad(function () { setTimeout(function () { GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".sco-gallery-item img")); macy.recalculate(true); }, 500); }, true)
20
14
  }
21
15
  (async function () {
22
16
  await fetch('!{url_for(album.json)}')
@@ -24,14 +18,7 @@ if album
24
18
  .then(data => {
25
19
  let html = ''
26
20
  data = data.sort((a, b) => b.date - a.date)
27
- data.forEach(item => {
28
- html += `
29
- <div class="sco-gallery-item">
30
- <span class="locate">${item.locate}</span>
31
- <img class="sco-gallery-image" src="${item.image}" alt="${item.content}">
32
- </div>
33
- `
34
- })
21
+ data.forEach(item => { html += `<div class="sco-gallery-item"><span class="locate">${item.locate}</span><img class="sco-gallery-image" src="${item.image}" alt="${item.content}"></div>` })
35
22
  document.querySelector('#sco-container').innerHTML = html
36
23
  GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
37
24
  initGallery()
@@ -46,11 +33,6 @@ if album
46
33
  script.
47
34
  function initGallery(){
48
35
  let macy = Macy({ container: '#sco-container', trueOrder: false, waitForImages: true, margin: 5, columns: !{limit}, breakAt: { 1200: 5, 940: 3, 520: 2, 400: 1 }})
49
- macy.runOnImageLoad(function () {
50
- setTimeout(function () {
51
- GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".sco-gallery-item img"));
52
- macy.recalculate(true)
53
- }, 500);
54
- }, true)
36
+ macy.runOnImageLoad(function () { setTimeout(function () { GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".sco-gallery-item img")); macy.recalculate(true); }, 500); }, true)
55
37
  }
56
38
  document.addEventListener('DOMContentLoaded', initGallery);
@@ -1,11 +1,11 @@
1
1
  include ../widgets/page/banner
2
2
 
3
- - var gallery = site.data.gallery.gallery
3
+ - var gallery = page.album
4
4
 
5
5
  if theme.album.enable && gallery
6
6
  #gallery
7
7
  each item in gallery
8
- .gallery-item(onclick="pjax.loadUrl('/" + item.album + "/')")
8
+ .gallery-item(onclick="pjax.loadUrl('/" + page.url + "/" + item.album + "/')")
9
9
  img.cover(src=item.cover)
10
10
  span.title= item.class_name
11
11
  span.desc= item.descr
@@ -13,7 +13,4 @@ if theme.music.enable
13
13
  volume: #{theme.music.volume},
14
14
  mutex: #{theme.music.mutex}
15
15
  }
16
- }
17
-
18
- else
19
- include not_configured
16
+ }
@@ -14,6 +14,4 @@ if theme.says.enable
14
14
  if theme.says.strip === -1
15
15
  | - 已展开所有短文 -
16
16
  else
17
- | - 只展示最近 #{theme.says.strip} 条短文 -
18
- else
19
- include ./not_configured.pug
17
+ | - 只展示最近 #{theme.says.strip} 条短文 -
@@ -11,7 +11,7 @@
11
11
  .author-info__description!= theme.aside.card.content
12
12
  .author-info__description2!= theme.aside.card.content2
13
13
  .author-info__bottom-group
14
- a.author-info__bottom-group-left(href=theme.about ? "/about/" : "/")
14
+ a.author-info__bottom-group-left(href=url_for(theme.aside.card.url))
15
15
  .author-info__name= config.author
16
16
  .author-info__desc!= config.subtitle
17
17
  .card-info-social-icons.is-center
@@ -1,7 +1,7 @@
1
1
  script.
2
2
  !async function () {
3
3
  const htmlTagRegex = /<[^>]+>/g;
4
-
4
+ document.querySelector('#bber-talk').innerHTML = '<div class="li-style swiper-slide"><i class="scoicon sco-loading-line"></i></div>';
5
5
  await fetch('!{theme.says.mode_link}')
6
6
  .then(res => res.json())
7
7
  .then(res => {
@@ -17,6 +17,7 @@ script.
17
17
  return `<div class="li-style swiper-slide">${content}</div>`;
18
18
  }).join('');
19
19
 
20
- sco.initbbtalk();
20
+ document.addEventListener('DOMContentLoaded', sco.initbbtalk)
21
+ document.addEventListener('pjax:complete', sco.initbbtalk)
21
22
  }).catch(err => console.log('bbtime |', err));
22
23
  }();
@@ -12,6 +12,5 @@ each item, i in site.data.essay.essay_list.slice(0, 10)
12
12
  if item.link
13
13
  i.scoicon.sco-links
14
14
  script.
15
- document.addEventListener('DOMContentLoaded', function () {
16
- sco.initbbtalk()
17
- })
15
+ document.addEventListener('DOMContentLoaded', sco.initbbtalk)
16
+ document.addEventListener('pjax:complete', sco.initbbtalk)
@@ -1,5 +1,6 @@
1
1
  script.
2
2
  !async function () {
3
+ document.querySelector('#bber-talk').innerHTML = '<div class="li-style swiper-slide"><i class="scoicon sco-loading-line"></i></div>'
3
4
  await fetch('!{theme.says.mode_link}')
4
5
  .then(response => response.json())
5
6
  .then(data => {
@@ -17,9 +18,10 @@ script.
17
18
  let video = item.content.match(playerRegex) ? '<i class="scoicon sco-video-fill"></i>' : item.content.match(bilibiliRegex) ? '<i class="scoicon sco-bilibili-line"></i>' : '';
18
19
  let link = item.content.match(linkRegex) ? `<i class="scoicon sco-link"></i>` : '';
19
20
 
20
- return `<div class="li-style swiper-slide">${content+aplayer+video+imageBox+link}</div>`
21
+ return `<div class="li-style swiper-slide">${content + aplayer + video + imageBox + link}</div>`
21
22
  }).join(' ')
22
- sco.initbbtalk()
23
+ document.addEventListener('DOMContentLoaded', sco.initbbtalk)
24
+ document.addEventListener('pjax:complete', sco.initbbtalk)
23
25
  })
24
26
  .catch(error => console.error('bbtime | ', error));
25
27
  }()
@@ -10,4 +10,4 @@ if authorinfo
10
10
  .author-tag-right
11
11
  each tag in authorinfo.rightTags
12
12
  span.author-tag= tag
13
- .author-title= authorinfo.title
13
+ .author-title= site.data.about.title
@@ -7,14 +7,17 @@ if site.data.about.rewardList
7
7
  .author-content-item-tips= _p('award.about.tip')
8
8
  span.author-content-item-title= _p('award.about.title')
9
9
  .author-content-item-description
10
- = award.description
10
+ = award.description
11
11
  .reward-list-all
12
12
  each reward in site.data.about.rewardList
13
13
  - sum += reward.money
14
14
  .reward-list-item
15
15
  .reward-list-item-name= reward.name
16
16
  .reward-list-bottom-group
17
- .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);" : ""))
18
+ if reward.icon
19
+ i.scoicon(class=reward.icon)
20
+ | ¥ #{reward.money}
18
21
  time.datatime.reward-list-item-time(datetime=moment(reward.time).format())
19
22
  if theme.post.award.enable
20
23
  .post-reward
@@ -33,4 +36,4 @@ if site.data.about.rewardList
33
36
  img.post-qr-code-img(alt=reward.description, src=reward.image)
34
37
  .post-qr-code-desc= reward.description
35
38
  .reward-list-tips
36
- p= award.tips.replace('{sum}', sum)
39
+ p= award.tips.replace('{sum}', sum.toFixed(2))
@@ -1,5 +1,5 @@
1
- - var game1 = game1
2
- - var game2 = game2
1
+ - var game1 = site.data.about.game1
2
+ - var game2 = site.data.about.game2
3
3
 
4
4
  if game1 || game2
5
5
  .author-content
@@ -3,18 +3,20 @@
3
3
 
4
4
  if motto || expertise
5
5
  .author-content
6
- .author-content-item.maxim
7
- .author-content-item-tips= motto.title
8
- span.maxim-title
9
- span= motto.prefix
10
- span= motto.content
11
- .author-content-item.buff
12
- .card-content
13
- .author-content-item-tips= expertise.title
14
- span.buff-title
15
- span
16
- | #{expertise.prefix}
17
- span.inline-word= expertise.specialist
18
- span
19
- | #{expertise.content}
20
- span.inline-word= expertise.level
6
+ if motto
7
+ .author-content-item.maxim
8
+ .author-content-item-tips= motto.title
9
+ span.maxim-title
10
+ span= motto.prefix
11
+ span= motto.content
12
+ if expertise
13
+ .author-content-item.buff
14
+ .card-content
15
+ .author-content-item-tips= expertise.title
16
+ span.buff-title
17
+ span
18
+ | #{expertise.prefix}
19
+ span.inline-word= expertise.specialist
20
+ span
21
+ | #{expertise.content}
22
+ span.inline-word= expertise.level
@@ -1,40 +1,42 @@
1
1
  - var skills = site.data.about.skills
2
2
  - var careers = site.data.about.careers
3
3
 
4
- if skills || caches
4
+ if skills || careers
5
5
  .author-content
6
- .author-content-item.skills
7
- .card-content
8
- .author-content-item-tips= skills.title
9
- span.author-content-item-title= skills.subtitle
10
- .skills-style-group
11
- .tags-group-all
12
- .tags-group-wrapper
13
- each i in [1,2]
14
- - var pair = []
15
- each tag, index in skills.tags
16
- - pair.push(tag)
17
- if pair.length === 2 || index === skills.tags.length - 1
18
- .tags-group-icon-pair
19
- each item in pair
20
- .tags-group-icon(style=`background:${item.color}`)
21
- img(src=item.icon, title=item.title)
22
- - pair = []
23
- .skills-list
24
- each tag in skills.tags
25
- .skill-info
26
- .skill-icon(style=`background:${tag.color}`)
27
- img(src=tag.icon, title=tag.title)
28
- .skill-name
29
- span= tag.title
30
- .etc ...
31
- .author-content-item.careers
32
- .card-content
33
- .author-content-item-tips= careers.title
34
- span.author-content-item-title= careers.subtitle
35
- .careers-group
36
- each item in careers.items
37
- .careers-item
38
- .circle(style=`background:${item.color}`)
39
- .name= `${item.school}, ${item.major}`
40
- img.author-content-img(src=careers.image, alt=careers.title)
6
+ if skills
7
+ .author-content-item.skills
8
+ .card-content
9
+ .author-content-item-tips= skills.title
10
+ span.author-content-item-title= skills.subtitle
11
+ .skills-style-group
12
+ .tags-group-all
13
+ .tags-group-wrapper
14
+ each i in [1,2]
15
+ - var pair = []
16
+ each tag, index in skills.tags
17
+ - pair.push(tag)
18
+ if pair.length === 2 || index === skills.tags.length - 1
19
+ .tags-group-icon-pair
20
+ each item in pair
21
+ .tags-group-icon(style=`background:${item.color}`)
22
+ img(src=item.icon, title=item.title)
23
+ - pair = []
24
+ .skills-list
25
+ each tag in skills.tags
26
+ .skill-info
27
+ .skill-icon(style=`background:${tag.color}`)
28
+ img(src=tag.icon, title=tag.title)
29
+ .skill-name
30
+ span= tag.title
31
+ .etc ...
32
+ if careers
33
+ .author-content-item.careers
34
+ .card-content
35
+ .author-content-item-tips= careers.title
36
+ span.author-content-item-title= careers.subtitle
37
+ .careers-group
38
+ each item in careers.items
39
+ .careers-item
40
+ .circle(style=`background:${item.color}`)
41
+ .name= `${item.school}, ${item.major}`
42
+ img.author-content-img(src=careers.image, alt=careers.title)
@@ -37,7 +37,7 @@ if tenyear
37
37
  progressElement.style.setProperty("--progress-percentage", progressPercentage);
38
38
  if(progress > 5){
39
39
  percentageLabelElement.textContent = `${progress.toFixed(0)}%`;
40
- percentageLabelElement.style.left = `calc(${progress}% - 28px)`;
40
+ percentageLabelElement.style.left = `calc(${progress}% - 35px)`;
41
41
  }
42
42
  }
43
43
 
@@ -2,6 +2,7 @@ case theme.says.style
2
2
  when 1
3
3
  script.
4
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>'
5
6
  await fetch('!{url_for(theme.says.mode_link)}')
6
7
  .then(res => res.json())
7
8
  .then(res => {
@@ -26,22 +27,24 @@ case theme.says.style
26
27
  <div class="bber-info">
27
28
  <div class="bber-info-time">
28
29
  <i class="scoicon sco-calendar-todo-fill"></i>
29
- <time class="datetime" datetime="${item.create_time}"></time>
30
+ <time class="datetime" datetime="${item.date}"></time>
30
31
  </div>
31
- ${item.link ? `<a class="bber-content-link" href="${item.link}" title="跳转到短文指引的链接"><i class="scoicon sco-link-m-line"></i>链接</a>` : ''}
32
+ ${item.link ? `<a class="bber-content-link" href="${item.link}" title="跳转到短文指引的链接" target="_blank"><i class="scoicon sco-link-m-line"></i>链接</a>` : ''}
32
33
  </div>
33
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>` : ''}
34
35
  </div>
35
36
  </li>`
36
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();
37
42
  })
38
- GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg()
39
- GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
40
- changeTimeFormat()
41
43
  }()
42
44
  when 2
43
45
  script.
44
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>'
45
48
  await fetch('!{url_for(theme.says.mode_link)}')
46
49
  .then(res => res.json())
47
50
  .then(res => {
@@ -56,10 +59,10 @@ case theme.says.style
56
59
  imageBox = item.images ? `<div class="bber-content-img">${item.images.map(img => `<img src="${img}" title="即刻短文配图" />`).join('')}</div>` : null
57
60
  return `<li class="item">
58
61
  <div class="meta">
59
- <img class="no-lightbox no-lazyload avatar" src="!{theme.aside.card.author.img}">
62
+ <img class="no-lightbox nolazyload avatar" src="!{theme.aside.card.author.img}">
60
63
  <div class="info">
61
64
  <span class="bber_nick">#{config.author}</span>
62
- <time class="datetime bber_date" datetime="${item.create_time}"></time>
65
+ <time class="datetime bber_date" datetime="${item.date}"></time>
63
66
  </div>
64
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>` : ''}
65
68
  </div>
@@ -71,8 +74,9 @@ case theme.says.style
71
74
  ${aplayer || ''}
72
75
  </li>`
73
76
  }).join('')
74
- GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg()
77
+ sco.reflashEssayWaterFall();
78
+ GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
75
79
  GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
76
- changeTimeFormat()
80
+ changeTimeFormat();
77
81
  })
78
82
  }()
@@ -36,7 +36,7 @@ each item in site.data.essay.essay_list.slice(0, theme.says.strip)
36
36
  i.scoicon.sco-calendar-todo-fill
37
37
  time.datetime(datetime=moment(item.date).format())
38
38
  if item.link
39
- a.bber-content-link(href=url_for(item.link) title="跳转到短文指引的链接")
39
+ a.bber-content-link(href=url_for(item.link) title="跳转到短文指引的链接" target="_blank")
40
40
  i.scoicon.sco-link-m-line
41
41
  | 链接
42
42
  if item.content
@@ -7,7 +7,9 @@ case theme.says.style
7
7
  let bilibiliRegex = /{bilibili,(.*?)}/g;
8
8
  let playerRegex = /{player,(.*?)}/g;
9
9
  let imageRegex = /!\[\]\((.*?)\)/g;
10
- let contentRegex = /#.*?\s([^{\n]*)/g
10
+ let contentRegex = /#.*?\s([^{\n]*)/g;
11
+
12
+ document.querySelector('#waterfall').innerHTML = '<i class="scoicon sco-loading-line"></i>'
11
13
 
12
14
  await fetch("!{url_for(theme.says.mode_link)}")
13
15
  .then(res => res.json())
@@ -49,11 +51,11 @@ case theme.says.style
49
51
  </div>
50
52
  </li>`;
51
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();
52
58
  }).catch(error => console.log(error));
53
- sco.reflashEssayWaterFall();
54
- GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
55
- GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
56
- changeTimeFormat();
57
59
  }();
58
60
  when 2
59
61
  script.
@@ -64,6 +66,8 @@ case theme.says.style
64
66
  let imageRegex = /!\[\]\((.*?)\)/g;
65
67
  let contentRegex = /#.*?\s([^{\n]*)/g
66
68
 
69
+ document.querySelector('#waterfall').innerHTML = '<i class="scoicon sco-loading-line"></i>'
70
+
67
71
  await fetch("!{url_for(theme.says.mode_link)}")
68
72
  .then(res => res.json())
69
73
  .then(data => {
@@ -84,7 +88,7 @@ case theme.says.style
84
88
  let content = item.content.match(contentRegex).map(item => item.replace(contentRegex, '$1'));
85
89
  return `<li class="item">
86
90
  <div class="meta">
87
- <img class="no-lightbox no-lazyload avatar" src="!{theme.aside.card.author.img}">
91
+ <img class="no-lightbox nolazyload avatar" src="!{theme.aside.card.author.img}">
88
92
  <div class="info">
89
93
  <span class="bber_nick">#{config.author}</span>
90
94
  <time class="datetime bber_date" datetime="${time}"></time>