summaryrefslogtreecommitdiffstats
path: root/includes/head.php
diff options
context:
space:
mode:
authorEltrac Koalar <hi@guhub.cn>2020-02-29 11:30:50 +0800
committerGitHub <noreply@github.com>2020-02-29 11:30:50 +0800
commit85827e2c81a4c2507b7cb510cf455e313d4aebca (patch)
tree0f85e7052aabce5f531ed21f6df0ad2f918e2e45 /includes/head.php
parent355e8bd3857ee4766b3273ffb8eb5d5218228079 (diff)
💻 Perf: 移除夜间模式在 PHP 层面的判断
Diffstat (limited to 'includes/head.php')
-rw-r--r--includes/head.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/head.php b/includes/head.php
index 74c2eba..104181c 100644
--- a/includes/head.php
+++ b/includes/head.php
@@ -1,6 +1,6 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<!DOCTYPE HTML>
-<html>
+<html<?php if($this->options->grayTheme && $this->options->grayTheme=1): ?> class="body-gray"<?php endif; ?>>
<head>
<meta charset="<?php $this->options->charset(); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -50,4 +50,4 @@
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:300|Noto+Serif+SC:300&display=swap" rel="stylesheet">
<style>.body-dark .pio-action .pio-home{background-image: url(<?php Utils::indexTheme('images/icons/home.png'); ?>);}.body-dark .pio-action .pio-close{background-image: url(<?php Utils::indexTheme('images/icons/remove.png'); ?>);}.body-dark .pio-action .pio-skin{background-image: url(<?php Utils::indexTheme('images/icons/skin.png'); ?>);}.body-dark .pio-action .pio-info{background-image: url(<?php Utils::indexTheme('images/icons/info.png'); ?>);}.body-dark .pio-action .pio-night{background-image: url(<?php Utils::indexTheme('images/icons/night.png'); ?>);}@media (min-width:992px) {.search{background-image:url(<?php Utils::indexTheme('images/search.png'); ?>);}.login{background-image:url(<?php Utils::indexTheme('images/login.png'); ?>)}}.search {background-position: bottom right;background-repeat: no-repeat}.login {background-position: bottom left;background-repeat:no-repeat}<?php $this->options->cssEcho(); ?></style>
</head>
- <body class="<?php if(date("H") > 20 || date("H") < 7){echo 'body-dark';} ?><?php if($this->options->bodyFonts && $this->options->bodyFonts=1): ?> body-serif<?php endif; ?><?php if($this->options->grayTheme && $this->options->grayTheme=1): ?> body-gray<?php endif; ?> body-contentsize-small">
+ <body class="<?php if($this->options->bodyFonts && $this->options->bodyFonts=1): ?> body-serif<?php endif; ?> body-contentsize-small">