Initial layout
This commit is contained in:
223
site.css
Normal file
223
site.css
Normal file
@@ -0,0 +1,223 @@
|
||||
:root {
|
||||
--bg: #12110f;
|
||||
--bar: #1a1815;
|
||||
--line: #342f2a;
|
||||
--text: #f4efe8;
|
||||
--muted: #9c9288;
|
||||
--dim: #6f675f;
|
||||
--accent: #f0a36a;
|
||||
--selected: #2a241e;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100dvh;
|
||||
display: grid;
|
||||
grid-template-columns: 16rem minmax(0, 1fr);
|
||||
grid-template-rows: auto minmax(0, 1fr);
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font: 15px/1.4 "Segoe UI", system-ui, sans-serif;
|
||||
}
|
||||
|
||||
.brand {
|
||||
grid-column: 1 / -1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 3.25rem;
|
||||
padding: 0.7rem 1rem;
|
||||
background: var(--bar);
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.brand h1 {
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
font-weight: 560;
|
||||
letter-spacing: 0.01em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.menu {
|
||||
grid-column: 1;
|
||||
grid-row: 2;
|
||||
overflow: auto;
|
||||
background: var(--bar);
|
||||
border-right: 1px solid var(--line);
|
||||
padding: 0.4rem 0;
|
||||
}
|
||||
|
||||
.menu a {
|
||||
display: block;
|
||||
padding: 0.45rem 1rem;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.menu a:hover {
|
||||
background: #231f1b;
|
||||
}
|
||||
|
||||
.menu a[aria-current="page"] {
|
||||
background: var(--selected);
|
||||
box-shadow: inset 3px 0 var(--accent);
|
||||
}
|
||||
|
||||
.menu a:focus-visible,
|
||||
#source-btn:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.viewport {
|
||||
grid-column: 2;
|
||||
grid-row: 2;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
grid-template-rows: auto minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.viewport.is-splash {
|
||||
grid-template-rows: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.viewport.is-splash .caption {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.caption {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
min-height: 3.25rem;
|
||||
padding: 0.7rem 1rem;
|
||||
background: var(--bar);
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.caption h2 {
|
||||
margin: 0;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 560;
|
||||
}
|
||||
|
||||
.caption p {
|
||||
margin: 0.1rem 0 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
#source-btn {
|
||||
flex: none;
|
||||
font: inherit;
|
||||
color: var(--text);
|
||||
background: transparent;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 999px;
|
||||
padding: 0.2rem 0.75rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#source-btn[aria-pressed="true"] {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.stage {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.stage.has-source {
|
||||
grid-template-columns: minmax(0, 1fr) minmax(16rem, 28rem);
|
||||
}
|
||||
|
||||
.splash {
|
||||
place-self: center;
|
||||
margin: 0;
|
||||
color: var(--dim);
|
||||
}
|
||||
|
||||
iframe,
|
||||
.source {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
iframe {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.source {
|
||||
margin: 0;
|
||||
overflow: auto;
|
||||
padding: 1rem 1.1rem;
|
||||
background: #0e0d0b;
|
||||
border-left: 1px solid var(--line);
|
||||
color: #e7dfd4;
|
||||
font: 13px/1.45 ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
body {
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: auto auto minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.brand h1 {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.menu {
|
||||
grid-column: 1;
|
||||
grid-row: 2;
|
||||
display: flex;
|
||||
gap: 0.25rem;
|
||||
overflow-x: auto;
|
||||
border-right: 0;
|
||||
border-bottom: 1px solid var(--line);
|
||||
padding: 0.35rem;
|
||||
}
|
||||
|
||||
.menu a {
|
||||
white-space: nowrap;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.menu a[aria-current="page"] {
|
||||
box-shadow: inset 0 -2px var(--accent);
|
||||
}
|
||||
|
||||
.viewport {
|
||||
grid-column: 1;
|
||||
grid-row: 3;
|
||||
}
|
||||
|
||||
.stage.has-source {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
grid-template-rows: minmax(0, 1fr) minmax(8rem, 34vh);
|
||||
}
|
||||
|
||||
.source {
|
||||
border-left: 0;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user