darkmode scripts
This commit is contained in:
@ -24,7 +24,7 @@ body {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
p, ul, text, a, tr, td, li, ol, ul {
|
||||
p, ul, text, a, tr, td, li, ol, ul, .katex {
|
||||
color: var(--darkgray);
|
||||
fill: var(--darkgray);
|
||||
}
|
||||
@ -67,7 +67,7 @@ a {
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-left: 0;
|
||||
margin: 1rem 0;
|
||||
border-left: 3px solid var(--secondary);
|
||||
padding-left: 1rem;
|
||||
transition: border-color 0.2s ease;
|
||||
@ -134,7 +134,7 @@ pre {
|
||||
& > code {
|
||||
background: none;
|
||||
padding: 0;
|
||||
font-size: 0.9rem;
|
||||
font-size: 0.85rem;
|
||||
counter-reset: line;
|
||||
counter-increment: line 0;
|
||||
display: grid;
|
||||
|
@ -4,7 +4,7 @@
|
||||
border: 1px solid var(--border);
|
||||
background-color: var(--bg);
|
||||
border-radius: 5px;
|
||||
padding: 0 0.7rem;
|
||||
padding: 0 1rem;
|
||||
|
||||
&[data-callout="note"] {
|
||||
--color: #448aff;
|
||||
|
45
quartz/styles/darkmode.scss
Normal file
45
quartz/styles/darkmode.scss
Normal file
@ -0,0 +1,45 @@
|
||||
.darkmode {
|
||||
float: right;
|
||||
padding: 1rem;
|
||||
min-width: 30px;
|
||||
position: relative;
|
||||
|
||||
@media all and (max-width: 450px) {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
& > .toggle {
|
||||
display: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
& svg {
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
top: calc(50% - 10px);
|
||||
margin: 0 7px;
|
||||
fill: var(--darkgray);
|
||||
transition: opacity 0.1s ease;
|
||||
}
|
||||
}
|
||||
|
||||
:root[saved-theme="dark"] .toggle ~ label {
|
||||
& > #dayIcon {
|
||||
opacity: 0;
|
||||
}
|
||||
& > #nightIcon {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
:root .toggle ~ label {
|
||||
& > #dayIcon {
|
||||
opacity: 1;
|
||||
}
|
||||
& > #nightIcon {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
10
quartz/styles/header.scss
Normal file
10
quartz/styles/header.scss
Normal file
@ -0,0 +1,10 @@
|
||||
header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin: 1em 0 2em 0;
|
||||
& > h1 {
|
||||
margin: 0;
|
||||
flex: auto;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user