hexo-theme-linen 1.0.4 → 1.0.6

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.
@@ -11,7 +11,7 @@ const rssPath = theme?.feed === false ? '' : theme?.feed?.path ?? '/feed.xml';
11
11
  <% } %>
12
12
  <div class="nav-header<%=is_post() ? ' is-post': ''%>">
13
13
  <div class="header-inner">
14
- <a class="title" href="/" title="index" style="<%=[logoSrc ? `background-image: url(${logoSrc})`: '', logoWidth && logoHeight ? `aspect-ratio: ${logoWidth}/${logoHeight}` : ''].filter(v => v).join(';')%>"><%=logoText||''%></a>
14
+ <a class="title" href="<%=url_for('/')%>" title="index" style="<%=[logoSrc ? `background-image: url(${logoSrc})`: '', logoWidth && logoHeight ? `aspect-ratio: ${logoWidth}/${logoHeight}` : ''].filter(v => v).join(';')%>"><%=logoText||''%></a>
15
15
  <div class="right">
16
16
  <div class="navItems">
17
17
  <% (theme?.navItems || []).forEach(({ name, path }) => { %>
@@ -4,7 +4,7 @@ const series = Array.from(new Set(site.posts.filter(item=>item.series).sort('dat
4
4
  <div class="site-info<%=is_home_first_page() ? ' home' : ''%>">
5
5
  <div class="info-row">
6
6
  <div class="author">
7
- <img class="avatar" src="<%=theme?.info?.avatar || '/img/vue-color-avatar.png'%>" alt="" />
7
+ <img class="avatar" src="<%=url_for(theme?.info?.avatar || '/linen-theme/img/vue-color-avatar.png')%>" alt="" />
8
8
  <div class="name"><%=config?.author || ''%></div>
9
9
  </div>
10
10
  </div>
package/layout/post.ejs CHANGED
@@ -186,10 +186,10 @@ const nextPost = series[currentIndex + 1] || null;
186
186
  }
187
187
  const link = document.createElement("link");
188
188
  link.rel = "stylesheet";
189
- link.href = "/js/gitalk/gitalk.css";
189
+ link.href = "/linen-theme/js/gitalk/gitalk.css";
190
190
  document.head.appendChild(link);
191
191
  const script = document.createElement("script");
192
- script.src = "/js/gitalk/gitalk.min.js";
192
+ script.src = "/linen-theme/js/gitalk/gitalk.min.js";
193
193
  const pageId = location.pathname.length > 40 ? hashPathname(location.pathname) : location.pathname;
194
194
  console.log(`GitTalk page ID: ${pageId}`);
195
195
  script.onload = function() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-linen",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "A clean Hexo theme",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -1,7 +1,7 @@
1
1
  module.exports.defaultConfig = {
2
2
  enable: false,
3
- loadingImage: "/img/lazyload/loading.svg",
4
- errorTipImage: "/img/lazyload/error-tip.svg",
3
+ loadingImage: "/linen-theme/img/lazyload/loading.svg",
4
+ errorTipImage: "/linen-theme/img/lazyload/error-tip.svg",
5
5
  intersectionRatio: 0.25,
6
6
  placeholderRatio: 3 / 2,
7
7
  showTransition: true,
package/scripts/rss.js CHANGED
@@ -30,7 +30,7 @@ hexo.extend.generator.register("rss", function (locals) {
30
30
  const getPostDate = hexo.extend.helper.get("getPostDate");
31
31
 
32
32
  const feed = `<?xml version="1.0" encoding="UTF-8" ?>
33
- <?xml-stylesheet type="text/xsl" href="/css/rss-${language.startsWith("zh") ? "zh" : "en"}.xsl"?>
33
+ <?xml-stylesheet type="text/xsl" href="/linen-theme/css/rss-${language.startsWith("zh") ? "zh" : "en"}.xsl"?>
34
34
  <rss version="2.0">
35
35
  <channel>
36
36
  <title>${escape(config.title)}</title>
@@ -20,7 +20,7 @@
20
20
  padding-bottom: 66.66667%;
21
21
  background-size: 100% 100%;
22
22
  background-repeat: no-repeat;
23
- background-image: url(/img/lazyload/loading.svg);
23
+ background-image: url(/linen-theme/img/lazyload/loading.svg);
24
24
  background-color: #fff;
25
25
  }
26
26
  .lazyload-wrap .placeholder canvas{
@@ -77,7 +77,7 @@
77
77
  .lazyload-wrap .error-wrap .error-tip{
78
78
  width: 60%;
79
79
  background-size: cover;
80
- background-image: url(/img/lazyload/error-tip.svg);
80
+ background-image: url(/linen-theme/img/lazyload/error-tip.svg);
81
81
  }
82
82
  .lazyload-wrap .error-wrap .error-tip::before{
83
83
  content: '';
@@ -9,7 +9,7 @@
9
9
  local("Source Han Serif CN"),
10
10
  local("Source Han Serif SC"),
11
11
  local("Songti SC"),
12
- url("/fonts/SourceHanSerifSC-Regular.woff2?v=#{$font-version}")
12
+ url("/linen-theme/fonts/SourceHanSerifSC-Regular.woff2?v=#{$font-version}")
13
13
  format("woff2");
14
14
  font-display: swap;
15
15
  unicode-range: U+4E00-9FFF;
@@ -17,14 +17,14 @@
17
17
  @font-face {
18
18
  font-family: "LXGWWenKai";
19
19
  font-display: swap;
20
- src: url("/fonts/LXGWWenKai-Regular.woff2?v=#{$font-version}") format("woff2");
20
+ src: url("/linen-theme/fonts/LXGWWenKai-Regular.woff2?v=#{$font-version}") format("woff2");
21
21
  font-display: swap;
22
22
  unicode-range: U+4E00-9FFF;
23
23
  }
24
24
 
25
25
  @font-face {
26
26
  font-family: "source-serif";
27
- src: url("/fonts/SourceSerif4-Regular.ttf.woff2?v=#{$font-version}")
27
+ src: url("/linen-theme/fonts/SourceSerif4-Regular.ttf.woff2?v=#{$font-version}")
28
28
  format("woff2");
29
29
  unicode-range:
30
30
  U+0-7F, U+A0, U+B7, U+200A, U+2014, U+2018, U+2019, U+201C, U+201D, U+2022,
@@ -33,7 +33,7 @@
33
33
  }
34
34
  @font-face {
35
35
  font-family: "Source Sans Pro";
36
- src: url("/fonts/Source-Sans-Pro-Regular-2.woff2?v=#{$font-version}")
36
+ src: url("/linen-theme/fonts/Source-Sans-Pro-Regular-2.woff2?v=#{$font-version}")
37
37
  format("woff2");
38
38
  font-display: swap;
39
39
  }
@@ -238,7 +238,7 @@ body {
238
238
  margin-right: 30px;
239
239
  width: 225px;
240
240
  height: 42px;
241
- background-image: url("/img/logo.svg");
241
+ background-image: url("/linen-theme/img/logo.svg");
242
242
  background-size: cover;
243
243
  }
244
244
  .right {
@@ -274,7 +274,7 @@ body {
274
274
  margin-right: 16px;
275
275
  }
276
276
  &.toc {
277
- background-image: url("/img/icons/toc1.svg");
277
+ background-image: url("/linen-theme/img/icons/toc1.svg");
278
278
  background-size: contain;
279
279
  display: none;
280
280
  background-repeat: no-repeat;
@@ -282,32 +282,32 @@ body {
282
282
  cursor: pointer;
283
283
  }
284
284
  &.search {
285
- background-image: url("/img/icons/search.svg");
285
+ background-image: url("/linen-theme/img/icons/search.svg");
286
286
  background-size: cover;
287
287
  }
288
288
  &.github {
289
- background-image: url("/img/icons/github.svg");
289
+ background-image: url("/linen-theme/img/icons/github.svg");
290
290
  background-size: cover;
291
291
  }
292
292
  &.zh-CN {
293
- background-image: url("/img/icons/chinese.svg");
293
+ background-image: url("/linen-theme/img/icons/chinese.svg");
294
294
  background-size: cover;
295
295
  width: 30px;
296
296
  height: 30px;
297
297
  }
298
298
  &.en {
299
- background-image: url("/img/icons/english.svg");
299
+ background-image: url("/linen-theme/img/icons/english.svg");
300
300
  background-size: cover;
301
301
  width: 30px;
302
302
  height: 30px;
303
303
  }
304
304
  &.rss {
305
- background-image: url("/img/icons/rss.svg");
305
+ background-image: url("/linen-theme/img/icons/rss.svg");
306
306
  background-size: cover;
307
307
  margin-right: 0;
308
308
  }
309
309
  &.hdr-switch {
310
- background-image: url("/img/icons/hdr.svg");
310
+ background-image: url("/linen-theme/img/icons/hdr.svg");
311
311
  background-size: cover;
312
312
  cursor: pointer;
313
313
  position: relative;
@@ -327,8 +327,8 @@ body {
327
327
  }
328
328
  &.hdr_on {
329
329
  background: linear-gradient(90deg, #ff6ec4, #7873f5, #4ade80);
330
- -webkit-mask: url("/img/icons/hdr.svg") no-repeat center;
331
- mask: url("/img/icons/hdr.svg") no-repeat center;
330
+ -webkit-mask: url("/linen-theme/img/icons/hdr.svg") no-repeat center;
331
+ mask: url("/linen-theme/img/icons/hdr.svg") no-repeat center;
332
332
  -webkit-mask-size: contain;
333
333
  mask-size: contain;
334
334
  &::after {
@@ -423,12 +423,12 @@ body {
423
423
  display: inline-block;
424
424
  width: 20px;
425
425
  height: 20px;
426
- background-image: url("/img/icons/copyright.svg");
426
+ background-image: url("/linen-theme/img/icons/copyright.svg");
427
427
  background-size: cover;
428
428
  &.location {
429
429
  width: 15px;
430
430
  height: 15px;
431
- background-image: url("/img/icons/location.svg");
431
+ background-image: url("/linen-theme/img/icons/location.svg");
432
432
  }
433
433
  }
434
434
  .text {
@@ -506,7 +506,7 @@ body {
506
506
  display: inline-block;
507
507
  width: 0.8em;
508
508
  height: 0.8em;
509
- background-image: url("/img/icons/link.svg");
509
+ background-image: url("/linen-theme/img/icons/link.svg");
510
510
  background-size: cover;
511
511
  transition: all ease-in-out 0.3s;
512
512
  opacity: 0;
@@ -609,7 +609,7 @@ body {
609
609
  display: inline-block;
610
610
  width: 1em;
611
611
  height: 1em;
612
- background-image: url("/img/icons/redirect.svg");
612
+ background-image: url("/linen-theme/img/icons/redirect.svg");
613
613
  background-size: cover;
614
614
  vertical-align: middle;
615
615
  margin-bottom: 0.25em;
@@ -726,7 +726,7 @@ body {
726
726
  display: inline-block;
727
727
  width: 35px;
728
728
  height: 20px;
729
- background-image: url("/img/icons/code.svg");
729
+ background-image: url("/linen-theme/img/icons/code.svg");
730
730
  background-size: 16px 16px;
731
731
  background-position: center;
732
732
  background-repeat: no-repeat;
@@ -746,7 +746,7 @@ body {
746
746
  right: 0;
747
747
  padding-top: 0.5em;
748
748
  padding-right: 0.5em;
749
- background-image: url("/img/icons/copy.png");
749
+ background-image: url("/linen-theme/img/icons/copy.png");
750
750
  background-size: 14px 14px;
751
751
  background-position: 0 75%;
752
752
  background-repeat: no-repeat;
@@ -840,7 +840,7 @@ body {
840
840
  width: 100%;
841
841
  height: 24px;
842
842
  background-color: #fff;
843
- background-image: url("/img/icons/up-down.svg");
843
+ background-image: url("/linen-theme/img/icons/up-down.svg");
844
844
  background-size: 24px 24px;
845
845
  background-repeat: no-repeat;
846
846
  background-position: center;
@@ -897,7 +897,7 @@ body {
897
897
  display: block;
898
898
  width: 24px;
899
899
  height: 24px;
900
- background-image: url("/img/icons/new1.svg");
900
+ background-image: url("/linen-theme/img/icons/new1.svg");
901
901
  background-size: cover;
902
902
  }
903
903
  }
@@ -916,10 +916,10 @@ body {
916
916
  height: 35px;
917
917
  background-size: cover;
918
918
  &.zip {
919
- background-image: url("/img/icons/ZIP.svg");
919
+ background-image: url("/linen-theme/img/icons/ZIP.svg");
920
920
  }
921
921
  &.bin {
922
- background-image: url("/img/icons/binary.svg");
922
+ background-image: url("/linen-theme/img/icons/binary.svg");
923
923
  }
924
924
  }
925
925
  .attachment-size {
@@ -1071,7 +1071,7 @@ body {
1071
1071
  display: inline-block;
1072
1072
  width: 12px;
1073
1073
  height: 12px;
1074
- background-image: url("/img/icons/prev.svg");
1074
+ background-image: url("/linen-theme/img/icons/prev.svg");
1075
1075
  background-size: cover;
1076
1076
  vertical-align: middle;
1077
1077
  margin-right: 4px;
@@ -1087,7 +1087,7 @@ body {
1087
1087
  display: inline-block;
1088
1088
  width: 12px;
1089
1089
  height: 12px;
1090
- background-image: url("/img/icons/next.svg");
1090
+ background-image: url("/linen-theme/img/icons/next.svg");
1091
1091
  background-size: cover;
1092
1092
  vertical-align: middle;
1093
1093
  margin-left: 4px;
@@ -1151,7 +1151,7 @@ body {
1151
1151
  content: "";
1152
1152
  width: 13px;
1153
1153
  height: 13px;
1154
- background-image: url("/img/icons/tag.svg");
1154
+ background-image: url("/linen-theme/img/icons/tag.svg");
1155
1155
  background-size: cover;
1156
1156
  filter: invert(1);
1157
1157
  margin-right: 4px;
@@ -1319,7 +1319,7 @@ body {
1319
1319
  top: $navbarMinHeight;
1320
1320
  left: 0;
1321
1321
  background-color: #ffffff;
1322
- background-image: url("/img/pattern-randomized.jpg");
1322
+ background-image: url("/linen-theme/img/pattern-randomized.jpg");
1323
1323
  background-attachment: absolute;
1324
1324
  background-size: cover;
1325
1325
  opacity: 0.5;
@@ -1637,7 +1637,7 @@ body {
1637
1637
  display: inline-block;
1638
1638
  width: 13px;
1639
1639
  height: 13px;
1640
- background-image: url("/img/icons/shelf.svg");
1640
+ background-image: url("/linen-theme/img/icons/shelf.svg");
1641
1641
  background-size: cover;
1642
1642
  margin-right: 0.5em;
1643
1643
  }
@@ -1685,7 +1685,7 @@ body {
1685
1685
  display: block;
1686
1686
  width: 24px;
1687
1687
  height: 24px;
1688
- background-image: url("/img/icons/arrow-down.svg");
1688
+ background-image: url("/linen-theme/img/icons/arrow-down.svg");
1689
1689
  background-size: cover;
1690
1690
  }
1691
1691
  .title {
@@ -1840,7 +1840,7 @@ body {
1840
1840
  display: inline-block;
1841
1841
  width: 20px;
1842
1842
  height: 20px;
1843
- background-image: url("/img/icons/toc.svg");
1843
+ background-image: url("/linen-theme/img/icons/toc.svg");
1844
1844
  background-size: cover;
1845
1845
  vertical-align: middle;
1846
1846
  margin-bottom: 4px;
@@ -1960,7 +1960,7 @@ body {
1960
1960
  display: inline-block;
1961
1961
  width: 13px;
1962
1962
  height: 13px;
1963
- background-image: url("/img/icons/shelf.svg");
1963
+ background-image: url("/linen-theme/img/icons/shelf.svg");
1964
1964
  background-size: cover;
1965
1965
  vertical-align: middle;
1966
1966
  margin-bottom: 4px;
@@ -2168,7 +2168,7 @@ html[lang="zh-CN"] {
2168
2168
  .custom-checked-checkbox {
2169
2169
  width: 1.5em;
2170
2170
  height: 1.5em;
2171
- background-image: url("/img/icons/checked-checkbox.svg");
2171
+ background-image: url("/linen-theme/img/icons/checked-checkbox.svg");
2172
2172
  background-size: 1em 1em;
2173
2173
  background-repeat: no-repeat;
2174
2174
  background-position: center;
@@ -2190,7 +2190,7 @@ html[lang="zh-CN"] {
2190
2190
  display: inline-block;
2191
2191
  width: 13px;
2192
2192
  height: 13px;
2193
- background-image: url("/img/icons/tag.svg");
2193
+ background-image: url("/linen-theme/img/icons/tag.svg");
2194
2194
  background-size: cover;
2195
2195
  margin-right: 4px;
2196
2196
  margin-bottom: -1px;
@@ -2442,7 +2442,7 @@ details {
2442
2442
  transition: transform 0.2s;
2443
2443
  width: 1em;
2444
2444
  height: 1em;
2445
- background-image: url("/img/icons/collapsed.svg");
2445
+ background-image: url("/linen-theme/img/icons/collapsed.svg");
2446
2446
  background-size: 100% 100%;
2447
2447
  }
2448
2448
  }
@@ -79,35 +79,35 @@
79
79
  }
80
80
 
81
81
  .img-exif .camera::before {
82
- background-image: url("/img/icons/exif/camera.svg");
82
+ background-image: url("/linen-theme/img/icons/exif/camera.svg");
83
83
  }
84
84
 
85
85
  .img-exif .iso::before {
86
- background-image: url("/img/icons/exif/iso.svg");
86
+ background-image: url("/linen-theme/img/icons/exif/iso.svg");
87
87
  }
88
88
 
89
89
  .img-exif .focusLength::before {
90
- background-image: url("/img/icons/exif/focusLength.svg");
90
+ background-image: url("/linen-theme/img/icons/exif/focusLength.svg");
91
91
  }
92
92
 
93
93
  .img-exif .aperture::before {
94
- background-image: url("/img/icons/exif/aperture.svg");
94
+ background-image: url("/linen-theme/img/icons/exif/aperture.svg");
95
95
  }
96
96
 
97
97
  .img-exif .shutterSpeed::before {
98
- background-image: url("/img/icons/exif/shutterSpeed.svg");
98
+ background-image: url("/linen-theme/img/icons/exif/shutterSpeed.svg");
99
99
  }
100
100
 
101
101
  .img-exif .ev::before {
102
- background-image: url("/img/icons/exif/ev.svg");
102
+ background-image: url("/linen-theme/img/icons/exif/ev.svg");
103
103
  }
104
104
 
105
105
  .img-exif .lens::before {
106
- background-image: url("/img/icons/exif/lens.svg");
106
+ background-image: url("/linen-theme/img/icons/exif/lens.svg");
107
107
  }
108
108
 
109
109
  .img-exif .hdr::before {
110
- background-image: url("/img/icons/exif/hdr.svg");
110
+ background-image: url("/linen-theme/img/icons/exif/hdr.svg");
111
111
  }
112
112
 
113
113
  .img-exif .location {
@@ -115,7 +115,7 @@
115
115
  }
116
116
 
117
117
  .img-exif .location::before {
118
- background-image: url("/img/icons/exif/location.svg");
118
+ background-image: url("/linen-theme/img/icons/exif/location.svg");
119
119
  }
120
120
 
121
121
  .img-exif .hdr {
@@ -101,7 +101,7 @@ $postWidth: max(min(1192px, 68vw), 960px);
101
101
  content: "";
102
102
  width: 13px;
103
103
  height: 13px;
104
- background-image: url("/img/icons/tag.svg");
104
+ background-image: url("/linen-theme/img/icons/tag.svg");
105
105
  background-size: cover;
106
106
  filter: invert(1);
107
107
  margin-right: 4px;