clove/cdn
public/style.css
/* Shared look with doughmination.gay (~/projects/web): IBM Plex Sans, the
same tokens, the faded background behind the top of the page, a header
bar, and rounded cards. Served as-is, so the worker's own pages
(src/views.ts) use it too. */
@font-face {
font-family: "IBM Plex Sans";
src: url("/_app/fonts/IBMPlexSans-Regular.woff2") format("woff2");
font-weight: 400;
font-display: swap;
}
@font-face {
font-family: "IBM Plex Sans";
src: url("/_app/fonts/IBMPlexSans-Medium.woff2") format("woff2");
font-weight: 500;
font-display: swap;
}
@font-face {
font-family: "IBM Plex Sans";
src: url("/_app/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
font-weight: 600;
font-display: swap;
}
@font-face {
font-family: "IBM Plex Sans";
src: url("/_app/fonts/IBMPlexSans-Bold.woff2") format("woff2");
font-weight: 700;
font-display: swap;
}
/* Comic Code for anything monospace */
@font-face {
font-family: "Comic Code";
src: url("https://raw.doughmination.gay/f/Comic-Code/woff2/ComicCode-Regular.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Comic Code";
src: url("https://raw.doughmination.gay/f/Comic-Code/woff2/ComicCode-Italic.woff2") format("woff2");
font-weight: 400;
font-style: italic;
font-display: swap;
}
@font-face {
font-family: "Comic Code";
src: url("https://raw.doughmination.gay/f/Comic-Code/woff2/ComicCode-Medium.woff2") format("woff2");
font-weight: 500;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "Comic Code";
src: url("https://raw.doughmination.gay/f/Comic-Code/woff2/ComicCode-Bold.woff2") format("woff2");
font-weight: 700;
font-style: normal;
font-display: swap;
}
:root {
--bg: #0b0a0d;
--raised: rgb(255 255 255 / 3.5%);
--line: rgb(255 255 255 / 9%);
--text: #ece9ef;
--muted: #a49eab;
--accent: #eb459e;
--accent-dim: rgb(235 69 158 / 14%);
--danger: #ed4245;
--mono: "Comic Code", ui-monospace, SFMono-Regular, Menlo, monospace;
color-scheme: dark;
font-family: "IBM Plex Sans", system-ui, sans-serif;
background: var(--bg);
color: var(--text);
}
* { box-sizing: border-box; }
html { height: 100%; }
body {
display: flex;
position: relative;
flex-direction: column;
min-height: 100%;
margin: 0;
font-size: 1rem;
line-height: 1.6;
}
a {
color: var(--text);
text-decoration-color: rgb(235 69 158 / 55%);
text-underline-offset: 0.2em;
}
a:hover {
color: #fff;
text-decoration-color: var(--accent);
}
h1 {
margin: 0 0 1rem;
line-height: 1.25;
text-wrap: balance;
}
p { margin: 0 0 1rem; }
.wrap {
width: 100%;
max-width: 62rem;
margin: 0 auto;
padding-inline: 1.5rem;
}
/* Backdrop: fixed height, so every page gets the same amount of background */
.backdrop {
position: absolute;
top: 0;
right: 0;
left: 0;
z-index: -1;
height: 30rem;
overflow: hidden;
pointer-events: none;
}
.backdrop::before {
content: "";
position: absolute;
inset: 0;
background: url("/_app/background.avif") center / cover no-repeat;
opacity: 0.5;
}
.backdrop::after {
content: "";
position: absolute;
inset: 0;
background:
linear-gradient(rgb(11 10 13 / 55%), rgb(11 10 13 / 80%) 55%, var(--bg)),
radial-gradient(70% 60% at 20% 30%, rgb(235 69 158 / 12%), transparent 70%);
}
/* Top bar */
header {
position: relative;
z-index: 2;
display: flex;
flex-wrap: wrap;
gap: 1rem 1.5rem;
align-items: center;
justify-content: space-between;
width: 100%;
max-width: 62rem;
margin: 0 auto;
padding: 1.25rem 1.5rem;
}
header nav {
display: flex;
flex-wrap: wrap;
gap: 0.5rem 1.25rem;
font-size: 0.9rem;
}
header nav a {
color: var(--muted);
text-decoration: none;
}
header nav a:hover,
header nav a[aria-current="page"] { color: var(--text); }
.brand {
display: inline-flex;
gap: 0.6rem;
align-items: center;
font-weight: 600;
letter-spacing: 0.01em;
text-decoration: none;
}
.brand img {
border-radius: 50%;
outline: 1px solid var(--line);
}
/* Page heading */
.hero { padding-block: 3rem 1.5rem; }
.eyebrow {
margin: 0 0 0.5rem;
color: var(--accent);
font-size: 0.75rem;
font-weight: 600;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.hero h1 {
margin: 0 0 0.75rem;
font-size: clamp(2.25rem, 7vw, 3.5rem);
font-weight: 700;
letter-spacing: -0.03em;
overflow-wrap: anywhere;
}
.lede {
max-width: 36rem;
color: #cfc9d6;
}
.note {
max-width: 36rem;
padding-left: 1rem;
border-left: 3px solid var(--accent);
color: var(--muted);
font-size: 0.95rem;
}
.content { padding-bottom: 3rem; }
/* Breadcrumbs */
.crumbs {
margin: 0 0 1rem;
color: var(--muted);
font-size: 0.9rem;
overflow-wrap: anywhere;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep {
margin: 0 0.4rem;
color: var(--line);
}
/* Inputs */
.filter {
width: 100%;
margin-bottom: 1rem;
padding: 0.6rem 0.9rem;
border: 1px solid var(--line);
border-radius: 0.75rem;
background: var(--raised);
color: var(--text);
font: inherit;
font-size: 0.95rem;
}
.filter:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 4px var(--accent-dim);
}
/* Pill buttons */
.btn,
.row .remove {
display: inline-flex;
gap: 0.4em;
align-items: center;
padding: 0.35rem 0.9rem;
border: 1px solid var(--line);
border-radius: 999px;
background: var(--raised);
color: var(--text);
font: inherit;
font-size: 0.9rem;
text-decoration: none;
cursor: pointer;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.row .remove {
padding: 0.15rem 0.7rem;
color: var(--muted);
font-size: 0.8rem;
}
.btn:hover:not(:disabled),
.row .remove:hover {
border-color: rgb(235 69 158 / 40%);
box-shadow: 0 0 0 4px var(--accent-dim);
color: var(--text);
}
.btn.danger:hover:not(:disabled),
.row .delete:hover:not(:disabled) {
border-color: var(--danger);
box-shadow: 0 0 0 4px rgb(237 66 69 / 15%);
color: var(--danger);
}
.btn:disabled {
color: var(--muted);
cursor: default;
}
/* Listing card */
.listing {
margin: 0;
padding: 0;
overflow: hidden;
border: 1px solid var(--line);
border-radius: 1rem;
background: var(--raised);
list-style: none;
}
.row {
display: flex;
gap: 0.75rem;
align-items: center;
padding: 0.6rem 1.1rem;
border-top: 1px solid var(--line);
}
.row:first-child { border-top: none; }
.row:hover { background: var(--accent-dim); }
.row .name {
flex: 1;
min-width: 0;
overflow: hidden;
color: var(--text);
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
}
.row.folder .name { font-weight: 500; }
.row.folder .name svg { color: var(--accent); }
.row .name:hover { text-decoration: underline; }
.row .size,
.row .status {
color: var(--muted);
font-size: 0.85rem;
white-space: nowrap;
}
.row .status.ok { color: var(--accent); }
.row .status.err { color: var(--danger); text-align: right; white-space: normal; }
.actions .status.err { color: var(--danger); }
.row.empty {
justify-content: center;
color: var(--muted);
}
/* Folder tools and upload panel (signed in) */
.newfolder {
display: flex;
flex: 1;
flex-wrap: wrap;
gap: 0.5rem;
align-items: center;
}
.newfolder .filter {
flex: 1;
min-width: 12rem;
width: auto;
margin-bottom: 0;
padding: 0.35rem 0.9rem;
}
.uploader { margin-bottom: 1.5rem; }
.uploader .listing { margin-bottom: 1rem; }
.uploader .actions { margin-bottom: 0; }
.drop {
display: flex;
flex-wrap: wrap;
gap: 0.4em;
align-items: center;
justify-content: center;
margin-bottom: 1rem;
padding: 1.5rem 1rem;
border: 1px dashed var(--line);
border-radius: 1rem;
background: var(--raised);
color: var(--muted);
text-align: center;
cursor: pointer;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.drop:hover,
.drop.over,
.drop:focus-within {
border-color: var(--accent);
box-shadow: 0 0 0 4px var(--accent-dim);
color: var(--text);
}
.drop strong { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.drop input {
position: absolute;
width: 1px;
height: 1px;
opacity: 0;
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 0.75rem 1rem;
align-items: center;
margin-bottom: 1rem;
color: var(--muted);
font-size: 0.9rem;
}
.actions input { accent-color: var(--accent); }
/* File preview */
.preview {
overflow: hidden;
border: 1px solid var(--line);
border-radius: 1rem;
background: var(--raised);
}
.preview img,
.preview video {
display: block;
max-width: 100%;
max-height: 75vh;
margin: 0 auto;
}
.preview audio {
display: block;
width: 100%;
padding: 1rem;
}
.preview iframe {
display: block;
width: 100%;
height: 75vh;
border: none;
}
.preview pre {
max-height: 75vh;
margin: 0;
padding: 1rem 1.25rem;
overflow: auto;
font: 0.85rem/1.55 var(--mono);
tab-size: 2;
}
.preview .model {
position: relative;
height: 75vh;
min-height: 20rem;
touch-action: none;
}
.preview .model canvas {
display: block;
width: 100%;
height: 100%;
cursor: grab;
}
.preview .model canvas:active {
cursor: grabbing;
}
.preview .model-status {
position: absolute;
inset: 0;
display: grid;
place-items: center;
pointer-events: none;
}
.preview .model-tools {
position: absolute;
right: 0.75rem;
bottom: 0.75rem;
display: flex;
gap: 0.5rem;
}
.preview .empty {
margin: 0;
padding: 2.5rem 1rem;
color: var(--muted);
text-align: center;
}
/* Rendered markdown (licence page) */
.doc { line-height: 1.7; }
.doc h1 { font-size: 1.5rem; margin: 1.8rem 0 0.75rem; }
.doc h2 { font-size: 1.2rem; margin: 1.5rem 0 0.6rem; }
.doc h3 { font-size: 1.05rem; }
.doc ul,
.doc ol { padding-left: 1.3rem; }
.doc li { margin: 0.3rem 0; }
.doc hr {
margin: 1.6rem 0;
border: none;
border-top: 1px solid var(--line);
}
.doc code {
padding: 0.1rem 0.35rem;
border: 1px solid var(--line);
border-radius: 0.35rem;
background: var(--raised);
font: 0.9em var(--mono);
}
.doc pre {
white-space: pre-wrap;
word-break: break-word;
}
/* Footer: in the page flow, pinned to the bottom of short pages */
footer {
display: flex;
flex-wrap: wrap;
gap: 0.25rem 0.75rem;
align-items: center;
width: 100%;
max-width: 62rem;
margin: auto auto 0;
padding: 1.25rem 1.5rem;
border-top: 1px solid var(--line);
color: var(--muted);
font-size: 0.85rem;
}
footer > span {
display: inline-flex;
gap: 0.4em;
align-items: center;
}
/* Dot between items, skipped on the first */
footer > span + span::before {
content: "·";
margin-right: 0.75rem;
color: var(--line);
}
footer img { border-radius: 50%; }
@media (max-width: 40rem) {
.hero { padding-block: 2rem 1rem; }
.row { flex-wrap: wrap; }
footer {
flex-direction: column;
justify-content: center;
text-align: center;
}
footer > span + span::before { content: none; }
}
@media (prefers-reduced-motion: reduce) {
.btn,
.row .remove,
.drop { transition: none; }
}
/* Material icons from Icon.svelte, sized to match the old 15px glyphs */
.icon {
width: 15px;
height: 15px;
flex-shrink: 0;
vertical-align: -0.2em;
margin-right: 0.35em;
}