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
+19
View File
@@ -0,0 +1,19 @@
/**
* Routes, under the app's base path (/usaco/, from vite.config.js).
*
* Everything is public; what the admin sees beyond solved problems is decided
* by the server per request (the same URLs, more data), so there are no guards.
*/
import { createRouter, createWebHistory } from "vue-router";
export default createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{ path: "/", name: "list", component: () => import("@/views/ProblemList.vue") },
{ path: "/p/:name", name: "problem", component: () => import("@/views/ProblemPage.vue"), props: true },
{ path: "/stats", name: "stats", component: () => import("@/views/StatsPage.vue") },
{ path: "/:pathMatch(.*)*", redirect: "/" },
],
scrollBehavior: (to, from, saved) => saved || { top: 0 },
});