Fix/classic 22 (#1698)

* style: move customize color to theme.css
This commit is contained in:
Fen 2024-01-09 16:33:40 +08:00 committed by GitHub
parent c816efa26e
commit c5ab9295f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 27 deletions

View File

@ -19,7 +19,7 @@ function themeConfig($form)
'auto' => _t('自动'),
'light' => _t('浅色'),
'dark' => _t('深色'),
'colorful' => _t('彩色'),
'customize' => _t('自定义(请在 theme.css 里设置)'),
),
'auto',
_t('外观风格')

View File

@ -6,7 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php $this->archiveTitle('', '', ' | '); ?><?php $this->options->title(); ?><?php if ($this->is('index')): ?> | <?php $this->options->description() ?><?php endif; ?></title>
<link rel="stylesheet" href="<?php $this->options->themeUrl('static/css/style.css'); ?>">
<?php if ($this->options->colorSchema == 'customize'): ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('theme.css'); ?>">
<?php endif; ?>
<?php $this->header(); ?>
</head>

File diff suppressed because one or more lines are too long

View File

@ -26,30 +26,6 @@ body {
--level-odd-color: #{$grey-800};
}
[data-theme="colorful"] {
--background-color: #{$amber-50} !important;
--muted-border-color: rgba(0, 0, 0, .1) !important;
--form-element-border-color: rgba(0, 0, 0, .2) !important;
--level-odd-color: rgba(0, 0, 0, .025) !important;
.site-navbar {
background-color: var(--primary);
a,
.nav-toggler-btn,
input[type="search"] {
color: var(--primary-inverse);
}
.desc {
color: rgba(255, 255, 255, .5);
}
input[type="search"] {
border-color: rgba(255, 255, 255, .25);
--icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}
}
}
// Content
h1, h2, h3, h4, h5 { line-height: 1.25; }

View File

@ -0,0 +1,33 @@
/*!
* This is an example of a color scheme
* You can define your color scheme below
*/
[data-theme="customize"] {
/* --primary: #017FC0 !important;
--primary-hover: #02659A !important; */
--background-color: #fffbeb !important;
--muted-border-color: rgba(0, 0, 0, .1) !important;
--form-element-border-color: rgba(0, 0, 0, .2) !important;
--level-odd-color: rgba(0, 0, 0, .025) !important;
--code-background-color: rgba(0, 0, 0, .05) !important;
}
.site-navbar {
background-color: var(--primary);
}
.site-navbar a,
.site-navbar .nav-toggler-btn,
.site-navbar input[type="search"] {
color: var(--primary-inverse);
}
.site-navbar .desc {
color: rgba(255, 255, 255, .5);
}
.site-navbar input[type="search"] {
border-color: rgba(255, 255, 255, .25);
--icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}