hexo-theme-solitude 3.0.3 → 3.0.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 (33) hide show
  1. package/_config.yml +7 -12
  2. package/languages/default.yml +6 -0
  3. package/languages/en.yml +4 -0
  4. package/languages/zh-CN.yml +4 -0
  5. package/languages/zh-TW.yml +4 -0
  6. package/layout/includes/footer.pug +22 -18
  7. package/layout/includes/header.pug +2 -2
  8. package/layout/includes/inject/body.pug +2 -4
  9. package/layout/includes/inject/head.pug +1 -1
  10. package/layout/includes/sidebar.pug +1 -1
  11. package/layout/includes/widgets/aside/aside.pug +25 -17
  12. package/layout/includes/widgets/aside/asideInfoCard.pug +1 -1
  13. package/layout/includes/widgets/page/kit/content.pug +2 -2
  14. package/layout/includes/widgets/page/links/linksDiscn.pug +1 -1
  15. package/layout/includes/widgets/page/recentcomment/artalk.pug +2 -2
  16. package/layout/includes/widgets/page/recentcomment/twikoo.pug +2 -2
  17. package/layout/includes/widgets/page/recentcomment/valine.pug +2 -2
  18. package/layout/includes/widgets/page/recentcomment/waline.pug +2 -2
  19. package/layout/includes/widgets/post/copyright.pug +2 -2
  20. package/layout/includes/widgets/post/postInfo.pug +1 -1
  21. package/layout/includes/widgets/sidebar/twikoo.pug +1 -1
  22. package/layout/index.pug +0 -2
  23. package/package.json +1 -1
  24. package/plugins.yml +3 -3
  25. package/scripts/event/merge_config.js +0 -1
  26. package/scripts/filter/default.js +0 -1
  27. package/source/css/_layout/console.styl +1 -1
  28. package/source/css/_layout/footer.styl +13 -14
  29. package/source/css/_layout/sidebar.styl +1 -1
  30. package/source/css/_post/copyright.styl +0 -3
  31. package/source/img/default_avatar.avif +0 -0
  32. package/source/img/logo.png +0 -0
  33. package/layout/includes/widgets/home/carousel.pug +0 -74
package/_config.yml CHANGED
@@ -134,8 +134,10 @@ aside:
134
134
  # 信息卡
135
135
  my_card:
136
136
  author:
137
- img: /img/avatar.avif # url
137
+ img: /img/logo.png # url
138
138
  sticker: # url, 24x24 size
139
+ # 介绍 / Introduction
140
+ description: 只有迎风,风筝才能飞得更高。
139
141
  # 内容 / Content
140
142
  content: # 这是我的博客 / This is my Blog
141
143
  state:
@@ -249,9 +251,6 @@ page:
249
251
  # 文章默认设置
250
252
  post:
251
253
  default:
252
- # The cover of the article is displayed
253
- # 文章封面显示
254
- top_cover: true
255
254
  # Default image when no cover is set
256
255
  # 未设置封面时的默认图片
257
256
  cover:
@@ -263,11 +262,7 @@ post:
263
262
  # 版权
264
263
  copyright:
265
264
  enable: true
266
- author:
267
- url: /about/ # Author link
268
- # Default use site.icon
269
- # 默认使用 site.icon
270
- img:
265
+ author: /img/logo.png # url
271
266
  # License
272
267
  # 许可证
273
268
  license: CC BY-NC-SA 4.0
@@ -574,10 +569,7 @@ footer:
574
569
  # url: https://beian.miit.gov.cn/
575
570
 
576
571
  # 页脚信息文字
577
- # 请不要删除主题信息,这是对作者的尊重
578
572
  links:
579
- - name: Theme
580
- url: https://github.com/everfu/hexo-theme-solitude
581
573
  # - name: RSS
582
574
  # url: /atom.xml
583
575
  # - name: License
@@ -816,6 +808,9 @@ comment:
816
808
  # Whether to display the comment count
817
809
  # 显示评论数
818
810
  count: false
811
+ # Sidebar displays the total number of comments
812
+ # Sidebar 显示总评论数
813
+ sidebar: false
819
814
  # PV
820
815
  pv: false
821
816
  # Avatar
@@ -1,3 +1,8 @@
1
+ repo: https://github.com/everfu/hexo-theme-solitude
2
+ hexo: https://hexo.io/
3
+ framework_by: 框架:
4
+ theme_by: 主题:
5
+
1
6
  more: 更多
2
7
  star: 喜欢这篇的人也看了
3
8
  random: 随便逛逛
@@ -138,6 +143,7 @@ console:
138
143
  link: 链接
139
144
  code: 代码
140
145
  emoji: 表情
146
+ empty: 暂无评论...
141
147
 
142
148
  sidebar:
143
149
  function: 功能
package/languages/en.yml CHANGED
@@ -1,3 +1,6 @@
1
+ framework_by: 'Framework: '
2
+ theme_by: 'Theme: '
3
+
1
4
  more: More
2
5
  star: Behold, those who found delight in this piece also perused
3
6
  random: Random
@@ -138,6 +141,7 @@ console:
138
141
  link: Link
139
142
  code: Code
140
143
  emoji: Emoji
144
+ empty: No comments...
141
145
 
142
146
  sidebar:
143
147
  function: Function
@@ -1,3 +1,6 @@
1
+ framework_by: 框架:
2
+ theme_by: 主题:
3
+
1
4
  more: 更多
2
5
  star: 喜欢这篇的人也看了
3
6
  random: 随便逛逛
@@ -138,6 +141,7 @@ console:
138
141
  link: 链接
139
142
  code: 代码
140
143
  emoji: 表情
144
+ empty: 暂无评论...
141
145
 
142
146
  sidebar:
143
147
  function: 功能
@@ -1,3 +1,6 @@
1
+ framework_by: 框架:
2
+ theme_by: 主題:
3
+
1
4
  more: 更多
2
5
  star: 喜歡這篇的人也看了
3
6
  random: 隨便逛逛
@@ -138,6 +141,7 @@ console:
138
141
  link: 鏈結
139
142
  code: 代碼
140
143
  emoji: 表情
144
+ empty: 暫無評論...
141
145
 
142
146
  sidebar:
143
147
  function: 功能
@@ -59,26 +59,30 @@ div#footer-bar
59
59
  a.footer-bar-link(href=url_for("/"))
60
60
  img.author-avatar(src=url_for(theme.site.icon))
61
61
  = config.author
62
- if theme.footer.beian
63
62
  .beian-group
64
- - var beian = theme.footer.beian || []
65
- each item in beian
66
- a.footer-bar-link(href=url_for(item.url), title=item.name)
67
- if item.icon
63
+ if theme.footer.beian
64
+ - var beian = theme.footer.beian || []
65
+ each item in beian
66
+ a.footer-bar-link(href=url_for(item.url), title=item.name)
67
+ if item.icon
68
68
  img.beian-icon(src=url_for(item.icon), alt=item.name)
69
69
  span.beian-name= item.name
70
-
71
- div.footer-bar-right
72
- each item in theme.footer.links
73
- if item.icon
74
- a.footer-bar-link(href=url_for(item.url), alt=item.name)
75
- each icon in item.icon
76
- i.solitude(class=icon)
77
- else if item.img
78
- a.footer-bar-link(href=url_for(item.url), alt=item.name)
79
- img(src=url_for(item.img), alt=item.name)
80
- else
81
- a.footer-bar-link(href=url_for(item.url), alt=item.name)!= item.name
82
-
70
+ a.footer-bar-link(href=_p('hexo'))
71
+ = _p('framework_by') + 'Hexo'
72
+ a.footer-bar-link(href=_p('repo'))
73
+ = _p('theme_by') + 'Solitude'
74
+ if theme.footer.links
75
+ div.footer-bar-right
76
+ each item in theme.footer.links
77
+ if item.icon
78
+ a.footer-bar-link(href=url_for(item.url), alt=item.name)
79
+ each icon in item.icon
80
+ i.solitude(class=icon)
81
+ else if item.img
82
+ a.footer-bar-link(href=url_for(item.url), alt=item.name)
83
+ img(src=url_for(item.img), alt=item.name)
84
+ else
85
+ a.footer-bar-link(href=url_for(item.url), alt=item.name)!= item.name
86
+
83
87
  if theme.comment.use && theme.comment.commentBarrage
84
88
  div.comment-barrage.needEndHide
@@ -1,6 +1,6 @@
1
1
  - const not_cover = !(typeof page.not_cover ==='undefined' ? false : page.not_cover)
2
- header#page-header(class=is_post() && theme.post.default.top_cover && not_cover ? 'post-bg' : 'not-top-img')
2
+ header#page-header(class=is_post() && not_cover ? 'post-bg' : 'not-top-img')
3
3
  include ./nav.pug
4
4
  if is_post()
5
- if theme.post.default.top_cover && !page.not_cover
5
+ if !page.not_cover
6
6
  include ./widgets/post/postMeta.pug
@@ -50,7 +50,7 @@ div
50
50
  script(src=url_for(theme.cdn.medium_zoom))
51
51
  if theme.fancybox
52
52
  script(src=url_for(theme.cdn.fancyapps_ui))
53
- if (theme.brevity.home_mini && theme.brevity.enable) || theme.carousel
53
+ if (theme.brevity.home_mini && theme.brevity.enable)
54
54
  script(src=url_for(theme.cdn.swiper_js))
55
55
 
56
56
  if theme.post_ai.enable
@@ -108,9 +108,7 @@ div
108
108
  if theme.mermaid
109
109
  script.
110
110
  mermaid.run();
111
- if is_home() && theme.carousel && site.posts.data.filter(item => item.recommend === true).slice(0, 6) || false
112
- script.
113
- carousel_swiper()
111
+
114
112
  if theme.busuanzi && (theme.aside.siteinfo.uv || theme.aside.siteinfo.pv || is_post() && theme.post.meta.pv)
115
113
  script(defer pjax src=url_for(theme.cdn.busuanzi_js))
116
114
 
@@ -9,7 +9,7 @@ if theme.capsule.enable || theme.music.enable || theme.brevity.enable && theme.b
9
9
  link(rel="stylesheet", href=url_for(theme.cdn.aplayer_css))
10
10
 
11
11
  // swiper
12
- if (theme.brevity.home_mini && theme.brevity.enable) || theme.carousel
12
+ if (theme.brevity.home_mini && theme.brevity.enable)
13
13
  link(rel="stylesheet", href=url_for(theme.cdn.swiper_css))
14
14
 
15
15
  // fancybox ui
@@ -17,7 +17,7 @@ div#sidebar(style="zoom: 1;")
17
17
  a(href=url_for('/tags/'))
18
18
  .headline=_p('page.tag')
19
19
  .length-num=site.tags.find({parent: {$exists: false}}).length
20
- if theme.recent_comments.enable
20
+ if theme.comment.sidebar
21
21
  .data-item.is-center
22
22
  .data-item-link
23
23
  a(href=url_for(theme.recent_comments.page))
@@ -1,18 +1,26 @@
1
- .aside-content#aside-content
2
- - var noSticky, Sticky
3
- if(is_home())
4
- - noSticky = theme.aside.home.noSticky.split(',')
5
- - Sticky = theme.aside.home.Sticky.split(',')
6
- else if(is_post())
7
- - noSticky = theme.aside.post.noSticky.split(',')
8
- - Sticky = theme.aside.post.Sticky.split(',')
9
- else if(is_page() || is_archive() || is_tag() || is_category())
10
- - noSticky = theme.aside.page.noSticky.split(',')
11
- - Sticky = theme.aside.page.Sticky.split(',')
12
- each item in noSticky
13
- include ./asideSwitch.pug
14
- .sticky_layout
15
- if showToc
16
- include ./asideToc.pug
17
- each item in Sticky
1
+ - var { aside } = theme
2
+
3
+ - var noSticky, Sticky
4
+ if(is_home())
5
+ - noSticky = aside.home.noSticky ? aside.home.noSticky.split(',') : null
6
+ - Sticky = aside.home.Sticky ? aside.home.Sticky.split(',') : null
7
+ else if(is_post())
8
+ - noSticky = aside.post.noSticky ? aside.post.noSticky.split(',') : null
9
+ - Sticky = aside.post.Sticky ? aside.post.Sticky.split(',') : null
10
+ else if(is_page() || is_archive() || is_tag() || is_category())
11
+ - noSticky = aside.page.noSticky ? aside.page.noSticky.split(',') : null
12
+ - Sticky = aside.page.Sticky ? aside.page.Sticky.split(',') : null
13
+ if noSticky || Sticky
14
+ .aside-content#aside-content
15
+ each item in noSticky
18
16
  include ./asideSwitch.pug
17
+ .sticky_layout
18
+ if showToc
19
+ include ./asideToc.pug
20
+ each item in Sticky
21
+ include ./asideSwitch.pug
22
+ else
23
+ style.
24
+ .layout > div:first-child {
25
+ width: 100%;
26
+ }
@@ -13,7 +13,7 @@
13
13
  .author-info__bottom-group
14
14
  span.author-info__bottom-group-left
15
15
  .author-info__name= config.author
16
- .author-info__desc!= config.subtitle
16
+ .author-info__desc!= theme.aside.my_card.description
17
17
  .card-info-social-icons.is-center
18
18
  each value, label in theme.aside.my_card.information || {}
19
19
  - var array = value.split('||')
@@ -19,6 +19,6 @@
19
19
  if item.link.includes('https://') || item.link.includes('http://')
20
20
  a.equipment-item-content-item-link(href=item.link, target="_blank") 详情
21
21
  else
22
- a.equipment-item-content-item-link(href=item.link, target="_blank") 查看文章
22
+ a.equipment-item-content-item-link(href=item.link) 查看文章
23
23
  a.bber-reply(onclick=`sco.toTalk('${item.description}')`)
24
- i.solitude.fa-solid.fa-comment(style="font-size: 1rem;")
24
+ i.solitude.fa-solid.fa-comment(style="font-size: 1rem;")
@@ -2,7 +2,7 @@
2
2
  each item in data.link_list
3
3
  .flink-list-item
4
4
  a.cf-friends-link(href="javascript:void(0);", title=item.name)
5
- img.flink-avatar.cf-friends-avatar(alt=item.name, src=item.avatar + (data.suffix || ''))
5
+ img.flink-avatar.cf-friends-avatar(alt=item.name, src=url_for("/img/default_avatar.avif"))
6
6
  .flink-item-info
7
7
  span.flink-item-name.cf-friends-name= item.name
8
8
  span.flink-item-desc(title=item.descr)= item.descr
@@ -42,7 +42,7 @@ script(pjax).
42
42
  })
43
43
 
44
44
  function setHtml(el, data) {
45
- el.innerHTML = data.map(i => `
45
+ el.innerHTML = data.length !== 0 ? data.map(i => `
46
46
  <div class="comment-card" title="${i.title}" onclick="pjax.loadUrl('${i.url}')">
47
47
  <div class="comment-info">
48
48
  <img src="${i.avatar}" class="nolazyload" alt="${i.nick}">
@@ -56,7 +56,7 @@ script(pjax).
56
56
  <i class="solitude fa-solid fa-comment"></i>
57
57
  ${i.title}</div>
58
58
  </div>
59
- `).join('')
59
+ `).join('') : `#{__("console.newest_comment.empty")}`
60
60
  if (typeof sco !== 'undefined') sco.changeTimeFormat(document.querySelectorAll('.comment-time'))
61
61
  else {
62
62
  document.addEventListener('pjax:complete', () => sco.changeTimeFormat(document.querySelectorAll('.comment-time')))
@@ -49,7 +49,7 @@ script(pjax).
49
49
  });
50
50
 
51
51
  function setHtml(el, data) {
52
- el.innerHTML = data.map(i => `
52
+ el.innerHTML = data.length !== 0 ? data.map(i => `
53
53
  <div class="comment-card" title="${i.title}" onclick="pjax.loadUrl('${i.url}')">
54
54
  <div class="comment-info">
55
55
  <img src="${i.avatar}" class="nolazyload" alt="${i.nick}">
@@ -63,7 +63,7 @@ script(pjax).
63
63
  <i class="solitude fa-solid fa-comment"></i>
64
64
  ${i.title}</div>
65
65
  </div>
66
- `).join('')
66
+ `).join('') : `#{__("console.newest_comment.empty")}`
67
67
  if (typeof sco !== 'undefined') sco.changeTimeFormat(document.querySelectorAll('.comment-time'))
68
68
  else {
69
69
  document.addEventListener('pjax:complete', () => sco.changeTimeFormat(document.querySelectorAll('.comment-time')))
@@ -47,7 +47,7 @@ script(pjax).
47
47
  })
48
48
 
49
49
  function setHtml(el, data) {
50
- el.innerHTML = data.map(i => `
50
+ el.innerHTML = data.length !== 0 ? data.map(i => `
51
51
  <div class="comment-card" title="${i.title}" onclick="pjax.loadUrl('${i.url}')">
52
52
  <div class="comment-info">
53
53
  <img src="${i.avatar}" class="nolazyload" alt="${i.nick}">
@@ -61,7 +61,7 @@ script(pjax).
61
61
  <i class="solitude fa-solid fa-comment"></i>
62
62
  ${i.title}</div>
63
63
  </div>
64
- `).join('')
64
+ `).join('') : `#{__("console.newest_comment.empty")}`
65
65
  if (typeof sco !== 'undefined') sco.changeTimeFormat(document.querySelectorAll('.comment-time'))
66
66
  else {
67
67
  document.addEventListener('pjax:complete', () => sco.changeTimeFormat(document.querySelectorAll('.comment-time')))
@@ -38,7 +38,7 @@ script(pjax).
38
38
  })
39
39
 
40
40
  function setHtml(el, data) {
41
- el.innerHTML = data.map(i => `
41
+ el.innerHTML = data.length !== 0 ? data.map(i => `
42
42
  <div class="comment-card" title="${i.title}" onclick="pjax.loadUrl('${i.url}')">
43
43
  <div class="comment-info">
44
44
  <img src="${i.avatar}" class="nolazyload" alt="${i.nick}">
@@ -52,7 +52,7 @@ script(pjax).
52
52
  <i class="solitude fa-solid fa-comment"></i>
53
53
  ${i.title}</div>
54
54
  </div>
55
- `).join('')
55
+ `).join('') : `#{__("console.newest_comment.empty")}`
56
56
  if (typeof sco !== 'undefined') sco.changeTimeFormat(document.querySelectorAll('.comment-time'))
57
57
  else {
58
58
  document.addEventListener('pjax:complete', () => sco.changeTimeFormat(document.querySelectorAll('.comment-time')))
@@ -1,8 +1,8 @@
1
1
  - const {copyright} = theme.post.default
2
2
  .post-copyright
3
3
  .post-copyright__author_group
4
- a.post-copyright__author_img(href=url_for(copyright.author.url))
5
- img.post-copyright__author_img_front(src=url_for(page.avatar || copyright.author.img || theme.site.icon))
4
+ .post-copyright__author_img
5
+ img.post-copyright__author_img_front(src=url_for(page.avatar || copyright.author || theme.site.icon))
6
6
  .post-copyright__author_name= page.author || config.title
7
7
  .post-copyright__author_desc= page.desc || config.subtitle
8
8
  .post-tools#post-tools
@@ -1,4 +1,4 @@
1
- #post-info(style=`${page.top_color ? 'background: ' + page.top_color : ''}`)
1
+ #post-info
2
2
  #post-firstinfo
3
3
  .meta-firstline
4
4
  - var cc = page.reprint ? _p('post.reprint') : _p('post.original')
@@ -10,7 +10,7 @@ script(pjax).
10
10
  body: JSON.stringify({
11
11
  "event": "GET_RECENT_COMMENTS",
12
12
  "includeReply": true,
13
- "pageSize": -1
13
+ "pageSize": 999
14
14
  }),
15
15
  headers: {'Content-Type': 'application/json'}
16
16
  }).then(res => res.json()).then(async ({data}) => {
package/layout/index.pug CHANGED
@@ -14,8 +14,6 @@ block content
14
14
  .recent-posts#recent-posts
15
15
  if theme.comment.hot_tip.enable
16
16
  include ./includes/widgets/third-party/hot/index.pug
17
- if theme.carousel && is_home_first_page()
18
- include ./includes/widgets/home/carousel.pug
19
17
  for post, index in page.posts.sort("-sticky" || "-date").data
20
18
  include ./includes/widgets/home/postList
21
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
5
5
  "main": "package.json",
6
6
  "keywords": [
package/plugins.yml CHANGED
@@ -13,7 +13,7 @@ pjax:
13
13
  twikoo:
14
14
  name: twikoo
15
15
  file: dist/twikoo.all.min.js
16
- version: 1.6.40
16
+ version: 1.6.41
17
17
  waline_js:
18
18
  name: '@waline/client'
19
19
  file: dist/waline.js
@@ -40,12 +40,12 @@ katex:
40
40
  name: katex
41
41
  file: dist/katex.min.css
42
42
  other_name: KaTeX
43
- version: 0.16.9
43
+ version: 0.16.21
44
44
  katex_copytex:
45
45
  name: katex
46
46
  file: dist/contrib/copy-tex.min.js
47
47
  other_name: KaTeX
48
- version: 0.16.9
48
+ version: 0.16.21
49
49
  lazyload:
50
50
  name: vanilla-lazyload
51
51
  file: dist/lazyload.iife.min.js
@@ -91,7 +91,6 @@ hexo.extend.filter.register('before_generate', () => {
91
91
  },
92
92
  post: {
93
93
  default: {
94
- top_cover: true,
95
94
  cover: ['/img/default.avif'],
96
95
  locate: 'China, Changsha',
97
96
  copyright: {
@@ -9,7 +9,6 @@ hexo.extend.filter.register('after_post_render', function (data) {
9
9
  data.locate = data.locate || locate;
10
10
  data.cc = data.cc || copyright;
11
11
  data.cover = data.cover || (cover?.length && cover[getRandomInt(0, cover.length)]);
12
- data.top_color = data.top_color;
13
12
  data.not_cover = data.cover ? false : true;
14
13
  data.excerpt = layout === 'post' ? data.description || data.excerpt : data.title;
15
14
  data.toc = !!(config.aside.toc[layout] && data.toc !== false);
@@ -254,7 +254,7 @@
254
254
  gap .5rem
255
255
 
256
256
  li.card-archive-list-item
257
- flex 0 1 calc(25% - .375rem)
257
+ flex 0 1 calc(35% - .625rem)
258
258
 
259
259
  .card-archive-list-link
260
260
  border-radius 8px
@@ -79,21 +79,20 @@
79
79
  background var(--efu-main)
80
80
  transform scale(1.1)
81
81
 
82
- if hexo-config('footer.information.author')
83
- .footer_mini_logo
84
- width 50px
85
- height 50px
86
- margin 0 1rem
87
- cursor pointer
88
- transition cubic-bezier(0, 0, 0, 1.29) .5s
89
- user-select none
90
- border-radius 50px
91
- overflow hidden
92
- +maxWidth768()
93
- display none
82
+ .footer_mini_logo
83
+ width 50px
84
+ height 50px
85
+ margin 0 1rem
86
+ cursor pointer
87
+ transition cubic-bezier(0, 0, 0, 1.29) .5s
88
+ user-select none
89
+ border-radius 50px
90
+ overflow hidden
91
+ +maxWidth768()
92
+ display none
94
93
 
95
- &:hover
96
- transform scale(1.2)
94
+ &:hover
95
+ transform scale(1.2)
97
96
 
98
97
  #st-footer
99
98
  display flex
@@ -50,7 +50,7 @@
50
50
  / .site-data
51
51
  display flex
52
52
  width 100%
53
- justify-content flex-start
53
+ justify-content space-around
54
54
  margin 12px 0 0 0
55
55
  padding .6rem 16px
56
56
 
@@ -36,9 +36,6 @@
36
36
  bottom 0
37
37
  left 0
38
38
 
39
- &:hover
40
- transform scale(1.3)
41
-
42
39
  .post-copyright__author_name
43
40
  text-align center
44
41
  font-size 20px
Binary file
Binary file
@@ -1,74 +0,0 @@
1
- - let recommends = site.posts.data.filter(item => item.recommend === true).slice(0,6) || false
2
-
3
- if recommends
4
- .recent-post-item#swiperBox
5
- div.blog-slider.swiper-container-fade.swiper-container-horizontal#swiper_container
6
- .blog-slider__wrp.swiper-wrapper
7
- each item,index in recommends
8
- .blog-slider__item.swiper-slide(onclick="pjax.loadUrl('"+item.path+"')")
9
- .blog-slider__img
10
- img(src=item.cover, alt=item.title)
11
- .blog-slider__content
12
- span.blog-slider__title=item.title
13
- case theme.index_post_list.content
14
- when false
15
- break
16
- when 1
17
- span.blog-slider__desc= item.description
18
- when 2
19
- if item.description
20
- span.blog-slider__desc= item.description
21
- else
22
- - const content = strip_html(item.content)
23
- - let expert = content.substring(0, theme.index_post_list.length).replace(/\d+/g, '').replace(/&#xF/g, '').replace(/&#x/g, '')
24
- - content.length > theme.index_post_list.length ? expert += ' ...' : ''
25
- .span.blog-slider__desc= expert
26
- default
27
- - const content = strip_html(item.content)
28
- - let expert = content.substring(0, theme.index_post_list.length).replace(/\d+/g, '').replace(/&#xF/g, '').replace(/&#x/g, '')
29
- - content.length > theme.index_post_list.length ? expert += ' ...' : ''
30
- .span.blog-slider__desc= expert
31
- div.article-meta-wrap
32
- span.article-meta.tags
33
- each tag in item.tags.data
34
- a.article-meta__tags(href=url_for(tag.path), onclick="event.stopPropagation();")
35
- span.tags-punctuation
36
- i.solitude.fa-solid.fa-hashtag
37
- =tag.name
38
- span.post-meta-date
39
- time(datetime=moment(item.date))
40
- .blog-slider__pagination.swiper-pagination-clickable.swiper-pagination-bullets
41
-
42
- script.
43
- function carousel_swiper() {
44
- let e = new Swiper(".blog-slider", {
45
- direction: "vertical",
46
- passiveListeners: true,
47
- loop: true,
48
- autoplay: {
49
- disableOnInteraction: true,
50
- delay: 5e3
51
- },
52
- pagination: {
53
- el: ".blog-slider__pagination",
54
- clickable: true
55
- },
56
- effect: 'fade',
57
- fadeEffect: {
58
- crossFade: true
59
- },
60
- passiveListeners: true,
61
- spaceBetween: 30,
62
- watchSlidesProgress: true,
63
- mousewheel: true
64
- })
65
- , t = document.getElementById("swiper_container");
66
- null !== t && (t.onmouseenter = () => {
67
- e.autoplay.stop()
68
- }
69
- ,
70
- t.onmouseleave = () => {
71
- e.autoplay.start()
72
- }
73
- )
74
- }