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;
--switcher-color: #333;
--switcher-bg-color: #fff;
--switcher-border-color: #333333
--switcher-border-radius: 5px;
--switcher-color: #fff;
--svg-color: #ccc;
--svg-state-color:#ff5858;

View File

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

View File

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

View File

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