Skip to content

Commit

Permalink
feat: fixedCover独立
Browse files Browse the repository at this point in the history
  • Loading branch information
zkz098 committed Feb 2, 2023
1 parent 7840e43 commit 8ce2619
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ pwa:
experiments:
noPlayer: false # 禁用音乐播放器
gradient: false # 使用CSS渐变作为文章封面
gradientCover: "" # 当gradient为true时使用的主页面cover(为空则使用bing随机图片)
fixedCover: "" # 主页面cover(为空则使用bing随机图片)
debug: false # 使用debug模式启动
disableThemeComment: false # 禁用主题评论系统(一般用于关闭评论或让插件接管评论系统)
usingRelative: false # _image.yml 使用相对路径

playerAPI: "https://api.injahow.cn" # 结尾不带/,只填写域名
# 如果条件允许,请参考 https://github.com/injahow/meting-api 自建API
# 建议使用vercel自行部署,请参考: https://github.com/xizeyoupan/Meting-API
# 使用vercel自行部署,请参考: https://github.com/xizeyoupan/Meting-API

disableVL: false # 禁用可见度监听

Expand All @@ -39,10 +39,10 @@ icon:
apple_touch_icon: "/apple-touch-icon.png"

seo:
bing: "bing-key"
google: "google-key"
yandex: "yandex-key"
baidu: "baidu-key"
bing:
google:
yandex:
baidu:

visitor:
clarity: false
Expand Down
4 changes: 2 additions & 2 deletions layout/_partials/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ html(lang=page.language?page.language:config.language, style=theme.grayMode ? 'f

!= partial('_partials/header.pug', {}, {cache: true})
div(id="imgs" class="pjax")
if theme.experiments.gradient
if theme.experiments.gradient || theme.experiments.fixedCover
//- cover不可用时用Bing随机图片代替
- var coverImage = theme?.experiments?.gradientCover || "https://7ed.net/bing/api"
- var coverImage = theme.experiments.fixedCover || "https://7ed.net/bing/api"
img(src=coverImage)
else
- var covers = _cover(page, 6)
Expand Down

0 comments on commit 8ce2619

Please sign in to comment.