hexo-theme-shokax 0.0.1-alpha1 → 0.0.1-alpha2

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 CHANGED
@@ -24,6 +24,8 @@ pwa:
24
24
  experiments:
25
25
  noPlayer: false # 禁用音乐播放器
26
26
  gradient: false # 使用CSS渐变作为文章封面
27
+ gradientCover: "" # 当gradient为true时使用的主页面cover
28
+ debug: false # 使用debug模式启动
27
29
 
28
30
  icon:
29
31
  favicon: "/favicon.ico"
package/_images.yml CHANGED
@@ -1,3 +1,4 @@
1
+ # 此images已失效,见https://github.com/zkz098/hexo-theme-shokaX/issues/6
1
2
  - 6833939bly1giciryrr3rj20zk0m8nhk.jpg
2
3
  - 6833939bly1gicis081o9j20zk0m8dmr.jpg
3
4
  - 6833939bly1gicis3attqj20zk0m8k7l.jpg
@@ -33,7 +33,11 @@ link(rel="alternate" type="application/json" title=siteTitle href=feedLink)
33
33
  if theme.custom.enable
34
34
  != _local_fonts()
35
35
  != _css('app.css')
36
- script(src="https://unpkg.com/vue@3/dist/vue.global.js")
36
+ - var debugVue = theme?.experiments?.debug
37
+ if debugVue
38
+ script(src="https://cdn.staticfile.org/vue/3.2.45/vue.global.js")
39
+ else
40
+ script(src="https://cdn.staticfile.org/vue/3.2.45/vue.global.prod.js")
37
41
  include pwa.pug
38
42
  if twikooLink && !wl
39
43
  != _css("twikoo.css")
@@ -30,13 +30,17 @@ html(lang=page.language?page.language:config.language, style=theme.grayMode ? 'f
30
30
 
31
31
  != partial('_partials/header.pug', {}, {cache: true})
32
32
  div(id="imgs" class="pjax")
33
- - var covers = _cover(page, 6)
34
- if covers.length === 6
33
+ if theme.experiments.gradient
35
34
  ul
36
- each image in covers
37
- li(class="item" data-background-image=image)
35
+ li(class="item" data-background-image=theme.experiments.gradientCover)
38
36
  else
39
- img(src=covers)
37
+ - var covers = _cover(page, 6)
38
+ if covers.length === 6
39
+ ul
40
+ each image in covers
41
+ li(class="item" data-background-image=image)
42
+ else
43
+ img(src=covers)
40
44
  div(id="waves")
41
45
  svg(class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto")
42
46
  defs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.0.1-alpha1",
3
+ "version": "0.0.1-alpha2",
4
4
  "description": "a hexo theme based on shoka",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/zkz098/hexo-theme-shokaX",
@@ -27,6 +27,7 @@ const randomBG = function (count = 1, image_server = null, image_list = []) {
27
27
  if (img.startsWith('//') || img.startsWith('http')) {
28
28
  return img
29
29
  } else {
30
+ console.warn("sinaimg blocked all request from outside website,so don't use this format")
30
31
  return `https://tva${randomServer}.sinaimg.cn/` + size + '/' + img
31
32
  }
32
33
  }