hexo-theme-gnix 6.0.3 → 6.0.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.
@@ -125,7 +125,10 @@ module.exports = class extends Component {
125
125
 
126
126
  return (
127
127
  <head>
128
- <script dangerouslySetInnerHTML={{ __html: themeInitScript }}></script>
128
+ <script
129
+ data-swup-ignore-script
130
+ dangerouslySetInnerHTML={{ __html: themeInitScript }}
131
+ ></script>
129
132
  <meta charset="utf-8" />
130
133
  <meta name="viewport" content="width=device-width, initial-scale=1" />
131
134
  {noIndex ? <meta name="robots" content="noindex" /> : null}
@@ -217,7 +220,7 @@ module.exports = class extends Component {
217
220
  onload="this.onload=null;this.rel='stylesheet'"
218
221
  />
219
222
  {/* Maple Mono CN */}
220
- <link rel="preconnect" href="https://fontsapi.zeoseven.com"/>
223
+ <link rel="preconnect" href="https://fontsapi.zeoseven.com" />
221
224
  <link
222
225
  rel="preload"
223
226
  as="style"
@@ -234,6 +237,7 @@ module.exports = class extends Component {
234
237
  />
235
238
  {adsenseClientId ? (
236
239
  <script
240
+ data-swup-ignore-script
237
241
  data-ad-client={adsenseClientId}
238
242
  src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"
239
243
  async
@@ -17,17 +17,28 @@ module.exports = class extends Component {
17
17
  />
18
18
  <Swup head={false} />
19
19
  <script
20
+ data-swup-ignore-script
20
21
  defer
21
22
  src="/js/host/iconify-icon/3.0.2/iconify-icon.min.js"
22
23
  ></script>
23
- <script defer src="/js/theme-selector.js"></script>
24
24
  <script
25
+ data-swup-ignore-script
26
+ defer
27
+ src="/js/theme-selector.js"
28
+ ></script>
29
+ <script
30
+ data-swup-ignore-script
25
31
  defer
26
32
  src="/js/host/medium-zoom/dist/medium-zoom.min.js"
27
33
  ></script>
28
- <script defer src="/js/mdit/shiki.js"></script>
29
- <script defer src="/js/main.js"></script>
30
- <script async src="/js/instant-page.min.js" type="module"></script>
34
+ <script data-swup-ignore-script defer src="/js/mdit/shiki.js"></script>
35
+ <script data-swup-ignore-script defer src="/js/main.js"></script>
36
+ <script
37
+ data-swup-ignore-script
38
+ async
39
+ src="/js/instant-page.min.js"
40
+ type="module"
41
+ ></script>
31
42
  </Fragment>
32
43
  );
33
44
  }
@@ -14,7 +14,8 @@ const swup = new Swup({
14
14
  plugins: [
15
15
  new SwupHeadPlugin({
16
16
  persistTags: true
17
- })
17
+ }),
18
+ new SwupScriptsPlugin()
18
19
  ]
19
20
  });
20
21
  `;
@@ -22,7 +23,11 @@ const swup = new Swup({
22
23
  <Fragment>
23
24
  <script src="/js/host/swup/Swup.umd.min.js"></script>
24
25
  <script src="/js/host/swup/head-plugin.umd.min.js"></script>
25
- <script dangerouslySetInnerHTML={{ __html: swupScript }}></script>
26
+ <script src="/js/host/swup/scripts-plugin.umd.min.js"></script>
27
+ <script
28
+ data-swup-ignore-script
29
+ dangerouslySetInnerHTML={{ __html: swupScript }}
30
+ ></script>
26
31
  </Fragment>
27
32
  );
28
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-gnix",
3
- "version": "6.0.3",
3
+ "version": "6.0.5",
4
4
  "author": "Efterklang <gaojiaxing0220@gmail.com>",
5
5
  "license": "MIT",
6
6
  "description": "Second generation of Hexo theme Icarus, now with Catppuccin flavor and night mode support.",
@@ -347,7 +347,6 @@ textarea {
347
347
  html {
348
348
  box-sizing: border-box;
349
349
  height: 100%;
350
- font-size: 16px;
351
350
  min-width: 300px;
352
351
  overflow-x: hidden;
353
352
  overflow-y: scroll;
@@ -356,7 +355,6 @@ html {
356
355
  body {
357
356
  min-height: 100%;
358
357
  font-weight: 400;
359
- font-size: 1em;
360
358
  line-height: 1.5;
361
359
  display: flex;
362
360
  flex-direction: column;
@@ -1090,7 +1088,7 @@ input.task-list-item-checkbox:checked::before {
1090
1088
  .medium-zoom-overlay {
1091
1089
  backdrop-filter: blur(8px);
1092
1090
  -webkit-backdrop-filter: blur(8px);
1093
- z-index: 150 !important;
1091
+ z-index: 150;
1094
1092
  }
1095
1093
 
1096
1094
  .medium-zoom-image--opened {
@@ -8,28 +8,22 @@ code span {
8
8
  font-weight: var(--shiki-light-font-weight);
9
9
  }
10
10
 
11
- :is([data-theme="tokyo_night"]) {
12
- code span {
13
- font-style: var(--shiki-tokyo-font-style) !important;
14
- font-weight: var(--shiki-tokyo-font-weight) !important;
15
- color: var(--shiki-tokyo) !important;
16
- }
11
+ :is([data-theme="tokyo_night"]) code span {
12
+ font-style: var(--shiki-tokyo-font-style) !important;
13
+ font-weight: var(--shiki-tokyo-font-weight) !important;
14
+ color: var(--shiki-tokyo) !important;
17
15
  }
18
16
 
19
- :is([data-theme="nord_night"]) {
20
- code span {
21
- font-style: var(--shiki-nord-font-style) !important;
22
- font-weight: var(--shiki-nord-font-weight) !important;
23
- color: var(--shiki-nord) !important;
24
- }
17
+ :is([data-theme="nord_night"]) code span {
18
+ font-style: var(--shiki-nord-font-style) !important;
19
+ font-weight: var(--shiki-nord-font-weight) !important;
20
+ color: var(--shiki-nord) !important;
25
21
  }
26
22
 
27
- :is([data-theme="mocha"], [data-theme="macchiato"]) {
28
- code span {
29
- font-style: var(--shiki-dark-font-style) !important;
30
- font-weight: var(--shiki-dark-font-weight) !important;
31
- color: var(--shiki-dark) !important;
32
- }
23
+ :is([data-theme="mocha"], [data-theme="macchiato"]) code span {
24
+ font-style: var(--shiki-dark-font-style) !important;
25
+ font-weight: var(--shiki-dark-font-weight) !important;
26
+ color: var(--shiki-dark) !important;
33
27
  }
34
28
 
35
29
  figure.shiki {
@@ -0,0 +1,2 @@
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t||self).SwupScriptsPlugin=e()}(this,function(){function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},t.apply(this,arguments)}const e=t=>String(t).split(".").map(t=>String(parseInt(t||"0",10))).concat(["0","0"]).slice(0,3).join(".");class n{constructor(){this.isSwupPlugin=!0,this.swup=void 0,this.version=void 0,this.requires={},this.handlersToUnregister=[]}mount(){}unmount(){this.handlersToUnregister.forEach(t=>t()),this.handlersToUnregister=[]}_beforeMount(){if(!this.name)throw new Error("You must define a name of plugin when creating a class.")}_afterUnmount(){}_checkRequirements(){return"object"!=typeof this.requires||Object.entries(this.requires).forEach(([t,n])=>{if(!function(t,n,r){const o=function(t,e){var n;if("swup"===t)return null!=(n=e.version)?n:"";{var r;const n=e.findPlugin(t);return null!=(r=null==n?void 0:n.version)?r:""}}(t,r);return!!o&&((t,n)=>n.every(n=>{const[,r,o]=n.match(/^([\D]+)?(.*)$/)||[];var s,i;return((t,e)=>{const n={"":t=>0===t,">":t=>t>0,">=":t=>t>=0,"<":t=>t<0,"<=":t=>t<=0};return(n[e]||n[""])(t)})((i=o,s=e(s=t),i=e(i),s.localeCompare(i,void 0,{numeric:!0})),r||">=")}))(o,n)}(t,n=Array.isArray(n)?n:[n],this.swup)){const e=`${t} ${n.join(", ")}`;throw new Error(`Plugin version mismatch: ${this.name} requires ${e}`)}}),!0}on(t,e,n={}){var r;e=!(r=e).name.startsWith("bound ")||r.hasOwnProperty("prototype")?e.bind(this):e;const o=this.swup.hooks.on(t,e,n);return this.handlersToUnregister.push(o),o}once(e,n,r={}){return this.on(e,n,t({},r,{once:!0}))}before(e,n,r={}){return this.on(e,n,t({},r,{before:!0}))}replace(e,n,r={}){return this.on(e,n,t({},r,{replace:!0}))}off(t,e){return this.swup.hooks.off(t,e)}}return class extends n{constructor(t){void 0===t&&(t={}),super(),this.name="SwupScriptsPlugin",this.requires={swup:">=4"},this.defaults={head:!0,body:!0,optin:!1},this.options=void 0,this.options={...this.defaults,...t}}mount(){this.on("content:replace",this.runScripts)}runScripts(){const{head:t,body:e,optin:n}=this.options,r=this.getScope({head:t,body:e});if(!r)return;const o=Array.from(r.querySelectorAll(n?"script[data-swup-reload-script]":"script:not([data-swup-ignore-script])"));o.forEach(t=>this.runScript(t)),this.swup.log(`Executed ${o.length} scripts.`)}runScript(t){const e=document.createElement("script");for(const{name:n,value:r}of t.attributes)e.setAttribute(n,r);return e.textContent=t.textContent,t.replaceWith(e),e}getScope(t){let{head:e,body:n}=t;return e&&n?document:e?document.head:n?document.body:null}}});
2
+ //# sourceMappingURL=index.umd.js.map