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]>
20 lines
800 B
JavaScript
20 lines
800 B
JavaScript
/**
|
|
* 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 },
|
|
});
|