hexo-theme-solitude 1.5.3 → 1.5.5

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 (59) hide show
  1. package/.github/FUNDING.yml +1 -1
  2. package/.github/ISSUE_TEMPLATE/bug_report.yml +7 -6
  3. package/.github/ISSUE_TEMPLATE/feature_request.yml +1 -1
  4. package/.github/logo.svg +13 -0
  5. package/CODE_OF_CONDUCT.md +128 -0
  6. package/README.md +4 -3
  7. package/README_EN.md +3 -2
  8. package/README_zh-tw.md +2 -1
  9. package/_config.yml +0 -12
  10. package/languages/en.yml +9 -6
  11. package/languages/zh-CN.yml +9 -6
  12. package/languages/zh-TW.yml +9 -6
  13. package/layout/includes/head/config.pug +9 -6
  14. package/layout/includes/inject/body.pug +7 -0
  15. package/layout/includes/inject/head.pug +1 -1
  16. package/layout/includes/widgets/post/copyright.pug +0 -2
  17. package/layout/page.pug +0 -4
  18. package/package.json +1 -1
  19. package/plugins.yml +0 -4
  20. package/scripts/event/cdn.js +6 -1
  21. package/scripts/filter/default.js +2 -2
  22. package/scripts/tags/button.js +1 -1
  23. package/scripts/tags/bvideo.js +2 -2
  24. package/scripts/tags/gallery.js +54 -0
  25. package/scripts/tags/image.js +1 -1
  26. package/scripts/tags/link.js +6 -3
  27. package/scripts/tags/note.js +6 -0
  28. package/source/css/_page/_gallery/index.styl +0 -66
  29. package/source/css/_page/share.styl +2 -2
  30. package/source/css/_widgets/_post/content.styl +7 -0
  31. package/source/css/_widgets/_post/copyright.styl +0 -18
  32. package/source/css/_widgets/_tags/button.styl +29 -49
  33. package/source/css/_widgets/_tags/checkbox.styl +176 -57
  34. package/source/css/_widgets/_tags/fold.styl +65 -79
  35. package/source/css/_widgets/_tags/gallery.styl +67 -0
  36. package/source/css/_widgets/_tags/index.styl +32 -30
  37. package/source/css/_widgets/_tags/label.styl +4 -3
  38. package/source/css/_widgets/_tags/link.styl +48 -77
  39. package/source/css/_widgets/_tags/media.styl +57 -0
  40. package/source/css/_widgets/_tags/mermaid.styl +1 -2
  41. package/source/css/_widgets/_tags/note.styl +1 -7
  42. package/source/css/_widgets/_tags/span.styl +24 -51
  43. package/source/css/_widgets/_tags/tabs.styl +3 -1
  44. package/source/css/_widgets/index.styl +1 -1
  45. package/source/js/covercolor/api.js +16 -16
  46. package/source/js/covercolor/local.js +16 -16
  47. package/source/js/lately.min.js +6 -0
  48. package/source/js/main.js +2 -32
  49. package/source/js/utils.js +6 -0
  50. package/.github/logo.png +0 -0
  51. package/layout/includes/page/album.pug +0 -38
  52. package/layout/includes/page/gallery.pug +0 -11
  53. package/scripts/generator/gallery.js +0 -49
  54. package/scripts/tags/card.js +0 -9
  55. package/scripts/tags/u.js +0 -7
  56. package/source/css/_widgets/_tags/bvideo.styl +0 -8
  57. package/source/css/_widgets/_tags/card.styl +0 -52
  58. package/source/css/_widgets/_tags/image.styl +0 -10
  59. package/source/css/_widgets/_tags/inline-image.styl +0 -6
@@ -1,38 +0,0 @@
1
- include ../widgets/page/banner
2
-
3
- - var album = page.album
4
- - var {limit} = theme.album
5
-
6
- if album
7
- #album
8
- #st-container
9
- if album.json
10
- script.
11
- function initGallery() {
12
- let macy = Macy({ container: '#st-container', trueOrder: false, waitForImages: true, margin: 5, columns: !{limit}, breakAt: { 1200: 5, 940: 3, 520: 2, 400: 1 }})
13
- macy.runOnImageLoad(function () { setTimeout(function () { GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".st-gallery-item img")); macy.recalculate(true); }, 500); }, true)
14
- }
15
- (async function () {
16
- await fetch('!{url_for(album.json)}')
17
- .then(res => res.json())
18
- .then(data => {
19
- let html = ''
20
- data = data.sort((a, b) => b.date - a.date)
21
- data.forEach(item => { html += `<div class="st-gallery-item"><span class="locate">${item.locate}</span><img class="st-gallery-image" src="${item.image}" alt="${item.content}"></div>` })
22
- document.querySelector('#st-container').innerHTML = html
23
- GLOBAL_CONFIG.lazyload.enable && utils.lazyloadImg();
24
- initGallery()
25
- })
26
- })()
27
-
28
- else
29
- each item in album.items.sort((a, b) => b.date - a.date)
30
- .st-gallery-item
31
- span.locate= item.locate
32
- img.st-gallery-image(src=item.image, alt=item.content)
33
- script.
34
- function initGallery(){
35
- let macy = Macy({ container: '#st-container', trueOrder: false, waitForImages: true, margin: 5, columns: !{limit}, breakAt: { 1200: 5, 940: 3, 520: 2, 400: 1 }})
36
- macy.runOnImageLoad(function () { setTimeout(function () { GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".st-gallery-item img")); macy.recalculate(true); }, 500); }, true)
37
- }
38
- document.addEventListener('DOMContentLoaded', initGallery);
@@ -1,11 +0,0 @@
1
- include ../widgets/page/banner
2
-
3
- - var gallery = page.album
4
-
5
- if theme.album.enable && gallery
6
- #gallery
7
- each item in gallery
8
- .gallery-item(onclick="pjax.loadUrl('/" + page.url + "/" + item.album + "/')")
9
- img.cover(src=item.cover)
10
- span.title= item.class_name
11
- span.desc= item.descr
@@ -1,49 +0,0 @@
1
- /**
2
- * Created by wleelw on 2024/2/4.
3
- */
4
-
5
- hexo.extend.generator.register('gallery', function (locals) {
6
- if (!hexo.theme.config.album.enable) return;
7
- const album = locals.data.gallery.gallery;
8
- if (!album) return;
9
- const { url, cover, comment, title, album_list, descr, rightbtn, rightbtnlink } = album;
10
- return {
11
- path: `${url}/index.html`,
12
- layout: ['page'],
13
- data: {
14
- url,
15
- cover,
16
- type: 'gallery',
17
- comment,
18
- desc: title,
19
- title,
20
- album: album_list,
21
- leftend: descr,
22
- rightbtn,
23
- rightbtnlink
24
- }
25
- };
26
- });
27
-
28
- hexo.extend.generator.register('album', function (locals) {
29
- if (!hexo.theme.config.album.enable) return;
30
- const album = locals.data.gallery.gallery;
31
- let back = hexo.config.language === 'zh-CN' ? '返回相册' : hexo.config.language === 'zh-TW' ? '返回相冊' : 'Back to Album';
32
- if (!album) return;
33
- const albumPages = album.album_list.map(item => ({
34
- path: `${album.url}/${item.album}/index.html`,
35
- layout: ['page'],
36
- data: {
37
- album: item,
38
- type: 'album',
39
- cover: item.cover,
40
- title: item.class_name,
41
- desc: item.class_name,
42
- leftend: item.descr,
43
- rightbtn: back,
44
- rightbtnlink: `/${album.url}/`,
45
- comment: item.comment
46
- }
47
- }));
48
- return albumPages;
49
- });
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- hexo.extend.tag.register('card', function (args, content) {
4
- args = args.join(' ').split(',');
5
- let icon = args[0] || 'no-icon';
6
- let color = args[1] || 'info';
7
- let title = args[2] || '';
8
- return `<div class="card card-${color}"><div class="card-title"><i class="solitude ${icon}"></i>${title}</div>${hexo.render.renderSync({text: content, engine: 'markdown'})}</div>`
9
- }, {ends: true});
package/scripts/tags/u.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict"
2
-
3
- function u(args, content) {
4
- return `<u>${hexo.render.renderSync({text: text, engine: 'markdown'}).split('\n').join('')}</u>`;
5
- }
6
-
7
- hexo.extend.tag.register("u", u, { ends: false });
@@ -1,8 +0,0 @@
1
- .bvideo
2
- border 0
3
- width 100%
4
- height 600px
5
- border-radius 12px
6
-
7
- +maxWidth768()
8
- height 200px
@@ -1,52 +0,0 @@
1
- #article-container
2
- .card
3
- width 100%
4
- height auto
5
- display flex
6
- flex-direction column
7
- padding .5rem 1rem
8
- border-radius 0.375rem
9
- margin .5rem 0
10
-
11
- .card-title
12
- display flex
13
- align-items center
14
- font-size 1.8rem
15
- font-weight bold
16
-
17
- i
18
- margin-right 8px
19
- font-size 20px
20
-
21
- p
22
- margin 0 0 0 1.5rem
23
-
24
- &.card-red
25
- background rgba(238, 125, 121, 0.1)
26
- border 1px solid var(--efu-red)
27
- color var(--efu-red)
28
-
29
- &.card-green
30
- background rgb(240 253 244)
31
- border 1px solid var(--efu-green)
32
- color var(--efu-green)
33
-
34
- &.card-blue
35
- background rgb(240 248 253)
36
- border 1px solid var(--efu-blue)
37
- color var(--efu-blue)
38
-
39
- &.card-yellow
40
- background rgb(255 251 240)
41
- border 1px solid var(--efu-yellow)
42
- color var(--efu-yellow)
43
-
44
- &.card-purple
45
- background rgb(243 240 253)
46
- border 1px solid var(--efu-purple)
47
- color var(--efu-purple)
48
-
49
- &.card-cyan
50
- background rgb(240 253 253)
51
- border 1px solid var(--efu-cyan)
52
- color var(--efu-cyan)
@@ -1,10 +0,0 @@
1
- .md .img
2
- object-fit: contain
3
-
4
- img.inline
5
- display: inline !important
6
- vertical-align: middle
7
- transform: translateY(-4px)
8
- p .img-alt
9
- display: inline-block
10
- width: 100%
@@ -1,6 +0,0 @@
1
- #article-container
2
- .inline-img
3
- display: inline
4
- margin: 0 3px
5
- height: 1.1em
6
- vertical-align: text-bottom