diff options
| author | Eltrac Koalar <hi@guhub.cn> | 2022-08-27 01:32:20 +0800 |
|---|---|---|
| committer | Eltrac Koalar <hi@guhub.cn> | 2022-08-27 01:32:20 +0800 |
| commit | 4d50c2ea56095ae788fa9f11e69cb17fb81031f1 (patch) | |
| tree | 775105c1e6ab036e6345554506e6911251f6fa37 /includes | |
| parent | cfc80a31140b29f219c54dc19dca63b919e645e3 (diff) | |
:last_quarter_moon: Add: 支持自动切换夜间模式
同时添加了夜间模式相关的设置项
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/footer.php | 2 | ||||
| -rw-r--r-- | includes/header.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/includes/footer.php b/includes/footer.php index c60fff9..7906e85 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -4,7 +4,7 @@ <?php Matcha::footerInfo(); ?> <!-- 返回顶部按钮 --> <div id="helpbar"> - <button id="light-switch" title="开关灯"><span class="iconfont"></span></button> + <?php if($this->options->DarkMode=='default' || $this->options->DarkMode=='dark'){ ?><button id="light-switch" title="开关灯"><span class="iconfont"></span></button><?php } ?> <button id="back2top" title="返沪顶部"><span class="iconfont"></span></button> </div> </footer> diff --git a/includes/header.php b/includes/header.php index ce0aefd..4a5ba24 100644 --- a/includes/header.php +++ b/includes/header.php @@ -1,6 +1,6 @@ <?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; $this->need("includes/head.php"); ?> -<body> +<body<?php Matcha::ifDark(); ?>> <?php $this->need('includes/sidebar.php'); ?> <div id="body"> <div class="container"> |
