hexo-theme-solitude 2.1.12 → 2.1.13
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/_config.yml +1 -0
- package/layout/includes/widgets/aside/asideNewestPost.pug +3 -2
- package/layout/includes/widgets/home/banner.pug +4 -1
- package/layout/includes/widgets/home/hometop.pug +3 -2
- package/layout/includes/widgets/home/postList.pug +6 -4
- package/layout/includes/widgets/page/about/skillsinfo.pug +17 -11
- package/layout/includes/widgets/post/copyright.pug +1 -1
- package/layout/includes/widgets/post/postInfo.pug +1 -1
- package/package.json +1 -1
- package/scripts/filter/default.js +3 -2
- package/source/css/_layout/aside.styl +1 -1
- package/source/css/_layout/recent-post.styl +0 -2
- package/source/css/_page/_home/home-top.styl +2 -2
- package/source/css/_page/error.styl +8 -8
- package/source/css/_post/meta.styl +0 -1
package/_config.yml
CHANGED
@@ -5,8 +5,9 @@
|
|
5
5
|
.aside-list
|
6
6
|
each post in site.posts.data.sort((a, b) => b.date < a.date ? -1 : 1).slice(0, 5)
|
7
7
|
a.aside-list-item(href=url_for(post.path) title=post.title)
|
8
|
-
.
|
9
|
-
|
8
|
+
if post.cover
|
9
|
+
.thumbnail
|
10
|
+
img(alt=post.title src=url_for(post.cover))
|
10
11
|
.content
|
11
12
|
span.title(href=url_for(post.path) title=post.title)= post.title
|
12
13
|
if post.categories.data[0]
|
@@ -23,4 +23,7 @@ if icon
|
|
23
23
|
.tags-group-icon-pair
|
24
24
|
each key in pair
|
25
25
|
.tags-group-icon(style=`background: ${icon[key].color}`)
|
26
|
-
|
26
|
+
if icon[key].img
|
27
|
+
img.nolazyload(src=icon[key].img, title=key)
|
28
|
+
else if icon[key].icon
|
29
|
+
i(class=icon[key].icon, style=`color: ${icon[key].icon_color ? icon[key].icon_color : ''}`)
|
@@ -44,15 +44,17 @@ div.recent-post-item(onclick="pjax.loadUrl('" + url_for(post.path) + "')")
|
|
44
44
|
else
|
45
45
|
case position
|
46
46
|
when 0
|
47
|
-
|
48
|
-
|
47
|
+
if post.cover
|
48
|
+
div.post_cover
|
49
|
+
+cover()
|
49
50
|
div.recent-post-info
|
50
51
|
+info()
|
51
52
|
when 1
|
52
53
|
div.recent-post-info
|
53
54
|
+info()
|
54
|
-
|
55
|
-
|
55
|
+
if post.cover
|
56
|
+
div.post_cover
|
57
|
+
+cover()
|
56
58
|
|
57
59
|
|
58
60
|
if theme.google_adsense && theme.google_adsense.enable && theme.google_adsense.auto_ads === false && theme.google_adsense.post_card
|
@@ -11,21 +11,27 @@ if skills || careers
|
|
11
11
|
.skills-style-group
|
12
12
|
.tags-group-all
|
13
13
|
.tags-group-wrapper
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
img(src=item.
|
23
|
-
|
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
|
+
if item.img
|
22
|
+
img(src=item.img, title=item.title)
|
23
|
+
else if item.icon
|
24
|
+
i(class=item.icon, title=item.title, style=`color: ${item.icon_color ? item.icon_color : ''}`)
|
25
|
+
- pair = []
|
24
26
|
.skills-list
|
25
27
|
each tag in skills.tags
|
26
28
|
.skill-info
|
27
29
|
.skill-icon(style=`background:${tag.color}`)
|
28
|
-
|
30
|
+
if tag.img
|
31
|
+
img(src=tag.img, title=tag.title)
|
32
|
+
else if tag.icon
|
33
|
+
i(class=tag.icon, title=tag.title, style=`color: ${tag.icon_color ? tag.icon_color : ''}`)
|
34
|
+
|
29
35
|
.skill-name
|
30
36
|
span= tag.title
|
31
37
|
.etc ...
|
@@ -2,7 +2,7 @@
|
|
2
2
|
.post-copyright
|
3
3
|
.post-copyright__author_group
|
4
4
|
a.post-copyright__author_img(href=url_for(copyright.author.url))
|
5
|
-
img.post-copyright__author_img_front(src=page.avatar || copyright.author.img || theme.site.icon)
|
5
|
+
img.post-copyright__author_img_front(src=url_for(page.avatar || copyright.author.img || 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
|
package/package.json
CHANGED
@@ -3,13 +3,14 @@
|
|
3
3
|
hexo.extend.filter.register('after_post_render', function (data) {
|
4
4
|
data.title = data.title || 'Untitled';
|
5
5
|
const { config } = hexo.theme;
|
6
|
-
const defaultCover = ['/img/default.avif'];
|
7
6
|
|
8
7
|
const setCoverAndExcerpt = (layout) => {
|
9
8
|
const { copyright, locate, cover } = hexo.theme.config[layout].default;
|
10
9
|
data.locate = data.locate || locate;
|
11
10
|
data.cc = data.cc || copyright;
|
12
|
-
data.cover = data.cover || (cover?.length
|
11
|
+
data.cover = data.cover || (cover?.length && cover[getRandomInt(0, cover.length)]);
|
12
|
+
data.top_color = data.top_color;
|
13
|
+
data.not_cover = data.cover ? false : true;
|
13
14
|
data.excerpt = layout === 'post' ? data.description || data.excerpt : data.title;
|
14
15
|
data.toc = !!(config.aside.toc[layout] && data.toc !== false);
|
15
16
|
data.aside = layout === 'post' ? (data.aside || true) : (data.aside || false);
|
@@ -37,7 +37,7 @@
|
|
37
37
|
/ #bannerGroup
|
38
38
|
display flex
|
39
39
|
+minWidth1201()
|
40
|
-
|
40
|
+
flex 1 1 0
|
41
41
|
height calc(328px + .5rem)
|
42
42
|
display flex
|
43
43
|
flex-direction column
|
@@ -70,10 +70,10 @@
|
|
70
70
|
display flex
|
71
71
|
flex-direction row
|
72
72
|
flex-wrap wrap
|
73
|
+
flex 1 1 0
|
73
74
|
justify-content flex-start
|
74
75
|
height calc(328px + 0.5rem)
|
75
76
|
align-content space-between
|
76
|
-
width calc(50% - 0.25rem)
|
77
77
|
position relative
|
78
78
|
animation slide-in .6s .1s backwards
|
79
79
|
|
@@ -63,13 +63,13 @@
|
|
63
63
|
width 100%
|
64
64
|
padding-bottom 2rem
|
65
65
|
|
66
|
-
.error_title
|
67
|
-
font-size 4rem
|
68
|
-
|
69
66
|
.error_title
|
70
67
|
font-size 9em
|
71
68
|
line-height 1
|
72
69
|
|
70
|
+
+maxWidth768()
|
71
|
+
font-size 4rem
|
72
|
+
|
73
73
|
.error_subtitle
|
74
74
|
word-break break-word
|
75
75
|
font-size 1.6em
|
@@ -81,12 +81,12 @@
|
|
81
81
|
padding .3rem 1.5rem
|
82
82
|
background var(--btn-bg)
|
83
83
|
color var(--btn-color)
|
84
|
-
transition .3s
|
85
84
|
|
86
85
|
&:hover
|
87
86
|
background var(--efu-theme)
|
88
87
|
|
89
88
|
i
|
89
|
+
font-size 16px
|
90
90
|
padding-right .3rem
|
91
91
|
|
92
92
|
.aside-list
|
@@ -98,10 +98,7 @@
|
|
98
98
|
|
99
99
|
+maxWidth768()
|
100
100
|
padding-top 0
|
101
|
-
|
102
|
-
.aside-list-item
|
103
|
-
.thumbnail
|
104
|
-
height 100px
|
101
|
+
margin 0
|
105
102
|
|
106
103
|
.aside-list-group
|
107
104
|
display flex
|
@@ -127,6 +124,9 @@
|
|
127
124
|
background var(--efu-card-bg)
|
128
125
|
display flex
|
129
126
|
|
127
|
+
+maxWidth768()
|
128
|
+
height 100px
|
129
|
+
|
130
130
|
.content .title
|
131
131
|
-webkit-line-clamp 2
|
132
132
|
overflow hidden
|