update dark color scheme + cleanup

This commit is contained in:
error 2023-04-25 11:35:21 +02:00
parent 73b6352c5f
commit fb0c8ac2c8

View File

@ -1,202 +1,203 @@
@font-face { @font-face {
font-family: 'ubuntu'; font-family: 'ubuntu';
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-display: swap; font-display: swap;
src: url('../fonts/Ubuntu-R.ttf') format('truetype'); src: url('../fonts/Ubuntu-R.ttf') format('truetype');
} }
:root :root
{ {
--teal: #008080; --accent-a: #008080;
--maroon: #800000; --accent-b: #800000;
--img-border: #FFFFFF; --img-border: #FFFFFF;
--gradient: linear-gradient(45deg, #800000 10%, #008080 90%); --gradient: linear-gradient(45deg, #800000 10%, #008080 90%);
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--teal: #7acccc; --accent-a: #7acccc;
--maroon: #cc7a7a; --accent-b: #ff0080;
--img-border: hsl(0, 1%, 25%); --img-border: hsl(0, 1%, 25%);
--gradient: linear-gradient(45deg, #cc7a7a 10%, #7acccc 90%); --body-bg-color: #1c1c1c;
} --gradient: linear-gradient(45deg, #ff0080 10%, #7acccc 90%);
}
} }
/* overwrite latex.css colors */ /* overwrite latex.css colors */
a, a,
a:visited { a:visited {
color: var(--teal); color: var(--accent-a);
text-decoration: none; text-decoration: none;
} }
a:hover { a:hover {
color: var(--maroon); color: var(--accent-b);
} }
video { video {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
display: block; display: block;
} }
/* don't use superscript text for references */ /* don't use superscript text for references */
sup { sup {
vertical-align: inherit; vertical-align: inherit;
font-size: 1rem; font-size: 1rem;
} }
/* main navigation */ /* main navigation */
nav.navigation { nav.navigation {
border-right-color: var(--teal); border-right-color: var(--accent-a);
border-right-style: solid; border-right-style: solid;
border-right-width: 4px; border-right-width: 4px;
font-family: "ubuntu"; font-family: "ubuntu";
margin-bottom: 1em; margin-bottom: 1em;
margin-left: -20vw; margin-left: -20vw;
min-width: 15vw; min-width: 15vw;
padding-right: 4px; padding-right: 4px;
padding-left: 4px; padding-left: 4px;
position: fixed; position: fixed;
text-align: right; text-align: right;
} }
nav.navigation h1 { nav.navigation h1 {
background: var(--gradient); background: var(--gradient);
-webkit-background-clip: text; -webkit-background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
color: var(--teal); color: var(--accent-a);
text-align: right; text-align: right;
} }
nav.navigation a { nav.navigation a {
color: var(--teal); color: var(--accent-a);
padding-right: 4px padding-right: 4px
text-align: right; text-align: right;
} }
nav.navigation a:hover { nav.navigation a:hover {
text-decoration: underline; text-decoration: underline;
} }
nav.navigation footer { nav.navigation footer {
color: var(--maroon); color: var(--accent-b);
font-size: 0.8rem; font-size: 0.8rem;
} }
nav.navigation footer a, nav.navigation footer a,
nav.navigation footer a:hover { nav.navigation footer a:hover {
color: var(--maroon); color: var(--accent-b);
} }
/* support small screens */ /* support small screens */
@media (max-width: 1080px) { @media (max-width: 1080px) {
nav.navigation { nav.navigation {
position: relative; position: relative;
border-right-style: none; border-right-style: none;
margin-left: 0px; margin-left: 0px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
nav.navigation h1 { nav.navigation h1 {
display: block; display: block;
border-right-color: var(--teal); border-right-color: var(--accent-a);
border-right-style: solid; border-right-style: solid;
border-right-width: 4px; border-right-width: 4px;
margin-bottom: 0px; margin-bottom: 0px;
padding-right: 4px; padding-right: 4px;
} }
nav.navigation div { nav.navigation div {
display: block; display: block;
padding-left: 4px; padding-left: 4px;
text-align: left; text-align: left;
} }
} }
/* Figure couter + lightbox for images */ /* Figure couter + lightbox for images */
body::before { body::before {
counter-reset: figure-counter; counter-reset: figure-counter;
} }
figure { figure {
counter-increment: figure-counter; counter-increment: figure-counter;
padding-top: 0 0.25em 0.25em; padding-top: 0 0.25em 0.25em;
} }
figcaption { figcaption {
font-size: 0.923em; font-size: 0.923em;
} }
figcaption::before { figcaption::before {
content: 'Figure ' counter(figure-counter) '. '; content: 'Figure ' counter(figure-counter) '. ';
font-weight: bold; font-weight: bold;
} }
.lightbox { .lightbox {
position: fixed; position: fixed;
top: 0px; top: 0px;
left: 0px; left: 0px;
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background-color: var(--body-bg-color); background-color: var(--body-bg-color);
text-align: center; text-align: center;
z-index: 666; z-index: 666;
visibility: hidden; visibility: hidden;
} }
figure:target .lightbox { figure:target .lightbox {
visibility: visible; visibility: visible;
} }
.lightbox-wrapper { .lightbox-wrapper {
display: inline-flex; display: inline-flex;
flex-direction: column; flex-direction: column;
max-width: 95%; max-width: 95%;
width: 95vw; width: 95vw;
height: 100%; height: 100%;
} }
.lightbox a { .lightbox a {
font-size: 1.25rem; font-size: 1.25rem;
align-self: end; align-self: end;
margin-bottom: auto; margin-bottom: auto;
} }
.lightbox img { .lightbox img {
width: auto; width: auto;
height: auto; height: auto;
max-width: 100%; max-width: 100%;
max-height: 90vh; max-height: 90vh;
margin-bottom: auto; margin-bottom: auto;
object-fit: contain; object-fit: contain;
} }
dl dd { dl dd {
text-align: left; text-align: left;
padding-left: 2rem; padding-left: 2rem;
} }
/* footnotes */ /* footnotes */
.footnote-ref::before { .footnote-ref::before {
content: '['; content: '[';
} }
.footnote-ref::after { .footnote-ref::after {
content: ']'; content: ']';
} }
.footnote ol { .footnote ol {
counter-reset: fn-counter; counter-reset: fn-counter;
padding-left: 2rem; padding-left: 2rem;
} }
.footnote li { .footnote li {
counter-increment: fn-counter; counter-increment: fn-counter;
} }
.footnote li::marker { .footnote li::marker {
content: '[' counter(fn-counter) '] '; content: '[' counter(fn-counter) '] ';
} }