change theme switcher

This commit is contained in:
Junyi Hou 2024-03-04 15:17:16 +08:00
parent 41359247d2
commit 167685313d
4 changed files with 14 additions and 16 deletions

View File

@ -28,10 +28,7 @@
--post-info-color: grey; --post-info-color: grey;
--switcher-color: #333; --switcher-color: #fff;
--switcher-bg-color: #fff;
--switcher-border-color: #333333
--switcher-border-radius: 5px;
--svg-color: #ccc; --svg-color: #ccc;
--svg-state-color:#ff5858; --svg-state-color:#ff5858;

View File

@ -30,10 +30,7 @@
--post-info-color: grey; --post-info-color: grey;
--switcher-color: #fff; --switcher-color: #333;
--switcher-bg-color: #333;
--switcher-border-color: #eeeeee;
--switcher-border-radius: 5px;
--svg-color: #333; --svg-color: #333;
--svg-state-color: #a31d1d; --svg-state-color: #a31d1d;

View File

@ -234,6 +234,12 @@ header h2 {
margin-top: 1em; margin-top: 1em;
} }
.header-top-left {
display: flex;
align-items: center;
justify-content: space-between;
}
.site-title { .site-title {
display: inline; display: inline;
white-space: nowrap; white-space: nowrap;
@ -258,7 +264,7 @@ header nav a {
/* Social icons */ /* Social icons */
.social-icons { .social-icons {
display: inline; display: inline;
margin: 1em 0 0 3em; margin: 1em 0 0 1em;
padding: 0; padding: 0;
list-style-type: none; list-style-type: none;
} }
@ -733,12 +739,9 @@ ul.language-select > li, ul.footer-menu > li {
.theme-switcher { .theme-switcher {
color: var(--switcher-color); color: var(--switcher-color);
background: var(--switcher-bg-color); /* padding: 0.5em 1em; */
padding: 0.5em 1em; margin: 1em 0 0 1.5em;
font-size: 16px; cursor: pointer;
border: 1px solid var(--switcher-border-color);
border-radius: var(--switcher-border-radius);
margin-bottom: 1em;
} }
.h-card { .h-card {

View File

@ -1,10 +1,11 @@
<div class="header-top"> <div class="header-top">
<div class="header-top-left"> <div class="header-top-left">
{{ partial "site-title.html" . }} {{ partial "site-title.html" . }}
{{ partial "theme-switcher.html" . }}
{{ partial "social.html" . }} {{ partial "social.html" . }}
</div> </div>
<div class="header-top-right"> <div class="header-top-right">
{{ partial "theme-switcher.html" . }}
</div> </div>
</div> </div>