u.twoha.cc/static/style.css
2024-10-15 21:08:29 -05:00

223 lines
4.4 KiB
CSS

@font-face {
font-family: 'Noto Sans Mono';
src: local('Noto Sans Mono'),
url('/static/NotoSansMono-Regular.ttf') format('truetype');
font-weight: normal;
}
@font-face {
font-family: 'Noto Sans Mono';
src: local('Noto Sans Mono'),
url('/static/NotoSansMono-Bold.ttf') format('truetype');
font-weight: bold;
}
body, article a:not(p a), code { font-family: "Noto Sans Mono", "Courier New", "Consolas", monospace; }
article { font-family: "Noto Sans", "Verdana", sans-serif; }
body {
margin: 0;
line-height: 1.5;
background-color: var(--bg);
overflow-x: hidden;
color: var(--fg);
font-size: 16px;
}
h1 { font-size: 20px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
ul { padding-left: 15px; }
h1::before, h2::before, h3::before {
display: block;
content: "";
margin-top: -50px;
height: 50px;
visibility: hidden;
pointer-events: none;
}
blockquote {
border-left: 1px solid var(--fg);
padding: 0 20px;
font-style: italic;
margin: 20px;
}
input, textarea {
background-color: var(--bg);
color: var(--fg);
border: 1px solid var(--fg);
margin: 5px;
}
input[type=submit] {
cursor: pointer;
}
table, th, td {
border: 1px dashed var(--fg);
border-collapse: collapse;
padding: 3px;
}
tr:nth-child(odd) td {
background-color: var(--bg);
}
a, .a, .fa span, #vol span {
text-decoration: none;
cursor: pointer;
color: var(--fg);
}
.noa a { text-decoration: underline; }
a::before, .a::before { content: "[\00A0"; }
a::after, .a::after { content: "\00A0]"; }
a:hover, .a:hover, .fa:hover span, #vol:hover span {
color: var(--fg2);
text-decoration: underline;
}
.usn { user-select: none; }
.dn { display: none; }
.f { flex: 1 }
.fg { flex-grow: 1; }
.container {
display: flex;
flex-wrap: wrap;
margin: 0 auto;
max-width: var(--width);
}
@media (max-width: 450px) {
#content .container {
flex-flow: column;
}
}
.panel {
margin: 10px;
padding: 15px;
border: 1px dashed var(--fg3);
background-color: var(--bg2);
min-width: 130px;
overflow: hidden;
}
.m { width: max-content; }
.c {
text-align: center;
width: min-content;
margin: 10% auto;
}
.c2 { justify-content: center; }
header {
position: sticky;
top: 0;
left: 0;
width: calc(100vw - 20px);
padding: 10px 10px 0;
background-color: var(--bg);
}
header .container {
min-height: 30px;
border-bottom: 1px dashed var(--fg3);
}
hr {
border: none;
border-top: 1px dashed var(--fg3);
}
.popup {
position: fixed;
right: 5%;
bottom: -80px;
height: 30px;
overflow: hidden;
border: 1px dashed var(--fg3);
background-color: var(--bg2);
padding: 20px;
animation: popup 3s alternate 2 ease-in-out;
}
@keyframes popup {
0% { bottom: -80px; }
20%, 100% { bottom: -5px; }
}
#l, #r {
padding: 10px;
position: fixed;
top: 0;
z-index: 1;
}
#l { left: 0; }
#r { right: 0; }
#l2, #r2 { display: none; }
body {
--width: 800px;
@media (max-width: 1000px) {
#l, #r { display: none; }
#l2, #r2 { display: initial; }
}
}
body:has(article) {
--width: 1000px;
@media (max-width: 1200px) {
#l, #r { display: none; }
#l2, #r2 { display: initial; }
}
}
nav {
position: fixed;
transition: left 0.5s;
left: -300px;
}
#settings {
position: fixed;
transition: right 0.5s;
right: -300px;
}
#hamburger:checked ~ nav { left: 0; }
#gear:checked ~ #settings { right: 0; }
nav a {
width: min-content;
display: none;
}
#hamburger:checked ~ nav a { display: block; }
nav p {
margin: 0;
user-select: none;
display: block;
}
#hamburger:checked ~ nav p { display: none; }
#ldark { display: var(--ldark); }
#llight { display: var(--llight); }
#llight span, #ldark span { vertical-align: top; }
.fa {
white-space: nowrap;
display: inline-block;
}
.fa span {
/*line-height: 1;*/
display: inline-block;
text-align: center;
width: 28px;
height: 22px;
}
.fa .usn { width: 10px; }
#vol { display: inline-block; }
#vol span:hover ~ span {
color: var(--fg);
text-decoration: none;
font-weight: normal;
}
.hl {
overflow-x: scroll;
border: 1px solid hsl(from var(--fg2) h s l / 0.5);
margin: 15px 0;
}
a:has(code)::before, a:has(code)::after, p a::before, p a::after, .noa a::before, .noa a::after {
content: ""
}
.hl pre {
color: inherit;
margin: 5px;
}
p code { white-space: nowrap; }
a code, p a { text-decoration: underline; }
code:not(.hl code) {
margin: 2px;
background-color: var(--bg);
padding: 0 5px;
border-radius: 3px;
}