add theme switch
parent
a4b72f86d2
commit
988ca21a65
|
@ -1,46 +1,42 @@
|
|||
|
||||
<style>
|
||||
:root {
|
||||
--color: #333;
|
||||
--color: #333333;
|
||||
--background: #f7f7f7;
|
||||
--cardbgcolor: #fff;
|
||||
--cardcolor: #333;
|
||||
--cardtitlecolor: #333333;
|
||||
--navbarcolor: #333333;
|
||||
--navbarbgcolor: rgba(255, 255, 255, 0.7);
|
||||
--img-default-filter: none;
|
||||
--img-hover-filter: none;
|
||||
--btn-bg-color: #f5f5f5;
|
||||
--btn-color: #333;
|
||||
--btn-hover-color: #eee;
|
||||
--link-color: #1485FE;
|
||||
--link-hover-color: #1485FE;
|
||||
|
||||
|
||||
/*code highlight*/
|
||||
--code-bg-color: #2c2a2a;
|
||||
--code-bg-color: #F1F3F3;
|
||||
--code-default-color: #A2A1A1;
|
||||
--code-line-numbers-bg-color: #403E3E;
|
||||
--code-line-numbers-bg-color: #EBEDED;
|
||||
--code-line-numbers-color: #888;
|
||||
|
||||
--code-keyworks-color: #c9c;
|
||||
--code-keyworks-color: #7012cc;
|
||||
--code-class-color: #f2777a;
|
||||
--code-cdata-color: hsl(313, 67%, 36%);
|
||||
--code-symbol-color: hsl(33, 83%, 45%);
|
||||
--code-variable-color: hsl(281, 89%, 64%);
|
||||
--code-regex-color: #e90;
|
||||
--code-deleted-color: red;
|
||||
--code-toolbar-bg-color: #454545;
|
||||
--code-toolbar-bg-color: #EBEDED;
|
||||
--code-toolbar-color: #1485FE;
|
||||
--code-line-numbers-rows-color: #888;
|
||||
|
||||
/*toc*/
|
||||
--toc-dot-color: #1485FE;
|
||||
--toc-dot-active-bg-color: #ebedef;
|
||||
--toc-dot-active-color: #1485FE;
|
||||
--toc-vertical-line-color: #888;
|
||||
--toc-dot-active-bg-color: #ebedef;
|
||||
--toc-vertical-line-color: #1485FE;
|
||||
--toc-item-bg-hover: #1485FE;
|
||||
|
||||
}
|
||||
<#if settings.blog_theme =='auto'>
|
||||
<#if settings.auto_theme!true>
|
||||
/*light theme*/
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
|
|
180
settings.yaml
180
settings.yaml
|
@ -1,100 +1,17 @@
|
|||
post:
|
||||
label: 文章设置
|
||||
sidebar:
|
||||
label: 个性化
|
||||
items:
|
||||
share_type:
|
||||
name: share_type
|
||||
label: 文章分享组件
|
||||
type: select
|
||||
default: 'sharejs'
|
||||
options:
|
||||
- value: ''
|
||||
label: '无'
|
||||
- value: addtoany
|
||||
label: addtoany
|
||||
- value: sharejs
|
||||
label: sharejs
|
||||
donate_alipay:
|
||||
name: donate_alipay
|
||||
label: 支付宝捐赠二维码
|
||||
type: attachment
|
||||
placeholder: '二维码地址'
|
||||
donate_wechat:
|
||||
name: donate_wechat
|
||||
label: 微信捐赠二维码
|
||||
type: attachment
|
||||
placeholder: '二维码地址'
|
||||
mathjax_enable:
|
||||
name: mathjax_enable
|
||||
label: MathJax
|
||||
auto_theme:
|
||||
name: auto_theme
|
||||
label: 主题模式
|
||||
type: radio
|
||||
data-type: bool
|
||||
default: false
|
||||
default: true
|
||||
options:
|
||||
- value: true
|
||||
label: 开启
|
||||
- value: false
|
||||
label: 关闭
|
||||
# code_pretty:
|
||||
# name: code_pretty
|
||||
# label: 文章代码高亮主题
|
||||
# type: select
|
||||
# default: light
|
||||
# options:
|
||||
# - value: Dark
|
||||
# label: dark
|
||||
# - value: light
|
||||
# label: light
|
||||
social:
|
||||
label: 社交设置
|
||||
items:
|
||||
social_github:
|
||||
name: social_github
|
||||
label: Github
|
||||
type: text
|
||||
placeholder: 'Github 用户名'
|
||||
social_qq:
|
||||
name: social_qq
|
||||
label: QQ
|
||||
type: text
|
||||
placeholder: 'QQ 号'
|
||||
social_weibo:
|
||||
name: social_weibo
|
||||
label: 微博
|
||||
type: text
|
||||
placeholder: '微博用户名'
|
||||
social_twitter:
|
||||
name: social_twitter
|
||||
label: Twitter
|
||||
type: text
|
||||
placeholder: 'Twitter 用户名'
|
||||
social_facebook:
|
||||
name: social_facebook
|
||||
label: Facebook
|
||||
type: text
|
||||
placeholder: 'Facebook 用户名'
|
||||
social_email:
|
||||
name: social_email
|
||||
label: Email
|
||||
type: text
|
||||
placeholder: '邮箱地址'
|
||||
social_telegram:
|
||||
name: social_telegram
|
||||
label: Telegram
|
||||
type: text
|
||||
placeholder: 'Telegram 用户名'
|
||||
sidebar:
|
||||
label: 个性化
|
||||
items:
|
||||
blog_theme:
|
||||
name: blog_theme
|
||||
label: 博客主题
|
||||
type: select
|
||||
default: 'auto'
|
||||
options:
|
||||
- value: 'auto'
|
||||
label: '自动'
|
||||
- value: close
|
||||
label: 关闭
|
||||
sidebar_profile:
|
||||
name: sidebar_profile
|
||||
label: 侧边栏个人资料
|
||||
|
@ -207,6 +124,91 @@ sidebar:
|
|||
- value: false
|
||||
label: 关闭
|
||||
|
||||
post:
|
||||
label: 文章设置
|
||||
items:
|
||||
share_type:
|
||||
name: share_type
|
||||
label: 文章分享组件
|
||||
type: select
|
||||
default: 'sharejs'
|
||||
options:
|
||||
- value: ''
|
||||
label: '无'
|
||||
- value: addtoany
|
||||
label: addtoany
|
||||
- value: sharejs
|
||||
label: sharejs
|
||||
donate_alipay:
|
||||
name: donate_alipay
|
||||
label: 支付宝捐赠二维码
|
||||
type: attachment
|
||||
placeholder: '二维码地址'
|
||||
donate_wechat:
|
||||
name: donate_wechat
|
||||
label: 微信捐赠二维码
|
||||
type: attachment
|
||||
placeholder: '二维码地址'
|
||||
mathjax_enable:
|
||||
name: mathjax_enable
|
||||
label: MathJax
|
||||
type: radio
|
||||
data-type: bool
|
||||
default: false
|
||||
options:
|
||||
- value: true
|
||||
label: 开启
|
||||
- value: false
|
||||
label: 关闭
|
||||
# code_pretty:
|
||||
# name: code_pretty
|
||||
# label: 文章代码高亮主题
|
||||
# type: select
|
||||
# default: light
|
||||
# options:
|
||||
# - value: Dark
|
||||
# label: dark
|
||||
# - value: light
|
||||
# label: light
|
||||
social:
|
||||
label: 社交设置
|
||||
items:
|
||||
social_github:
|
||||
name: social_github
|
||||
label: Github
|
||||
type: text
|
||||
placeholder: 'Github 用户名'
|
||||
social_qq:
|
||||
name: social_qq
|
||||
label: QQ
|
||||
type: text
|
||||
placeholder: 'QQ 号'
|
||||
social_weibo:
|
||||
name: social_weibo
|
||||
label: 微博
|
||||
type: text
|
||||
placeholder: '微博用户名'
|
||||
social_twitter:
|
||||
name: social_twitter
|
||||
label: Twitter
|
||||
type: text
|
||||
placeholder: 'Twitter 用户名'
|
||||
social_facebook:
|
||||
name: social_facebook
|
||||
label: Facebook
|
||||
type: text
|
||||
placeholder: 'Facebook 用户名'
|
||||
social_email:
|
||||
name: social_email
|
||||
label: Email
|
||||
type: text
|
||||
placeholder: '邮箱地址'
|
||||
social_telegram:
|
||||
name: social_telegram
|
||||
label: Telegram
|
||||
type: text
|
||||
placeholder: 'Telegram 用户名'
|
||||
|
||||
custom_links:
|
||||
label: 自定义链接
|
||||
items:
|
||||
|
|
Loading…
Reference in New Issue