Add Python FastAPI service, cheap hotels page, and Tailwind theme refactor
Deploy with Docker Compose / deploy (push) Successful in 1m29s

- Replace searxng and open-webui with a FastAPI `python/` service proxied
  at /py/ (Travelodge hotel search, rate-limited in nginx)
- Add CheapHotels view and CreateToggle component
- Move design tokens into Tailwind @theme in styles.css and migrate
  components/views to utility classes; CVLayout re-points tokens for light theme
- Update README, CLAUDE.md, and .gitignore accordingly

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dphx7LL5JC8dAFYU7MMpoA
This commit is contained in:
2026-09-08 00:06:04 +01:00
co-authored by Claude Fable 5.1
parent d777ea4b7d
commit 152f60ee32
66 changed files with 2209 additions and 1020 deletions
+3 -12
View File
@@ -2,15 +2,14 @@
import { computed, ref, defineAsyncComponent } from "vue";
import LinkTable from "@/components/util/LinkTable.vue";
import Header from "@/components/text/Header.vue";
import CreateToggle from "@/components/input/CreateToggle.vue";
import { useHomeDataStore } from "@/stores/homeData";
import { useAuthStore } from "@/stores/auth";
const CreateBookmark = defineAsyncComponent(
() => import("@/views/admin/CreateBookmark.vue"),
);
const homeData = useHomeDataStore();
const authStore = useAuthStore();
const showCreate = ref(false);
@@ -27,16 +26,8 @@ const groupedBookmarks = computed(() => {
<template>
<div class="bookmarks-wrapper">
<Header class="text-left">
<span class="flex items-center justify-between w-full">
{{ showCreate ? "Create Bookmark" : "Bookmarks" }}
<button
v-if="authStore.user.admin"
class="text-sm px-1"
@click="showCreate = !showCreate"
>
{{ showCreate ? "x" : "+" }}
</button>
</span>
{{ showCreate ? "Create Bookmark" : "Bookmarks" }}
<template #action><CreateToggle v-model="showCreate" /></template>
</Header>
<CreateBookmark
v-if="showCreate"
+3 -12
View File
@@ -2,33 +2,24 @@
import AutoScroll from "@/components/util/AutoScroll.vue";
import LinkTable from "@/components/util/LinkTable.vue";
import Header from "@/components/text/Header.vue";
import CreateToggle from "@/components/input/CreateToggle.vue";
import { ref, defineAsyncComponent } from "vue";
import { useActivityStore } from "@/stores/activity";
import { useAuthStore } from "@/stores/auth";
const CreateActivity = defineAsyncComponent(
() => import("@/views/admin/CreateActivity.vue"),
);
const activityStore = useActivityStore();
const authStore = useAuthStore();
const showCreate = ref(false);
</script>
<template>
<div class="flex flex-col items-center">
<Header>
<span class="flex items-center justify-between w-full">
{{ showCreate ? "Create Activity" : "Consumption" }}
<button
v-if="authStore.user.admin"
class="text-sm px-1"
@click="showCreate = !showCreate"
>
{{ showCreate ? "x" : "+" }}
</button>
</span>
{{ showCreate ? "Create Activity" : "Consumption" }}
<template #action><CreateToggle v-model="showCreate" /></template>
</Header>
<CreateActivity
v-if="showCreate"
+3 -12
View File
@@ -1,34 +1,25 @@
<script setup>
import Header from "@/components/text/Header.vue";
import CreateToggle from "@/components/input/CreateToggle.vue";
import LinkTable from "@/components/util/LinkTable.vue";
import AutoScroll from "@/components/util/AutoScroll.vue";
import { ref, defineAsyncComponent } from "vue";
import { useFavoritesStore } from "@/stores/favorites";
import { useAuthStore } from "@/stores/auth";
const CreateFavorite = defineAsyncComponent(
() => import("@/views/admin/CreateFavorite.vue"),
);
const favoritesStore = useFavoritesStore();
const authStore = useAuthStore();
const showCreate = ref(false);
</script>
<template>
<div class="flex flex-col items-center">
<Header>
<span class="flex items-center justify-between w-full">
{{ showCreate ? "Create Favorite" : "favs" }}
<button
v-if="authStore.user.admin"
class="text-sm px-1"
@click="showCreate = !showCreate"
>
{{ showCreate ? "x" : "+" }}
</button>
</span>
{{ showCreate ? "Create Favorite" : "favs" }}
<template #action><CreateToggle v-model="showCreate" /></template>
</Header>
<CreateFavorite
v-if="showCreate"
+3 -10
View File
@@ -2,6 +2,7 @@
import Button from "@/components/input/Button.vue";
import Markdown from "@/components/util/Markdown.vue";
import Header from "@/components/text/Header.vue";
import CreateToggle from "@/components/input/CreateToggle.vue";
import { ref, computed, defineAsyncComponent } from "vue";
import { useAuthStore } from "@/stores/auth";
@@ -45,16 +46,8 @@ function deletePost() {
<template>
<div class="flex flex-col flex-1 min-h-0">
<Header>
<span class="flex items-center justify-between w-full">
{{ showCreate ? "Create Post" : post.title }}
<button
v-if="authStore.user.admin"
class="text-sm px-1"
@click="showCreate = !showCreate"
>
{{ showCreate ? "x" : "+" }}
</button>
</span>
{{ showCreate ? "Create Post" : post.title }}
<template #action><CreateToggle v-model="showCreate" /></template>
</Header>
<CreatePost
v-if="showCreate"
+21 -30
View File
@@ -1,8 +1,8 @@
<script setup>
import { ref, computed, defineAsyncComponent } from "vue";
import Header from "@/components/text/Header.vue";
import CreateToggle from "@/components/input/CreateToggle.vue";
import { useHomeDataStore } from "@/stores/homeData";
import { useAuthStore } from "@/stores/auth";
import { storeToRefs } from "pinia";
const CreateRowing = defineAsyncComponent(
@@ -10,7 +10,6 @@ const CreateRowing = defineAsyncComponent(
);
const store = useHomeDataStore();
const authStore = useAuthStore();
const { loaded, error, rowingSessions } = storeToRefs(store);
const showCreate = ref(false);
@@ -21,9 +20,9 @@ const metric = ref("distance");
const hovered = ref(null);
const METRICS = [
{ key: "distance", label: "Distance (m)", color: "#55ffbb" },
{ key: "timePer500m", label: "Pace /500m", color: "#ff579a" },
{ key: "calories", label: "Calories", color: "#62ff57" },
{ key: "distance", label: "Distance (m)", color: "var(--color-primary)" },
{ key: "timePer500m", label: "Pace /500m", color: "var(--color-tertiary)" },
{ key: "calories", label: "Calories", color: "var(--color-secondary)" },
];
const activeMetric = computed(() =>
@@ -117,16 +116,8 @@ function formatValue(key, val) {
<template>
<div class="flex flex-col h-full overflow-hidden">
<Header>
<span class="flex items-center justify-between w-full">
{{ showCreate ? "Upload Rowing" : "Rowing" }}
<button
v-if="authStore.user.admin"
class="text-sm px-1"
@click="showCreate = !showCreate"
>
{{ showCreate ? "x" : "+" }}
</button>
</span>
{{ showCreate ? "Upload Rowing" : "Rowing" }}
<template #action><CreateToggle v-model="showCreate" /></template>
</Header>
<CreateRowing
@@ -150,7 +141,7 @@ function formatValue(key, val) {
class="metric-btn text-xs px-2 py-0.5 font-heading border"
:style="{
borderColor: m.color,
color: metric === m.key ? '#1b110e' : m.color,
color: metric === m.key ? 'var(--color-surface)' : m.color,
backgroundColor: metric === m.key ? m.color : 'transparent',
}"
@click="metric = m.key"
@@ -176,7 +167,7 @@ function formatValue(key, val) {
:y1="yl.y"
:x2="W - PR"
:y2="yl.y"
stroke="var(--quaternary)"
stroke="var(--color-quaternary)"
stroke-width="0.5"
/>
@@ -220,8 +211,8 @@ function formatValue(key, val) {
:y="yl.y + 3"
text-anchor="end"
font-size="10"
fill="var(--primary)"
font-family="var(--font_heading)"
fill="var(--color-primary)"
font-family="var(--font-heading)"
>
{{ yl.label }}
</text>
@@ -234,8 +225,8 @@ function formatValue(key, val) {
:y="H - 4"
text-anchor="middle"
font-size="10"
fill="var(--primary)"
font-family="var(--font_heading)"
fill="var(--color-primary)"
font-family="var(--font-heading)"
>
{{ xl.label }}
</text>
@@ -246,7 +237,7 @@ function formatValue(key, val) {
:y1="PT"
:x2="PL"
:y2="PT + PLOT_H"
stroke="var(--primary)"
stroke="var(--color-primary)"
stroke-width="0.5"
/>
<line
@@ -254,7 +245,7 @@ function formatValue(key, val) {
:y1="PT + PLOT_H"
:x2="W - PR"
:y2="PT + PLOT_H"
stroke="var(--primary)"
stroke="var(--color-primary)"
stroke-width="0.5"
/>
@@ -265,7 +256,7 @@ function formatValue(key, val) {
:y="points[hovered].y - 20"
width="82"
height="32"
fill="var(--bg_primary)"
fill="var(--color-surface)"
:stroke="activeMetric.color"
stroke-width="0.5"
rx="1"
@@ -274,8 +265,8 @@ function formatValue(key, val) {
:x="Math.min(points[hovered].x + 7, W - 82)"
:y="points[hovered].y - 6"
font-size="12"
fill="var(--secondary)"
font-family="var(--font_heading)"
fill="var(--color-secondary)"
font-family="var(--font-heading)"
>
{{
points[hovered].date.toLocaleDateString("en-GB", {
@@ -290,7 +281,7 @@ function formatValue(key, val) {
:y="points[hovered].y + 8"
font-size="14"
:fill="activeMetric.color"
font-family="var(--font_heading)"
font-family="var(--font-heading)"
>
{{ formatValue(metric, points[hovered].value) }}
</text>
@@ -302,7 +293,7 @@ function formatValue(key, val) {
<div class="flex justify-between text-xs border-t border-quaternary pt-1">
<div class="flex flex-col items-center">
<span class="text-primary font-heading">{{ rows.length }}</span>
<span class="text-quaternary" style="font-size: 0.6rem"
<span class="text-quaternary text-[0.6rem]"
>sessions</span
>
</div>
@@ -312,7 +303,7 @@ function formatValue(key, val) {
rows.reduce((s, r) => s + r.distance, 0).toLocaleString()
}}m</span
>
<span class="text-quaternary" style="font-size: 0.6rem"
<span class="text-quaternary text-[0.6rem]"
>total dist</span
>
</div>
@@ -322,7 +313,7 @@ function formatValue(key, val) {
rows.reduce((s, r) => s + r.timePer500m, 0) / (rows.length || 1),
)
}}</span>
<span class="text-quaternary" style="font-size: 0.6rem"
<span class="text-quaternary text-[0.6rem]"
>avg pace</span
>
</div>
+26 -53
View File
@@ -2,14 +2,10 @@
import Timer from "@/components/util/Timer.vue";
import Time from "@/components/util/Time.vue";
import Radio from "@/components/util/Radio.vue";
import Elle from "@/components/elle/Elle.vue";
import Chat from "@/components/util/Chat.vue";
import MusicPlayer from "@/components/util/MusicPlayer.vue";
import CommitHistory from "@/components/util/CommitHistory.vue";
import Intro from "./Intro.vue";
import Intro2 from "./Intro2.vue";
import BadApple from "./BadApple.vue";
import Miku from "./Miku.vue";
import Stamps from "./Stamps.vue";
import Listening from "./Listening.vue";
@@ -17,7 +13,6 @@ import Links from "./Links.vue";
import Feed from "./Feed.vue";
import Collage from "./Collage.vue";
import Favorites from "./Favorites.vue";
// import Gym from "./Gym.vue";
import Gym2 from "./Gym2.vue";
import Consumption from "./Consumption.vue";
import Steam from "./Steam.vue";
@@ -28,13 +23,10 @@ import Bookmarks from "./Bookmarks.vue";
<main class="justify-center flex flex-row w-full h-full overflow-x-hidden">
<div class="outerWrap flex flex-row">
<div class="sidebar">
<Time class="time-sidebar sidebar-cell" />
<Timer class="timer-sidebar sidebar-cell" />
<Radio class="radio-sidebar sidebar-cell" />
<CommitHistory class="commits-sidebar flex-1 sidebar-cell" />
<!-- <Elle class="flex-1" /> -->
<!-- <MusicPlayer /> -->
<Time class="time-sidebar cell" />
<Timer class="timer-sidebar cell" />
<Radio class="radio-sidebar cell" />
<CommitHistory class="commits-sidebar flex-1 cell" />
<img
src="/img/memes/fire-woman.gif"
alt=""
@@ -44,26 +36,23 @@ import Bookmarks from "./Bookmarks.vue";
loading="lazy"
/>
</div>
<div class="a4page-portrait homeGrid relative bdr-1 border-quaternary">
<!-- <Intro class="intro" /> -->
<Intro2 class="intro grid-cell" />
<!-- <BadApple class="intro" /> -->
<Listening class="listening grid-cell" />
<Stamps class="stamps grid-cell" />
<Feed class="feed grid-cell" />
<Links class="links grid-cell" />
<Collage class="collage grid-cell" />
<Consumption class="consumption grid-cell" />
<Favorites class="favorites grid-cell" />
<!-- <Gym class="gym" /> -->
<Gym2 class="gym grid-cell" />
<div class="page-a4 homeGrid relative bdr-1 border-quaternary">
<Intro2 class="intro cell" />
<Listening class="listening cell" />
<Stamps class="stamps cell" />
<Feed class="feed cell" />
<Links class="links cell" />
<Collage class="collage cell" />
<Consumption class="consumption cell" />
<Favorites class="favorites cell" />
<Gym2 class="gym cell" />
</div>
<div class="sidebar">
<Steam class="steam-sidebar sidebar-cell" />
<Bookmarks class="bookmarks-sidebar sidebar-cell" />
<Chat class="chat-sidebar flex-1 min-h-0 chat-home sidebar-cell" />
<Steam class="steam-sidebar cell" />
<Bookmarks class="bookmarks-sidebar cell" />
<Chat class="chat-sidebar flex-1 min-h-0 chat-home cell" />
<Miku
class="sidebar-image miku-image box-border border-tertiary border-2 bg-bg_primary"
class="sidebar-image miku-image box-border border-tertiary border-2 bg-surface"
/>
</div>
</div>
@@ -71,13 +60,13 @@ import Bookmarks from "./Bookmarks.vue";
</template>
<style scoped>
.grid-cell {
background-color: var(--bg_primary);
border-width: 2px;
border-style: solid;
border-color: var(--quaternary);
/* Every widget, in the grid or a sidebar */
.cell {
background-color: var(--color-surface);
border: 2px solid var(--color-quaternary);
}
/* Grid placement — see grid-template-areas in .homeGrid below */
.intro {
grid-area: intro;
}
@@ -106,13 +95,6 @@ import Bookmarks from "./Bookmarks.vue";
grid-area: favorites;
}
.sidebar-cell {
background-color: var(--bg_primary);
border-width: 2px;
border-style: solid;
border-color: var(--quaternary);
}
.sidebar {
margin: 0;
flex: 1;
@@ -128,6 +110,7 @@ import Bookmarks from "./Bookmarks.vue";
gap: 10px;
}
/* Desktop: 10x10 grid on the A4 sheet */
.homeGrid {
display: grid;
gap: 5px;
@@ -154,6 +137,7 @@ import Bookmarks from "./Bookmarks.vue";
height: 15rem;
}
/* Tablet: sidebars stack below the sheet */
@media (max-width: 1360px) {
.outerWrap {
flex-direction: column;
@@ -197,14 +181,9 @@ import Bookmarks from "./Bookmarks.vue";
.timer-sidebar {
display: none;
}
/* .sidebar-image { */
/* max-height: 150px; */
/* max-width: 150px; */
/* object-fit: contain; */
/* } */
}
/* Phone: 3-column grid, collage and gym hidden */
@media (max-width: 700px) {
.homeGrid {
border-image: none;
@@ -234,10 +213,4 @@ import Bookmarks from "./Bookmarks.vue";
display: none;
}
}
.bg-random {
background-color: var(--bg_primary);
background-image: url("/img/miku/miku2.gif");
background-size: 10px 10px;
}
</style>
+1
View File
@@ -7,6 +7,7 @@ const site_links = [
{ name: "CV", link: "/cv" },
{ name: "Bookmarks", link: "/bookmarks" },
{ name: "Shrines", link: "/shrines" },
{ name: "Hotels", link: "/hotels" },
{ name: "Admin", link: "/admin" },
];
-15
View File
@@ -87,19 +87,4 @@ p {
width: 100%;
margin: 0 auto;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s ease;
}
.fade-leave-active {
position: absolute;
top: 0;
left: 0;
right: 0;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
</style>
-15
View File
@@ -108,21 +108,6 @@ p {
margin: 0 auto;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s ease;
}
.fade-leave-active {
position: absolute;
top: 0;
left: 0;
right: 0;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
@media (max-width: 850px) {
.steam-wrapper {
height: auto;
+1 -1
View File
@@ -14,7 +14,7 @@ const videoSources = [
<template>
<main class="items-center flex flex-col">
<div
class="a4page-portrait bdr-1 flex flex-row relative overflow-scroll items-center"
class="page-a4 bdr-1 flex flex-row relative overflow-scroll items-center"
>
<p>
<Link href="https://wiki.teamfortress.com/wiki/Demoman">The goat</Link>
+1 -1
View File
@@ -5,7 +5,7 @@ import Wip from "@/components/util/Wip.vue";
<template>
<main class="items-center flex flex-col">
<div
class="a4page-portrait items-center bdr-1 flex flex-col relative overflow-scroll"
class="page-a4 items-center bdr-1 flex flex-col relative overflow-scroll"
>
<Wip />
</div>
+1 -1
View File
@@ -5,7 +5,7 @@ import Wip from "@/components/util/Wip.vue";
<template>
<main class="items-center flex flex-col">
<div
class="a4page-portrait items-center bdr-1 flex flex-col relative overflow-scroll"
class="page-a4 items-center bdr-1 flex flex-col relative overflow-scroll"
>
<Wip />
</div>
+1 -2
View File
@@ -10,9 +10,8 @@ const shrine_links = [
<template>
<main class="items-center flex flex-col">
<div class="background" />
<div
class="a4page-portrait bdr-1 flex flex-col relative overflow-scroll gap-1"
class="page-a4 bdr-1 flex flex-col relative overflow-scroll gap-1"
>
<RouterTable :linkArr="shrine_links" />
</div>
@@ -5,7 +5,7 @@ import Wip from "@/components/util/Wip.vue";
<template>
<main class="items-center flex flex-col">
<div
class="a4page-portrait items-center bdr-1 flex flex-col relative overflow-scroll"
class="page-a4 items-center bdr-1 flex flex-col relative overflow-scroll"
>
<Wip />
</div>