Add the website: Go server + Vue SPA in site/, with CI

A standalone container for web_server, shaped like job-tracker: serves
/usaco/ with solved problems public and solving/skipped plus edits
(status, link, notes) for the site admin. Git is the only store: the
server clones adamf/usaco from Gitea, pulls on the push webhook, and
commits edits back. CI builds the image only when site/ changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-14 21:51:34 +01:00
co-authored by Claude Opus 5.5
parent 440d51caba
commit 6d956f1c76
39 changed files with 6285 additions and 0 deletions
+215
View File
@@ -0,0 +1,215 @@
/*
* Global stylesheet: tokens, base elements, shared bits (badges, buttons)
* and the code-highlighting colours.
*
* The palette and fonts are the job tracker's paper look (same fonts, copied
* into public/fonts), so the two read as parts of one site. Tailwind is here
* for its preflight reset; components use their own scoped <style> blocks.
*/
@import "tailwindcss";
@font-face {
font-family: "big_noodle_titling";
src: url("/usaco/fonts/big_noodle_titling.woff2") format("woff2");
font-weight: normal;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "CreatoDisplay";
src: url("/usaco/fonts/CreatoDisplay-Bold.woff2") format("woff2");
font-weight: normal;
font-style: normal;
font-display: swap;
}
/* `static` = always emit these variables, because component <style> blocks
reference them with var(). */
@theme static {
--color-ink: #111;
--color-ink-soft: #333;
--color-ink-muted: #555;
--color-ink-faint: #8a8a8a;
--color-ink-link: #0066cc;
--color-ink-danger: #c00;
--color-paper: #fff;
--color-paper-tint: #f5f5f5;
--color-paper-shade: #eee;
--color-line: #ccc;
--color-line-soft: #e0e0e0;
/* Status: identity, so always shown with its label, never colour alone. */
--color-solved: #0a7d0a;
--color-solving: #9a6700;
--color-skipped: #777;
/* Sequential blue (dataviz reference ramp): the solve heatmap. */
--color-seq-0: #ebebe8;
--color-seq-1: #9ec5f4;
--color-seq-2: #5598e7;
--color-seq-3: #256abf;
--color-seq-4: #0d366b;
--font-heading: "big_noodle_titling", sans-serif;
--font-body: "CreatoDisplay", sans-serif;
--font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
--default-font-family: var(--font-body);
}
body {
margin: 0;
min-height: 100vh;
overflow-x: hidden;
background: var(--color-paper-tint);
color: var(--color-ink);
line-height: 1.5;
}
h1,
h2,
h3 {
font-family: var(--font-heading);
font-weight: normal;
letter-spacing: 0.02em;
line-height: 1.1;
}
a {
color: var(--color-ink-link);
}
.card {
background: var(--color-paper);
border: 1px solid var(--color-line-soft);
border-radius: 6px;
}
.badge {
display: inline-block;
padding: 1px 8px;
border-radius: 999px;
font-size: 0.75rem;
border: 1px solid var(--color-line);
color: var(--color-ink-muted);
background: var(--color-paper);
white-space: nowrap;
}
.badge.solved {
color: var(--color-solved);
border-color: currentColor;
}
.badge.solving {
color: var(--color-solving);
border-color: currentColor;
}
.badge.skipped {
color: var(--color-skipped);
border-style: dashed;
}
.btn {
padding: 6px 14px;
border: 1px solid var(--color-line);
border-radius: 4px;
background: var(--color-paper);
color: var(--color-ink);
cursor: pointer;
}
.btn:hover:not(:disabled) {
border-color: var(--color-ink-muted);
}
.btn:disabled {
opacity: 0.5;
cursor: default;
}
.btn.primary {
background: var(--color-ink);
border-color: var(--color-ink);
color: var(--color-paper);
}
.error {
color: var(--color-ink-danger);
}
.muted {
color: var(--color-ink-muted);
}
/* highlight.js tokens, in the paper palette. */
.hljs {
color: var(--color-ink-soft);
}
.hljs-comment,
.hljs-quote {
color: #6a737d;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-built_in,
.hljs-meta .hljs-keyword {
color: #a3268d;
}
.hljs-type,
.hljs-title.class_ {
color: #0b6e99;
}
.hljs-string,
.hljs-meta .hljs-string {
color: #1a7f37;
}
.hljs-number,
.hljs-literal {
color: #b35900;
}
.hljs-title.function_,
.hljs-title {
color: #5a3fc0;
}
.hljs-meta {
color: #8250df;
}
.hljs-variable,
.hljs-params {
color: var(--color-ink-soft);
}
/* Rendered notes (markdown-it). */
.prose {
overflow-wrap: anywhere;
}
.prose > * + * {
margin-top: 0.75em;
}
.prose h1,
.prose h2,
.prose h3 {
font-size: 1.5rem;
}
.prose ul {
list-style: disc;
padding-left: 1.5em;
}
.prose ol {
list-style: decimal;
padding-left: 1.5em;
}
.prose code {
font-family: var(--font-mono);
font-size: 0.875em;
background: var(--color-paper-shade);
padding: 1px 4px;
border-radius: 3px;
}
.prose pre {
background: var(--color-paper-tint);
padding: 12px;
border-radius: 4px;
overflow-x: auto;
}
.prose pre code {
background: none;
padding: 0;
}