feat(theme): implement dual light/dark colour token system with WCAG AA contrast
Replace hard-coded hex values and ad-hoc `dark:` variants with a single
semantic token layer in `src/styles/global.css` (`@theme` + `html.dark`
re-declaration), so every component uses the same Tailwind class list in
both modes.
Key changes:
- Define semantic tokens (page, surface, ink, accent, edge, etc.) and raw
ingredient palette (--color-spaghetti-*, --color-marinara*, etc.)
- Configure dual Shiki themes (light-plus / everforest-dark) with
`defaultColor: false` for proper per-mode code block colours, replacing
the old `.prose pre { #1f2937 !important }` hack
- Tint background particles to match the warm cream/espresso palette
instead of pure black dots
- Document theme rules: add tokens not `dark:` variants, keep colour rules
inside `@layer`, never target Tailwind utility classes with unlayered
overrides, route prose colours through `--tw-prose-*` only
All text and interactive elements meet WCAG AA contrast (4.5:1 body, 3:1
large/interactive). Light mode is a warm cream plate with white cards; dark
mode is espresso (#140C08) with raised cards.
This commit is contained in:
1 parent
8b6be36f7a
commit
9e157a4fa3
23 files changed
+531
-360
No files matched your search
@@ -50,6 +50,43 @@ Optional environment variables (all have working defaults):
|
||||
| `STATUS_STALE_AFTER_SECONDS` | `900` | Treat the light as unknown once beats stop arriving |
|
||||
|
||||
|
||||
## Theme and Colour Tokens
|
||||
|
||||
The site has one colour system, in `src/styles/global.css`. Components never hard-code
|
||||
a hex and, in almost every case, never need a `dark:` colour variant.
|
||||
|
||||
- **`@theme`** declares semantic tokens (`page`, `surface`, `wash`, `ink`, `ink-muted`,
|
||||
`accent`, `link`, `link-hover`, `edge`, `line`, `chip`, `chip-ink`, `code-bg`, `focus`,
|
||||
`status-*`). Tailwind generates `bg-page`, `text-ink`, `border-edge`, … from them.
|
||||
- **`html.dark`** re-declares the same names with cooked-longer values. Because Tailwind
|
||||
emits the utilities as `var(--color-*)` references, flipping the class on `<html>`
|
||||
recolours the whole site from the same class list.
|
||||
- **`--color-spaghetti-*`, `--color-marinara*`, `--color-meatball*`, `--color-parmesan`**
|
||||
are the raw ingredient palette. They feed the hero sky and gradients; they are *not*
|
||||
for text, because the pastels fall to 1.1–1.5:1 on the cream plate.
|
||||
|
||||
Rules that keep it from drifting again:
|
||||
|
||||
1. Add a token, don't add a `dark:` variant. A component class list should read the same
|
||||
in both modes.
|
||||
2. Keep colour rules inside `@layer`. Unlayered CSS outranks every Tailwind layer, which
|
||||
is how `.dark .text-spaghetti-brown` used to silently beat `dark:` utilities and put
|
||||
cream-on-cream text on the hero button (1.18:1).
|
||||
3. Never target a Tailwind utility class (e.g. `.border-black/15`) with an unlayered
|
||||
override — it fires in both modes.
|
||||
4. Prose colours go through `--tw-prose-*` only. The `html .prose` prefix in `global.css`
|
||||
is load-bearing: the typography plugin emits its defaults into the same layer but
|
||||
later, so at equal specificity it would win and articles would render slate.
|
||||
|
||||
Contrast is held to WCAG AA: 4.5:1 for body text and links, 3:1 for large text and
|
||||
interactive borders. Light mode is a warm cream plate with white cards; dark mode is a
|
||||
warm espresso plate (`#140C08`) with raised cards, so the marinara-and-meatball night sky
|
||||
has something warm to sit on.
|
||||
|
||||
Code blocks use dual Shiki themes (`light-plus` / `everforest-dark`, chosen by measuring
|
||||
every bundled theme's tokens against the site's own code backgrounds) with the
|
||||
`--shiki-light` / `--shiki-dark` swap in `global.css`.
|
||||
|
||||
## Technologies Used
|
||||
|
||||
- **Framework**: Astro (Static site generation)
|
||||
|
||||
@@ -11,6 +11,25 @@ export default defineConfig({
|
||||
integrations: [mdx(), sitemap(), solidJs()],
|
||||
output: "server",
|
||||
adapter: node({ mode: "ssr" }),
|
||||
markdown: {
|
||||
shikiConfig: {
|
||||
// Two themes plus `defaultColor: false` makes Shiki emit every token as a
|
||||
// `--shiki-light` / `--shiki-dark` pair instead of a hard-coded `color:`.
|
||||
// global.css then picks one per mode, so a light-mode reader no longer
|
||||
// gets a dark gray code block (the old `.prose pre { #1f2937 !important }`
|
||||
// hack) and a dark-mode reader no longer gets cream-on-cream.
|
||||
//
|
||||
// Chosen by measuring every bundled theme's token colours against the
|
||||
// site's own `code-bg` surfaces, not by eye: the previous vitesse pair
|
||||
// bottomed out at 1.04:1 (light) and 1.28:1 (dark) — punctuation was
|
||||
// effectively invisible. `light-plus` reaches ~3.5:1 on white and
|
||||
// `everforest-dark` ~5.6:1 on the espresso block, and everforest's warm
|
||||
// red/green/amber palette sits inside the pasta colours rather than
|
||||
// fighting them.
|
||||
themes: { light: "light-plus", dark: "everforest-dark" },
|
||||
defaultColor: false,
|
||||
},
|
||||
},
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
optimizeDeps: {
|
||||
|
||||
+6
-2
@@ -1,12 +1,16 @@
|
||||
|
||||
// Light-mode "particles" are grains of parmesan over the cream plate, not
|
||||
// hard black dots: #000 at 1-2px reads as dirt and fights the pasta palette.
|
||||
// Tinted with the ink token's hue and kept low-contrast on purpose.
|
||||
function generateParticles(n) {
|
||||
let value = `${getRandom(2560)}px ${getRandom(2560)}px #000`;
|
||||
let value = `${getRandom(2560)}px ${getRandom(2560)}px #C9B49B`;
|
||||
for (let i = 2; i <= n; i++) {
|
||||
value += `, ${getRandom(2560)}px ${getRandom(2560)}px #000`;
|
||||
value += `, ${getRandom(2560)}px ${getRandom(2560)}px #C9B49B`;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
// Dark-mode stars: parmesan and cream over espresso (#140C08), not pure black.
|
||||
function generateStars(n) {
|
||||
let value = `${getRandom(2560)}px ${getRandom(2560)}px #FFF6E5`;
|
||||
for (let i = 2; i <= n; i++) {
|
||||
|
||||
@@ -82,6 +82,13 @@
|
||||
<path d="M8 17h8"/>
|
||||
</symbol>
|
||||
|
||||
<!-- external-link (off-site nav items, e.g. Docs) -->
|
||||
<symbol id="external-link" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
|
||||
<path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"/>
|
||||
<path d="M15 3h6v6"/>
|
||||
<path d="M10 14L21 3"/>
|
||||
</symbol>
|
||||
|
||||
<!-- globe -->
|
||||
<symbol id="globe" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.268 14.0934C11.9051 13.4838 13.2303 12.2333 13.9384 10.6469C13.1192 10.7941 12.2138 10.9111 11.2469 10.9925C11.0336 12.2005 10.695 13.2621 10.268 14.0934ZM8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM8.48347 14.4823C8.32384 14.494 8.16262 14.5 8 14.5C7.83738 14.5 7.67616 14.494 7.51654 14.4823C7.5132 14.4791 7.50984 14.4759 7.50647 14.4726C7.2415 14.2165 6.94578 13.7854 6.67032 13.1558C6.41594 12.5744 6.19979 11.8714 6.04101 11.0778C6.67605 11.1088 7.33104 11.125 8 11.125C8.66896 11.125 9.32395 11.1088 9.95899 11.0778C9.80021 11.8714 9.58406 12.5744 9.32968 13.1558C9.05422 13.7854 8.7585 14.2165 8.49353 14.4726C8.49016 14.4759 8.4868 14.4791 8.48347 14.4823ZM11.4187 9.72246C12.5137 9.62096 13.5116 9.47245 14.3724 9.28806C14.4561 8.87172 14.5 8.44099 14.5 8C14.5 7.55901 14.4561 7.12828 14.3724 6.71194C13.5116 6.52755 12.5137 6.37904 11.4187 6.27753C11.4719 6.83232 11.5 7.40867 11.5 8C11.5 8.59133 11.4719 9.16768 11.4187 9.72246ZM10.1525 6.18401C10.2157 6.75982 10.25 7.36805 10.25 8C10.25 8.63195 10.2157 9.24018 10.1525 9.81598C9.46123 9.85455 8.7409 9.875 8 9.875C7.25909 9.875 6.53877 9.85455 5.84749 9.81598C5.7843 9.24018 5.75 8.63195 5.75 8C5.75 7.36805 5.7843 6.75982 5.84749 6.18401C6.53877 6.14545 7.25909 6.125 8 6.125C8.74091 6.125 9.46123 6.14545 10.1525 6.18401ZM11.2469 5.00748C12.2138 5.08891 13.1191 5.20593 13.9384 5.35306C13.2303 3.7667 11.9051 2.51622 10.268 1.90662C10.695 2.73788 11.0336 3.79953 11.2469 5.00748ZM8.48347 1.51771C8.4868 1.52089 8.49016 1.52411 8.49353 1.52737C8.7585 1.78353 9.05422 2.21456 9.32968 2.84417C9.58406 3.42562 9.80021 4.12856 9.95899 4.92219C9.32395 4.89118 8.66896 4.875 8 4.875C7.33104 4.875 6.67605 4.89118 6.04101 4.92219C6.19978 4.12856 6.41594 3.42562 6.67032 2.84417C6.94578 2.21456 7.2415 1.78353 7.50647 1.52737C7.50984 1.52411 7.51319 1.52089 7.51653 1.51771C7.67615 1.50597 7.83738 1.5 8 1.5C8.16262 1.5 8.32384 1.50597 8.48347 1.51771ZM5.73202 1.90663C4.0949 2.51622 2.76975 3.7667 2.06159 5.35306C2.88085 5.20593 3.78617 5.08891 4.75309 5.00748C4.96639 3.79953 5.30497 2.73788 5.73202 1.90663ZM4.58133 6.27753C3.48633 6.37904 2.48837 6.52755 1.62761 6.71194C1.54392 7.12828 1.5 7.55901 1.5 8C1.5 8.44099 1.54392 8.87172 1.62761 9.28806C2.48837 9.47245 3.48633 9.62096 4.58133 9.72246C4.52807 9.16768 4.5 8.59133 4.5 8C4.5 7.40867 4.52807 6.83232 4.58133 6.27753ZM4.75309 10.9925C3.78617 10.9111 2.88085 10.7941 2.06159 10.6469C2.76975 12.2333 4.0949 13.4838 5.73202 14.0934C5.30497 13.2621 4.96639 12.2005 4.75309 10.9925Z"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 7.2 KiB |
@@ -13,34 +13,34 @@ export default function ArrowCard({entry, pill, collection}: Props) {
|
||||
const resolvedCollection = "collection" in entry ? entry.collection : collection
|
||||
const id = "slug" in entry ? entry.slug : entry.id
|
||||
return (
|
||||
<a href={`/${resolvedCollection === 'blog' ? 'blog' : 'projects'}/${id}`} class="group p-4 gap-3 flex items-center border border-spaghetti-brown rounded-lg hover:bg-spaghetti-red/5 hover:dark:bg-spaghetti-cream/10 dark:border-spaghetti-dark-cream/20 transition-colors duration-300 ease-in-out">
|
||||
<div class="w-full group-hover:text-spaghetti-red group-hover:dark:text-spaghetti-dark-cream blend">
|
||||
<a href={`/${resolvedCollection === 'blog' ? 'blog' : 'projects'}/${id}`} class="group p-4 gap-3 flex items-center border border-edge rounded-lg bg-surface hover:bg-wash transition-colors duration-300 ease-in-out">
|
||||
<div class="w-full group-hover:text-link blend">
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
{pill &&
|
||||
<div class="text-sm capitalize px-2 py-0.5 rounded-full border border-black/15 dark:border-spaghetti-dark-cream/20 bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20 dark:text-spaghetti-dark-cream">
|
||||
<div class="text-sm capitalize px-2 py-0.5 rounded-full border border-line bg-chip text-chip-ink">
|
||||
{collection === "blog" ? "post" : "project"}
|
||||
</div>
|
||||
}
|
||||
<div class="text-sm uppercase text-spaghetti-brown dark:text-spaghetti-dark-yellow">
|
||||
<div class="text-sm uppercase text-accent">
|
||||
{formatDate(entry.date)}
|
||||
</div>
|
||||
</div>
|
||||
<div class="font-semibold mt-3 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">
|
||||
<div class="font-semibold mt-3 text-ink">
|
||||
{entry.title}
|
||||
</div>
|
||||
|
||||
<div class="text-sm line-clamp-2 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">
|
||||
<div class="text-sm line-clamp-2 text-ink-muted">
|
||||
{entry.summary}
|
||||
</div>
|
||||
<ul class="flex flex-wrap mt-2 gap-1">
|
||||
{entry.tags.map((tag:string) => (
|
||||
<li class="text-xs uppercase py-0.5 px-1 rounded bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20 text-spaghetti-brown/80 dark:text-spaghetti-dark-yellow">
|
||||
<li class="text-xs uppercase py-0.5 px-1 rounded bg-chip text-chip-ink">
|
||||
{tag}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current group-hover:stroke-black group-hover:dark:stroke-spaghetti-dark-yellow">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current group-hover:stroke-link">
|
||||
<line x1="5" y1="12" x2="19" y2="12" class="scale-x-0 group-hover:scale-x-100 translate-x-4 group-hover:translate-x-1 transition-all duration-300 ease-in-out" />
|
||||
<polyline points="12 5 19 12 12 19" class="translate-x-0 group-hover:translate-x-1 transition-all duration-300 ease-in-out" />
|
||||
</svg>
|
||||
|
||||
@@ -31,16 +31,16 @@ export default function Blog({ data, tags }: Props) {
|
||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-6">
|
||||
<div class="col-span-3 sm:col-span-1">
|
||||
<div class="sticky top-24">
|
||||
<div class="text-sm font-semibold uppercase mb-2 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">Filter</div>
|
||||
<div class="text-sm font-semibold uppercase mb-2 text-ink">Filter</div>
|
||||
{/* Tag Filter */}
|
||||
<div class="mb-2">
|
||||
<div class="text-xs uppercase mb-1 text-spaghetti-brown/70">Tags</div>
|
||||
<div class="text-xs uppercase mb-1 text-ink-muted">Tags</div>
|
||||
<ul class="flex flex-wrap sm:flex-col gap-1.5">
|
||||
<For each={tags}>
|
||||
{(tag) => (
|
||||
<li>
|
||||
<button onClick={() => toggleTag(tag)} class={cn("w-full px-2 py-1 rounded", "whitespace-nowrap overflow-hidden overflow-ellipsis", "flex gap-2 items-center", "bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20", "hover:bg-spaghetti-yellow/30 hover:dark:bg-spaghetti-yellow/30", "transition-colors duration-300 ease-in-out", filter().has(tag) && "text-spaghetti-brown/80 dark:text-spaghetti-dark-cream")}>
|
||||
<svg class={cn("size-5 fill-spaghetti-brown/50 dark:fill-spaghetti-brown/50", "transition-colors duration-300 ease-in-out", filter().has(tag) && "fill-spaghetti-brown dark:fill-spaghetti-brown")}>
|
||||
<button onClick={() => toggleTag(tag)} class={cn("w-full px-2 py-1 rounded text-ink", "whitespace-nowrap overflow-hidden overflow-ellipsis", "flex gap-2 items-center", "border border-transparent hover:border-edge hover:bg-wash", "transition-colors duration-300 ease-in-out", filter().has(tag) && "bg-chip text-chip-ink border-chip")}>
|
||||
<svg class={cn("size-5 fill-current opacity-60", "transition-colors duration-300 ease-in-out", filter().has(tag) && "opacity-100")}>
|
||||
<use href={`/ui.svg#square`} class={cn(!filter().has(tag) ? "block" : "hidden")} />
|
||||
<use href={`/ui.svg#square-check`} class={cn(filter().has(tag) ? "block" : "hidden")} />
|
||||
</svg>
|
||||
|
||||
@@ -7,10 +7,10 @@ function CounterButton() {
|
||||
|
||||
return (
|
||||
<div class="flex gap-4 items-center">
|
||||
<button onClick={increment} class="px-3 py-1 border border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 hover:bg-spaghetti-yellow/20 dark:hover:bg-spaghetti-yellow/20 blend text-spaghetti-brown">
|
||||
<button onClick={increment} class="px-3 py-1 border border-edge hover:bg-chip hover:text-chip-ink blend text-ink">
|
||||
Increment
|
||||
</button>
|
||||
<div class="text-spaghetti-brown">
|
||||
<div class="text-ink">
|
||||
Clicked {count()} {count() === 1 ? "time" : "times"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,34 +1,42 @@
|
||||
---
|
||||
import { SITE, LINKS } from "@consts"
|
||||
import { SITE, LINKS, RESUME } from "@consts"
|
||||
import { cn, ACTIVE_NAV_COLORS, isNavActive } from "@lib/utils"
|
||||
const { pathname } = Astro.url
|
||||
---
|
||||
|
||||
<div id="drawer" class="fixed inset-0 h-0 z-40 overflow-hidden flex flex-col items-center justify-center md:hidden bg-spaghetti-cream dark:bg-black transition-[height] duration-300 ease-in-out">
|
||||
<div id="drawer" class="fixed inset-0 h-0 z-40 overflow-hidden flex flex-col items-center justify-center md:hidden bg-page transition-[height] duration-300 ease-in-out">
|
||||
<nav class="flex flex-col items-center space-y-2">
|
||||
{
|
||||
LINKS.map((LINK) => (
|
||||
<a href={LINK.HREF} class={cn("flex items-center justify-center px-3 py-1 rounded-full", "text-current hover:text-black dark:hover:text-white", "hover:bg-spaghetti-yellow/20 dark:hover:bg-spaghetti-yellow/20", "transition-colors duration-300 ease-in-out", isNavActive(pathname, LINK.HREF) && "pointer-events-none", isNavActive(pathname, LINK.HREF) && ACTIVE_NAV_COLORS)}>
|
||||
<a href={LINK.HREF} class={cn("flex items-center justify-center px-3 py-1 rounded-full", "text-ink hover:bg-wash hover:text-link", "transition-colors duration-300 ease-in-out", isNavActive(pathname, LINK.HREF) && "pointer-events-none", isNavActive(pathname, LINK.HREF) && ACTIVE_NAV_COLORS)}>
|
||||
{LINK.TEXT}
|
||||
</a>
|
||||
))
|
||||
}
|
||||
<!-- The header pill drops its label below `sm`, so the drawer is where the
|
||||
Résumé CTA keeps its text on mobile. -->
|
||||
<a href={RESUME.HREF} target="_blank" rel="noopener noreferrer" aria-label={`${RESUME.TEXT} for ${SITE.AUTHOR}, opens in a new tab`} class="flex items-center justify-center gap-1.5 px-3 py-1 rounded-full bg-chip text-chip-ink stroke-current border border-edge hover:bg-link hover:text-page hover:border-link transition-colors duration-300">
|
||||
<svg class="size-4 shrink-0" fill="none">
|
||||
<use href={`/ui.svg#${RESUME.ICON}`}></use>
|
||||
</svg>
|
||||
<span>{RESUME.TEXT}</span>
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<div class="flex gap-1 mt-5">
|
||||
<a href="/search" aria-label={`Search blog posts and projects on ${SITE.TITLE}`} class={cn("size-9 rounded-full p-2 items-center justify-center bg-transparent hover:bg-spaghetti-yellow/20 dark:hover:bg-spaghetti-yellow/20 stroke-current hover:stroke-black hover:dark:stroke-white border border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 transition-colors duration-300 ease-in-out", isNavActive(pathname, "/search") && "pointer-events-none", isNavActive(pathname, "/search") && ACTIVE_NAV_COLORS)}>
|
||||
<a href="/search" aria-label={`Search blog posts and projects on ${SITE.TITLE}`} class={cn("size-9 rounded-full p-2 items-center justify-center bg-transparent stroke-current border border-edge hover:bg-chip hover:text-chip-ink transition-colors duration-300 ease-in-out", isNavActive(pathname, "/search") && "pointer-events-none", isNavActive(pathname, "/search") && ACTIVE_NAV_COLORS)}>
|
||||
<svg class="size-full">
|
||||
<use href="/ui.svg#search"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<a href="/rss.xml" target="_blank" aria-label={`Rss feed for ${SITE.TITLE}`} class="size-9 rounded-full p-2 items-center justify-center bg-transparent hover:bg-spaghetti-yellow/20 dark:hover:bg-spaghetti-yellow/20 stroke-current hover:stroke-black hover:dark:stroke-white border border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 transition-colors duration-300 ease-in-out">
|
||||
<a href="/rss.xml" target="_blank" aria-label={`Rss feed for ${SITE.TITLE}`} class="size-9 rounded-full p-2 items-center justify-center bg-transparent stroke-current border border-edge hover:bg-chip hover:text-chip-ink transition-colors duration-300 ease-in-out">
|
||||
<svg class="size-full">
|
||||
<use href="/ui.svg#rss"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<button id="drawer-theme-button" aria-label={`Toggle light and dark theme`} class="size-9 rounded-full p-2 items-center justify-center bg-transparent hover:bg-spaghetti-yellow/20 dark:hover:bg-spaghetti-yellow/20 stroke-current hover:stroke-black hover:dark:stroke-white border border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 transition-colors duration-300 ease-in-out">
|
||||
<button id="drawer-theme-button" aria-label={`Toggle light and dark theme`} class="size-9 rounded-full p-2 items-center justify-center bg-transparent stroke-current border border-edge hover:bg-chip hover:text-chip-ink transition-colors duration-300 ease-in-out">
|
||||
<svg class="block dark:hidden size-full">
|
||||
<use href="/ui.svg#sun"></use>
|
||||
</svg>
|
||||
|
||||
+12
-12
@@ -9,17 +9,17 @@ import { getSystemStatus } from "@lib/status"
|
||||
const statusSnapshot = await getSystemStatus()
|
||||
---
|
||||
|
||||
<footer class="relative bg-white dark:bg-black">
|
||||
<footer class="relative bg-page">
|
||||
<div class="animate">
|
||||
<section class="py-5">
|
||||
<Container size="md">
|
||||
<div class="flex items-center justify-center sm:justify-end">
|
||||
<button id="back-to-top" aria-label="Back to top of page" class="group flex w-fit p-1.5 gap-1.5 text-sm items-center border rounded hover:bg-black/5 hover:dark:bg-white/10 border-black/15 dark:border-white/20 transition-colors duration-300 ease-in-out">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current group-hover:stroke-black group-hover:dark:stroke-white rotate-90">
|
||||
<button id="back-to-top" aria-label="Back to top of page" class="group flex w-fit p-1.5 gap-1.5 text-sm items-center border rounded border-edge hover:bg-chip hover:text-chip-ink transition-colors duration-300 ease-in-out">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current rotate-90">
|
||||
<line x1="19" y1="12" x2="5" y2="12" class="scale-x-0 group-hover:scale-x-100 translate-x-3 group-hover:translate-x-0 transition-all duration-300 ease-in-out" />
|
||||
<polyline points="12 19 5 12 12 5" class="translate-x-1 group-hover:translate-x-0 transition-all duration-300 ease-in-out" />
|
||||
</svg>
|
||||
<div class="w-full group-hover:text-black group-hover:dark:text-white transition-colors duration-300 ease-in-out">
|
||||
<div class="w-full transition-colors duration-300 ease-in-out">
|
||||
Back to top
|
||||
</div>
|
||||
</button>
|
||||
@@ -27,11 +27,11 @@ const statusSnapshot = await getSystemStatus()
|
||||
</Container>
|
||||
</section>
|
||||
|
||||
<section class=" py-5 overflow-hidden whitespace-nowrap border-t border-black/10 dark:border-white/25">
|
||||
<section class=" py-5 overflow-hidden whitespace-nowrap border-t border-line">
|
||||
<Container size="md">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
||||
<div class="flex flex-col items-center sm:items-start">
|
||||
<a href="/" class="flex gap-1 w-fit font-semibold text-current hover:text-black dark:hover:text-white transition-colors duration-300 ease-in-out">
|
||||
<a href="/" class="flex gap-1 w-fit font-semibold text-ink transition-colors duration-300 ease-in-out hover:text-link">
|
||||
<img src="/images/logo.png" alt="Logo" class="size-6" />
|
||||
{SITE.TITLE}
|
||||
</a>
|
||||
@@ -41,19 +41,19 @@ const statusSnapshot = await getSystemStatus()
|
||||
</Container>
|
||||
</section>
|
||||
|
||||
<section class=" py-5 overflow-hidden whitespace-nowrap border-t border-black/10 dark:border-white/25">
|
||||
<section class=" py-5 overflow-hidden whitespace-nowrap border-t border-line">
|
||||
<Container size="md">
|
||||
<div class="h-full grid grid-cols-1 sm:grid-cols-2 gap-3">
|
||||
<div class="order-2 sm:order-1 flex flex-col items-center justify-center sm:items-start">
|
||||
<div class="legal">
|
||||
<a href="/legal/terms-of-service" class="text-spaghetti-red hover:text-spaghetti-brown dark:hover:text-spaghetti-brown transition-colors duration-300 ease-in-out">
|
||||
<a href="/legal/terms-of-service" class="text-link hover:text-link-hover transition-colors duration-300 ease-in-out">
|
||||
Terms
|
||||
</a> |
|
||||
<a href="/legal/privacy-policy" class="text-spaghetti-red hover:text-spaghetti-brown dark:hover:text-spaghetti-brown transition-colors duration-300 ease-in-out">
|
||||
<a href="/legal/privacy-policy" class="text-link hover:text-link-hover transition-colors duration-300 ease-in-out">
|
||||
Privacy
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-sm mt-2 text-spaghetti-brown">
|
||||
<div class="text-sm mt-2 text-ink-muted">
|
||||
© {new Date().getFullYear()} | All rights reserved
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,9 +66,9 @@ const statusSnapshot = await getSystemStatus()
|
||||
href={SOCIAL.HREF}
|
||||
target="_blank"
|
||||
aria-label={`${SITE.TITLE} on ${SOCIAL.NAME}`}
|
||||
class="group size-10 rounded-full p-2 items-center justify-center hover:bg-black/5 dark:hover:bg-white/20 blend"
|
||||
class="group size-10 rounded-full p-2 items-center justify-center hover:bg-chip blend"
|
||||
>
|
||||
<svg class="size-full fill-current group-hover:fill-black group-hover:dark:fill-white blend">
|
||||
<svg class="size-full fill-current group-hover:fill-chip-ink blend">
|
||||
<use href={`/social.svg#${SOCIAL.ICON}`} />
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
+22
-14
@@ -6,10 +6,14 @@ const { pathname } = Astro.url
|
||||
---
|
||||
|
||||
<header id="header" class="fixed top-0 w-full h-16 z-50 ">
|
||||
<Container size="md">
|
||||
<!-- `lg`, not `md`: the header row has to fit the brand, five nav pills and the icon cluster
|
||||
on one line. In a 768px container the Résumé pill pushed the cluster onto the nav's last
|
||||
item (measured 1px of clearance at every width >= 800). The content column below stays
|
||||
`md`; only the header bar is wider. -->
|
||||
<Container size="lg">
|
||||
<div class="relative h-full w-full">
|
||||
<div class="absolute left-0 top-1/2 -translate-y-1/2 flex gap-1 font-semibold">
|
||||
<a href="/" class="flex gap-1 text-current hover:text-spaghetti-brown dark:hover:text-spaghetti-brown transition-colors duration-300 ease-in-out">
|
||||
<a href="/" class="flex gap-1 text-ink transition-colors duration-300 ease-in-out hover:text-link">
|
||||
<img src='/images/logo.png' alt="Logo" class="size-6" />
|
||||
<div>
|
||||
{SITE.TITLE}
|
||||
@@ -21,7 +25,7 @@ const { pathname } = Astro.url
|
||||
<nav class="hidden md:flex items-center justify-center text-sm gap-1">
|
||||
{
|
||||
LINKS.map((LINK) => (
|
||||
<a href={LINK.HREF} class={cn("h-8 rounded-full px-3 text-current", "flex items-center justify-center", "transition-colors duration-300 ease-in-out", isNavActive(pathname, LINK.HREF) ? ACTIVE_NAV_COLORS : "hover:bg-spaghetti-red/5 dark:hover:bg-spaghetti-red/20 hover:text-black dark:hover:text-white")}>
|
||||
<a href={LINK.HREF} class={cn("h-8 rounded-full px-3 text-ink", "flex items-center justify-center", "transition-colors duration-300 ease-in-out", isNavActive(pathname, LINK.HREF) ? ACTIVE_NAV_COLORS : "hover:bg-wash hover:text-link")}>
|
||||
{LINK.TEXT}
|
||||
</a>
|
||||
))
|
||||
@@ -30,26 +34,19 @@ const { pathname } = Astro.url
|
||||
</div>
|
||||
|
||||
<div class="buttons absolute right-0 top-1/2 -translate-y-1/2 flex gap-1">
|
||||
<a href={RESUME.HREF} target="_blank" rel="noopener noreferrer" aria-label={`${RESUME.TEXT} for ${SITE.AUTHOR}, opens in a new tab`} class={cn("flex shrink-0 items-center justify-center gap-1.5 h-9 rounded-full pl-2.5 pr-3 text-sm font-semibold", "bg-spaghetti-yellow/70 dark:bg-spaghetti-yellow/15", "stroke-current text-black dark:text-white", "border border-spaghetti-yellow dark:border-spaghetti-yellow/50", "hover:bg-spaghetti-yellow dark:hover:bg-spaghetti-yellow/30", "transition-colors duration-300 ease-in-out")}>
|
||||
<svg class="size-4 shrink-0">
|
||||
<use href={`/ui.svg#${RESUME.ICON}`}></use>
|
||||
</svg>
|
||||
<span>{RESUME.TEXT}</span>
|
||||
</a>
|
||||
|
||||
<a href="/search" aria-label={`Search blog posts and projects on ${SITE.TITLE}`} class={cn("hidden md:flex", "size-9 rounded-full p-2 items-center justify-center", "bg-transparent hover:bg-spaghetti-yellow dark:hover:bg-spaghetti-yellow", "stroke-current hover:stroke-black hover:dark:stroke-white", "border border-black/10 dark:border-white/25", "transition-colors duration-300 ease-in-out", isNavActive(pathname, "/search") && "pointer-events-none", isNavActive(pathname, "/search") && ACTIVE_NAV_COLORS)}>
|
||||
<a href="/search" aria-label={`Search blog posts and projects on ${SITE.TITLE}`} class={cn("hidden md:flex", "size-9 rounded-full p-2 items-center justify-center", "bg-transparent stroke-current", "border border-edge", "hover:bg-chip hover:text-chip-ink", "transition-colors duration-300 ease-in-out", isNavActive(pathname, "/search") && "pointer-events-none", isNavActive(pathname, "/search") && ACTIVE_NAV_COLORS)}>
|
||||
<svg class="size-full">
|
||||
<use href="/ui.svg#search"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<a href="/rss.xml" target="_blank" aria-label={`Rss feed for ${SITE.TITLE}`} class={cn("hidden md:flex", "size-9 rounded-full p-2 items-center justify-center", "bg-transparent hover:bg-spaghetti-yellow dark:hover:bg-spaghetti-yellow", "stroke-current hover:stroke-black hover:dark:stroke-white", "border border-black/10 dark:border-white/25", "transition-colors duration-300 ease-in-out")}>
|
||||
<a href="/rss.xml" target="_blank" aria-label={`Rss feed for ${SITE.TITLE}`} class={cn("hidden md:flex", "size-9 rounded-full p-2 items-center justify-center", "bg-transparent stroke-current", "border border-edge", "hover:bg-chip hover:text-chip-ink", "transition-colors duration-300 ease-in-out")}>
|
||||
<svg class="size-full">
|
||||
<use href="/ui.svg#rss"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<button id="header-theme-button" aria-label={`Toggle light and dark theme`} class={cn("hidden md:flex", "size-9 rounded-full p-2 items-center justify-center", "bg-transparent hover:bg-spaghetti-yellow dark:hover:bg-spaghetti-yellow", "stroke-current hover:stroke-black hover:dark:stroke-white", "border border-black/10 dark:border-white/25", "transition-colors duration-300 ease-in-out")}>
|
||||
<button id="header-theme-button" aria-label={`Toggle light and dark theme`} class={cn("hidden md:flex", "size-9 rounded-full p-2 items-center justify-center", "bg-transparent stroke-current", "border border-edge", "hover:bg-chip hover:text-chip-ink", "transition-colors duration-300 ease-in-out")}>
|
||||
<svg class="size-full block dark:hidden">
|
||||
<use href="/ui.svg#sun"></use>
|
||||
</svg>
|
||||
@@ -58,7 +55,18 @@ const { pathname } = Astro.url
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<button id="header-drawer-button" aria-label={`Toggle drawer open and closed`} class={cn("flex md:hidden", "size-9 rounded-full p-2 items-center justify-center", ACTIVE_NAV_COLORS, "stroke-current hover:stroke-black", "border border-black/10 dark:border-white/25", "transition-colors duration-300 ease-in-out")}>
|
||||
<!-- Résumé sits right of the theme toggle: the pill is the widest item in the
|
||||
cluster, so leading with it pushed the nav pills together. Below `lg` it
|
||||
collapses to a 36px icon-only circle to leave the nav room; the drawer
|
||||
carries the labelled link. -->
|
||||
<a href={RESUME.HREF} target="_blank" rel="noopener noreferrer" aria-label={`${RESUME.TEXT} for ${SITE.AUTHOR}, opens in a new tab`} class={cn("flex shrink-0 items-center justify-center gap-1.5 h-9 w-9 rounded-full lg:w-auto lg:pl-2.5 lg:pr-3 text-sm font-semibold", "bg-chip text-chip-ink stroke-current", "border border-edge", "hover:bg-link hover:text-page hover:border-link", "transition-colors duration-300 ease-in-out")}>
|
||||
<svg class="size-5 shrink-0 lg:size-4" fill="none">
|
||||
<use href={`/ui.svg#${RESUME.ICON}`}></use>
|
||||
</svg>
|
||||
<span class="hidden lg:inline">{RESUME.TEXT}</span>
|
||||
</a>
|
||||
|
||||
<button id="header-drawer-button" aria-label={`Toggle drawer open and closed`} class={cn("flex md:hidden", "size-9 rounded-full p-2 items-center justify-center", ACTIVE_NAV_COLORS, "stroke-current", "border border-edge", "transition-colors duration-300 ease-in-out")}>
|
||||
<svg id="drawer-open" class="size-full">
|
||||
<use href="/ui.svg#menu"></use>
|
||||
</svg>
|
||||
|
||||
@@ -29,13 +29,13 @@ export default function Projects({ data, tags }: Props) {
|
||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-6">
|
||||
<div class="col-span-3 sm:col-span-1">
|
||||
<div class="sticky top-24">
|
||||
<div class="text-sm font-semibold uppercase mb-2 text-spaghetti-brown dark:text-spaghetti-dark-cream">Filter</div>
|
||||
<div class="text-sm font-semibold uppercase mb-2 text-ink">Filter</div>
|
||||
<ul class="flex flex-wrap sm:flex-col gap-1.5">
|
||||
<For each={tags}>
|
||||
{(tag) => (
|
||||
<li>
|
||||
<button onClick={() => toggleTag(tag)} class={cn("w-full px-2 py-1 rounded", "whitespace-nowrap overflow-hidden overflow-ellipsis", "flex gap-2 items-center", "bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20", "hover:bg-spaghetti-yellow/30 hover:dark:bg-spaghetti-yellow/30", "transition-colors duration-300 ease-in-out", filter().has(tag) && "text-spaghetti-brown dark:text-spaghetti-dark-cream")}>
|
||||
<svg class={cn("size-5 fill-spaghetti-brown/50 dark:fill-spaghetti-brown/50", "transition-colors duration-300 ease-in-out", filter().has(tag) && "fill-spaghetti-brown dark:fill-spaghetti-brown")}>
|
||||
<button onClick={() => toggleTag(tag)} class={cn("w-full px-2 py-1 rounded text-ink", "whitespace-nowrap overflow-hidden overflow-ellipsis", "flex gap-2 items-center", "border border-transparent hover:border-edge hover:bg-wash", "transition-colors duration-300 ease-in-out", filter().has(tag) && "bg-chip text-chip-ink border-chip")}>
|
||||
<svg class={cn("size-5 fill-current opacity-60", "transition-colors duration-300 ease-in-out", filter().has(tag) && "opacity-100")}>
|
||||
<use href={`/ui.svg#square`} class={cn(!filter().has(tag) ? "block" : "hidden")} />
|
||||
<use href={`/ui.svg#square-check`} class={cn(filter().has(tag) ? "block" : "hidden")} />
|
||||
</svg>
|
||||
|
||||
@@ -134,16 +134,16 @@ export default function Search(props: Props) {
|
||||
autocomplete="off"
|
||||
spellcheck={false}
|
||||
placeholder="What are you looking for?"
|
||||
class="w-full px-2.5 py-1.5 pl-10 rounded outline-none text-spaghetti-brown bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20 border border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 focus:border-spaghetti-red focus:dark:border-spaghetti-red"
|
||||
class="w-full px-2.5 py-1.5 pl-10 rounded outline-none text-ink bg-chip border border-edge focus:border-link"
|
||||
/>
|
||||
<svg class="absolute size-6 left-1.5 top-1/2 -translate-y-1/2 stroke-current">
|
||||
<use href={`/ui.svg#search`}/>
|
||||
</svg>
|
||||
</form>
|
||||
{error() && <div class="mt-4 text-red-500">{error()}</div>}
|
||||
{error() && <div class="mt-4 text-status-down">{error()}</div>}
|
||||
{loading() && <div class="mt-4">Searching...<span class="ml-2 animate-spin">⏳</span></div>}
|
||||
{!loading() && !error() && !searched() && query().trim().length > 0 && query().trim().length < MIN_QUERY_LENGTH && (
|
||||
<div class="mt-4 text-sm uppercase text-spaghetti-brown/70 dark:text-spaghetti-dark-cream/70">
|
||||
<div class="mt-4 text-sm uppercase text-ink-muted">
|
||||
Keep typing — search needs at least {MIN_QUERY_LENGTH} characters
|
||||
</div>
|
||||
)}
|
||||
@@ -152,7 +152,7 @@ export default function Search(props: Props) {
|
||||
<div class="text-sm uppercase mb-2">
|
||||
No results for {`'${query()}'`}
|
||||
</div>
|
||||
<div class="text-sm text-spaghetti-brown/70 dark:text-spaghetti-dark-cream/70">
|
||||
<div class="text-sm text-ink-muted">
|
||||
Try a shorter or more general keyword — titles, tags and summaries are all searchable.
|
||||
</div>
|
||||
</div>
|
||||
@@ -164,7 +164,7 @@ export default function Search(props: Props) {
|
||||
</div>
|
||||
<div class="flex flex-col gap-6 mt-4">
|
||||
{results().posts.length > 0 && (
|
||||
<div class="border-t border-spaghetti-yellow/30 pt-4">
|
||||
<div class="border-t border-line pt-4">
|
||||
<div class="text-sm font-bold mb-2">Blog Posts</div>
|
||||
<ul class="flex flex-col gap-3">
|
||||
{results().posts.map(result => (
|
||||
@@ -176,7 +176,7 @@ export default function Search(props: Props) {
|
||||
</div>
|
||||
)}
|
||||
{results().projects.length > 0 && (
|
||||
<div class="border-t border-spaghetti-yellow/30 pt-4">
|
||||
<div class="border-t border-line pt-4">
|
||||
<div class="text-sm font-bold mb-2">Projects</div>
|
||||
<ul class="flex flex-col gap-3">
|
||||
{results().projects.map(result => (
|
||||
|
||||
@@ -8,11 +8,11 @@ type Props = {
|
||||
const { text, icon, href } = Astro.props
|
||||
---
|
||||
|
||||
<a href={href} target="_blank" class="w-fit px-3 py-2 group rounded border flex gap-2 items-center border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 hover:bg-spaghetti-yellow/20 hover:dark:bg-spaghetti-yellow/20 blend">
|
||||
<a href={href} target="_blank" class="w-fit px-3 py-2 group rounded border flex gap-2 items-center border-edge hover:bg-chip blend">
|
||||
<svg height={20} width={20}>
|
||||
<use href={`/stack.svg#${icon}`}></use>
|
||||
</svg>
|
||||
<span class="text-sm capitalize text-spaghetti-brown group-hover:text-spaghetti-brown blend">
|
||||
<span class="text-sm capitalize text-ink group-hover:text-chip-ink blend">
|
||||
{text}
|
||||
</span>
|
||||
</a>
|
||||
@@ -35,7 +35,7 @@ const detailsText = details(snapshot)
|
||||
href={snapshot.statusPageUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="status group flex gap-2 justify-center sm:justify-end items-center hover:text-black dark:hover:text-white"
|
||||
class="status group flex gap-2 justify-center sm:justify-end items-center text-ink-muted hover:text-ink"
|
||||
data-status-root
|
||||
data-status={state}
|
||||
data-refresh-ms={REFRESH_MS}
|
||||
@@ -58,37 +58,37 @@ const detailsText = details(snapshot)
|
||||
}
|
||||
|
||||
.core {
|
||||
background-color: #22c55e;
|
||||
background-color: var(--color-status-ok);
|
||||
transition: background-color 300ms ease-in-out;
|
||||
}
|
||||
|
||||
.ping {
|
||||
background-color: #86efac;
|
||||
background-color: var(--color-status-ok-ping);
|
||||
}
|
||||
|
||||
[data-status="degraded"] .core {
|
||||
background-color: #f59e0b;
|
||||
background-color: var(--color-status-warn);
|
||||
}
|
||||
[data-status="degraded"] .ping {
|
||||
background-color: #fcd34d;
|
||||
background-color: var(--color-status-warn-ping);
|
||||
}
|
||||
|
||||
[data-status="down"] .core {
|
||||
background-color: var(--color-marinara);
|
||||
background-color: var(--color-status-down);
|
||||
}
|
||||
[data-status="down"] .ping {
|
||||
background-color: var(--color-spaghetti-dark-red);
|
||||
background-color: var(--color-status-down-ping);
|
||||
}
|
||||
|
||||
[data-status="maintenance"] .core {
|
||||
background-color: #4962bd;
|
||||
background-color: var(--color-status-maint);
|
||||
}
|
||||
[data-status="maintenance"] .ping {
|
||||
background-color: #93a5e0;
|
||||
background-color: var(--color-status-maint-ping);
|
||||
}
|
||||
|
||||
[data-status="unknown"] .core {
|
||||
background-color: #9ca3af;
|
||||
background-color: var(--color-status-unknown);
|
||||
}
|
||||
[data-status="unknown"] .ping {
|
||||
display: none;
|
||||
|
||||
@@ -31,7 +31,21 @@ export const SEARCH: Page = {
|
||||
DESCRIPTION: "Search all posts and projects by keyword.",
|
||||
}
|
||||
|
||||
// Docs (external, the Wiki.js instance hosted at docs.spaghet.io). Declared
|
||||
// before LINKS because the Docs nav entry points at DOCS.HREF, and exported so
|
||||
// both navs can label their links. It is a Cta (like RESUME) because it carries
|
||||
// an icon; the nav entry itself is a plain Links row so it moves with the
|
||||
// desktop nav / mobile drawer switch for free.
|
||||
export const DOCS: Cta = {
|
||||
TEXT: "Docs",
|
||||
HREF: "https://docs.spaghet.io",
|
||||
ICON: "book-open",
|
||||
}
|
||||
|
||||
// Links
|
||||
//
|
||||
// Entries with EXTERNAL leave the site: they can never match Astro.url, so the
|
||||
// renderers must skip the active-pill styling and add rel="noopener noreferrer".
|
||||
export const LINKS: Links = [
|
||||
{
|
||||
TEXT: "Home",
|
||||
@@ -49,6 +63,11 @@ export const LINKS: Links = [
|
||||
TEXT: "Projects",
|
||||
HREF: "/projects",
|
||||
},
|
||||
{
|
||||
TEXT: DOCS.TEXT,
|
||||
HREF: DOCS.HREF,
|
||||
EXTERNAL: true,
|
||||
},
|
||||
]
|
||||
|
||||
// Résumé (external, hosted at resume.spaghet.io). Rendered as its own pill in
|
||||
|
||||
@@ -26,44 +26,44 @@ if (allEntries.length > 0) {
|
||||
---
|
||||
|
||||
<div>
|
||||
<article class="text-spaghetti-brown/80 dark:text-spaghetti-dark-cream" set:html={content} />
|
||||
<article class="text-ink" set:html={content} />
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
{prevEntry && (
|
||||
<a href={`/${collection}/${prevEntry.id}`} class="group p-4 gap-3 flex items-center border rounded-lg hover:bg-black/5 hover:dark:bg-spaghetti-cream/10 border-black/15 dark:border-spaghetti-dark-cream/20 blend">
|
||||
<div class="order-2 w-full h-full group-hover:text-spaghetti-brown/80 group-hover:dark:text-spaghetti-dark-cream blend">
|
||||
<a href={`/${collection}/${prevEntry.id}`} class="group p-4 gap-3 flex items-center border rounded-lg bg-surface border-edge hover:bg-wash blend">
|
||||
<div class="order-2 w-full h-full group-hover:text-link blend">
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<div class="text-sm uppercase">
|
||||
Prev
|
||||
</div>
|
||||
</div>
|
||||
<div class="font-semibold mt-3 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">
|
||||
<div class="font-semibold mt-3 text-ink">
|
||||
{prevEntry.title}
|
||||
</div>
|
||||
</div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="order-1 stroke-current group-hover:stroke-black group-hover:dark:stroke-white rotate-180">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="order-1 stroke-current rotate-180">
|
||||
<line x1="5" y1="12" x2="19" y2="12" class="scale-x-0 group-hover:scale-x-100 translate-x-4 group-hover:translate-x-1 transition-all duration-300 ease-in-out" />
|
||||
<polyline points="12 5 19 12 12 19" class="translate-x-0 group-hover:translate-x-1 transition-all duration-300 ease-in-out" />
|
||||
</svg>
|
||||
</a>
|
||||
)}
|
||||
{nextEntry && (
|
||||
<a href={`/${collection}/${nextEntry.id}`} class="group p-4 gap-3 flex items-center border rounded-lg hover:bg-black/5 hover:dark:bg-spaghetti-cream/10 border-black/15 dark:border-spaghetti-dark-cream/20 transition-colors duration-300 ease-in-out blend dark:text-spaghetti-dark-cream">
|
||||
<div class="w-full h-full text-right group-hover:text-spaghetti-brown/80 group-hover:dark:text-spaghetti-dark-cream blend">
|
||||
<a href={`/${collection}/${nextEntry.id}`} class="group p-4 gap-3 flex items-center border rounded-lg bg-surface border-edge hover:bg-wash transition-colors duration-300 ease-in-out blend">
|
||||
<div class="w-full h-full text-right group-hover:text-link blend">
|
||||
<div class="text-sm uppercase">
|
||||
Next
|
||||
</div>
|
||||
<div class="font-semibold mt-3 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">
|
||||
<div class="font-semibold mt-3 text-ink">
|
||||
{nextEntry.title}
|
||||
</div>
|
||||
</div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current group-hover:stroke-black group-hover:dark:stroke-white blend">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current blend">
|
||||
<line x1="5" y1="12" x2="19" y2="12" class="scale-x-0 group-hover:scale-x-100 translate-x-4 group-hover:translate-x-1 transition-all duration-300 ease-in-out" />
|
||||
<polyline points="12 5 19 12 12 19" class="translate-x-0 group-hover:translate-x-1 transition-all duration-300 ease-in-out" />
|
||||
</svg>
|
||||
</a>
|
||||
)}
|
||||
{!prevEntry && !nextEntry && (
|
||||
<div class="col-span-2 text-center py-8 text-gray-500 blend">
|
||||
<div class="col-span-2 text-center py-8 text-ink-muted blend">
|
||||
No adjacent articles available
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -18,12 +18,12 @@ const body = entry.content || ""
|
||||
---
|
||||
|
||||
<div>
|
||||
<a href={`/${collection}`} class="group w-fit p-1.5 gap-1.5 text-sm flex items-center border text-spaghetti-brown/100 dark:text-spaghetti-dark-yellow rounded hover:bg-spaghetti-brown/5 hover:dark:bg-spaghetti-red/10 border-spaghetti-brown/15 dark:border-spaghetti-dark-cream/20 transition-colors duration-300 ease-in-out">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current group-hover:stroke-spaghetti-brown group-hover:dark:stroke-spaghetti-dark-yellow">
|
||||
<a href={`/${collection}`} class="group w-fit p-1.5 gap-1.5 text-sm flex items-center border text-ink rounded border-edge hover:bg-chip hover:text-chip-ink transition-colors duration-300 ease-in-out">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current">
|
||||
<line x1="19" y1="12" x2="5" y2="12" class="scale-x-0 group-hover:scale-x-100 translate-x-3 group-hover:translate-x-0 transition-all duration-300 ease-in-out" />
|
||||
<polyline points="12 19 5 12 12 5" class="translate-x-1 group-hover:translate-x-0 transition-all duration-300 ease-in-out" />
|
||||
</svg>
|
||||
<div class="w-full group-hover:text-spaghetti-brown group-hover:dark:text-spaghetti-dark-yellow transition-colors duration-300 ease-in-out">
|
||||
<div class="w-full transition-colors duration-300 ease-in-out">
|
||||
Back to {`${collection.charAt(0).toUpperCase()}${collection.slice(1)}`}
|
||||
</div>
|
||||
</a>
|
||||
@@ -41,30 +41,30 @@ const body = entry.content || ""
|
||||
{readingTime(body)}
|
||||
</div>
|
||||
</div>
|
||||
<h1 class="text-3xl font-semibold text-spaghetti-brown/100 dark:text-spaghetti-dark-cream mt-2">
|
||||
<h1 class="text-3xl font-semibold text-ink mt-2">
|
||||
{title}
|
||||
</h1>
|
||||
<div class="mt-1 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">
|
||||
<div class="mt-1 text-ink-muted">
|
||||
{summary}
|
||||
</div>
|
||||
{(demoUrl || repoUrl) &&
|
||||
<div class="mt-4 flex flex-wrap gap-2">
|
||||
{demoUrl &&
|
||||
<a href={demoUrl} target="_blank" class="group flex gap-2 items-center px-3 py-1.5 truncate rounded text-xs md:text-sm lg:text-base border border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 hover:bg-spaghetti-yellow/20 hover:dark:bg-spaghetti-yellow/20 blend text-spaghetti-brown dark:text-spaghetti-brown">
|
||||
<a href={demoUrl} target="_blank" class="group flex gap-2 items-center px-3 py-1.5 truncate rounded text-xs md:text-sm lg:text-base border border-edge hover:bg-chip blend text-ink group-hover:text-chip-ink">
|
||||
<svg class="size-4">
|
||||
<use href="/ui.svg#globe" class="fill-current group-hover:fill-black group-hover:dark:fill-white blend"/>
|
||||
<use href="/ui.svg#globe" class="fill-current blend"/>
|
||||
</svg>
|
||||
<span class="text-current group-hover:text-black group-hover:dark:text-white blend">
|
||||
<span class="text-current blend">
|
||||
See Demo
|
||||
</span>
|
||||
</a>
|
||||
}
|
||||
{repoUrl &&
|
||||
<a href={repoUrl} target="_blank" class="group flex gap-2 items-center px-3 py-1.5 truncate rounded text-xs md:text-sm lg:text-base border border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 hover:bg-spaghetti-yellow/20 hover:dark:bg-spaghetti-yellow/20 blend text-spaghetti-brown dark:text-spaghetti-brown">
|
||||
<a href={repoUrl} target="_blank" class="group flex gap-2 items-center px-3 py-1.5 truncate rounded text-xs md:text-sm lg:text-base border border-edge hover:bg-chip blend text-ink group-hover:text-chip-ink">
|
||||
<svg class="size-4">
|
||||
<use href="/ui.svg#link" class="fill-current group-hover:fill-black group-hover:dark:fill-white blend"/>
|
||||
<use href="/ui.svg#link" class="fill-current blend"/>
|
||||
</svg>
|
||||
<span class="text-current group-hover:text-black group-hover:dark:text-white blend">
|
||||
<span class="text-current blend">
|
||||
See Repository
|
||||
</span>
|
||||
</a>
|
||||
|
||||
+4
-5
@@ -9,12 +9,11 @@ export function cn(...inputs: ClassValue[]) {
|
||||
* Colors for the active (current-page) nav pill, shared by Header.astro and
|
||||
* Drawer.astro so the four copies cannot drift apart again.
|
||||
*
|
||||
* `text-black` is deliberate in both modes: global.css declares unlayered
|
||||
* `.text-spaghetti-brown` / `.dark .text-spaghetti-brown` overrides, and
|
||||
* unlayered CSS outranks every Tailwind layer, so a `dark:text-spaghetti-brown`
|
||||
* class on a `dark:bg-spaghetti-cream` pill resolves to cream-on-cream (1.1:1).
|
||||
* No `dark:` variants: `chip` / `chip-ink` are re-declared under `html.dark` in
|
||||
* src/styles/global.css, so the same classes give brown-on-noodle in light mode
|
||||
* and espresso-on-charred-yellow in dark mode.
|
||||
*/
|
||||
export const ACTIVE_NAV_COLORS = "bg-spaghetti-red dark:bg-spaghetti-cream text-black"
|
||||
export const ACTIVE_NAV_COLORS = "bg-chip text-chip-ink"
|
||||
|
||||
/**
|
||||
* Whether a nav link is the active one: exact match, or the first path section
|
||||
|
||||
+29
-23
@@ -54,7 +54,7 @@ const stack = [
|
||||
</div>
|
||||
|
||||
<!-- Dark Theme: Stars -->
|
||||
<div class='absolute inset-0 bg-black hidden dark:block'>
|
||||
<div class='absolute inset-0 bg-page hidden dark:block'>
|
||||
<div id='stars1' class='fixed inset-0'></div>
|
||||
<div id='stars2' class='fixed inset-0'></div>
|
||||
<div id='stars3' class='fixed inset-0'></div>
|
||||
@@ -73,16 +73,22 @@ const stack = [
|
||||
<!-- HERO -->
|
||||
<section class="relative h-screen w-full">
|
||||
<div id="planetcont" class='animate absolute inset-0 top-1/4 overflow-hidden'>
|
||||
<div id="crescent" class='absolute top-0 left-1/2 -translate-x-1/2 w-[250vw] min-h-[100vh] aspect-square rounded-full p-[1px] bg-gradient-to-b from-black/25 dark:from-white/75 from-0% to-transparent to-5%'>
|
||||
<div id="planet" class='w-full h-full bg-white dark:bg-black rounded-full p-[1px] overflow-hidden flex justify-center'>
|
||||
<div id="blur" class='w-full h-20 rounded-full bg-neutral-900/25 dark:bg-white/25 blur-3xl'/>
|
||||
<div id="crescent" class='absolute top-0 left-1/2 -translate-x-1/2 w-[250vw] min-h-[100vh] aspect-square rounded-full p-[1px] bg-gradient-to-b from-ink/25 dark:from-ink/75 from-0% to-transparent to-5%'>
|
||||
<div id="planet" class='w-full h-full bg-surface rounded-full p-[1px] overflow-hidden flex justify-center'>
|
||||
<div id="blur" class='w-full h-20 rounded-full bg-ink/25 blur-3xl'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- The planet's `surface` fill (white in light mode) reaches the bottom of the hero, so its
|
||||
shared edge with the `page`-coloured About section below reads as a hard line at 100vh.
|
||||
This fades the last of the hero into the page colour. Both ends are theme tokens, so it
|
||||
follows the light/dark flip with no `dark:` variant. It comes after #planetcont so it
|
||||
paints over it, and is click-through so the CTAs stay usable. -->
|
||||
<div aria-hidden="true" class="pointer-events-none absolute inset-x-0 bottom-0 h-40 bg-gradient-to-b from-page/0 from-25% to-page"></div>
|
||||
<div class="animate absolute h-full w-full flex items-center justify-center">
|
||||
<div class='relative w-full h-full flex items-center justify-center text-spaghetti-brown/100 dark:text-spaghetti-dark-cream'>
|
||||
<div class='relative w-full h-full flex items-center justify-center text-ink'>
|
||||
<div class='p-5 text-center'>
|
||||
<img src='/images/profile.jpg' alt="Quinn Marvin" class="rounded-full w-32 h-32 mx-auto mb-4 border-4 border-spaghetti-brown dark:border-spaghetti-dark-cream" />
|
||||
<img src='/images/profile.jpg' alt="Quinn Marvin" class="rounded-full w-32 h-32 mx-auto mb-4 border-4 border-edge" />
|
||||
<p class='animated text-lg md:text-xl lg:text-2xl font-semibold opacity-75'>
|
||||
Hello, I am Quinn Marvin
|
||||
</p>
|
||||
@@ -99,10 +105,10 @@ const stack = [
|
||||
258 TB of storage, 81 services, and AI that runs in my own house
|
||||
</p>
|
||||
<div id="ctaButtons" class='animated flex flex-wrap gap-4 justify-center mt-5'>
|
||||
<a href='/blog' class='py-2 px-4 rounded truncate text-xs md:text-sm lg:text-base bg-spaghetti-red dark:bg-spaghetti-red dark:text-spaghetti-brown hover:opacity-75 blend'>
|
||||
<a href='/blog' class='py-2 px-4 rounded truncate text-xs md:text-sm lg:text-base bg-link text-page hover:bg-link-hover blend'>
|
||||
Read my blog
|
||||
</a>
|
||||
<a href='/work' class='py-2 px-4 truncate rounded text-xs md:text-sm lg:text-base border border-spaghetti-yellow/50 dark:border-spaghetti-yellow/50 hover:bg-spaghetti-yellow/20 hover:dark:bg-spaghetti-yellow/20 blend dark:text-spaghetti-cream'>
|
||||
<a href='/work' class='py-2 px-4 truncate rounded text-xs md:text-sm lg:text-base border border-edge text-ink hover:bg-chip hover:text-chip-ink blend'>
|
||||
View my work
|
||||
</a>
|
||||
</div>
|
||||
@@ -111,12 +117,12 @@ const stack = [
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="relative bg-white dark:bg-black dark:text-spaghetti-brown">
|
||||
<div class="relative bg-page text-ink">
|
||||
<div class="mx-auto max-w-screen-sm p-5 space-y-24 pb-16">
|
||||
|
||||
<!-- About Section -->
|
||||
<section class="animate">
|
||||
<article class="text-spaghetti-brown/100 dark:text-spaghetti-cream">
|
||||
<article class="text-ink">
|
||||
<p>Hello! I'm Quinn Marvin, a passionate CEO/Creator/Innovator with an unrelenting love for spaghetti, noodles, and all things tech.</p>
|
||||
<p>With 10+ years of experience building high-performing engineering teams and driving innovation in dynamic environments, I combine deep technical expertise with exceptional emotional intelligence and a human-centered leadership approach.</p>
|
||||
<p>I specialize in IT Service Management (ITSM), IT Operations Management (ITOM), and IT Asset Management (ITAM), positioning myself as a trusted advisor to enterprise clients.</p>
|
||||
@@ -131,11 +137,11 @@ const stack = [
|
||||
<section class="animate">
|
||||
<div class="space-y-4">
|
||||
<div class="flex justify-between">
|
||||
<p class="font-semibold text-spaghetti-brown dark:text-spaghetti-cream">
|
||||
<p class="font-semibold text-ink">
|
||||
Recent posts
|
||||
</p>
|
||||
<a href="/blog" class="w-fit col-span-3 group flex gap-1 items-center underline decoration-[.5px] decoration-black/25 dark:decoration-white/50 hover:decoration-black dark:hover:decoration-white text-black dark:text-white underline-offset-2 blend">
|
||||
<span class="text-black/75 dark:text-white/75 group-hover:text-black group-hover:dark:text-white blend">
|
||||
<a href="/blog" class="w-fit col-span-3 group flex gap-1 items-center underline decoration-[.5px] decoration-edge text-ink-muted underline-offset-2 hover:text-link hover:decoration-link blend">
|
||||
<span class="group-hover:text-link blend">
|
||||
All posts
|
||||
</span>
|
||||
</a>
|
||||
@@ -153,7 +159,7 @@ const stack = [
|
||||
<!-- Tech Stack Section -->
|
||||
<section class="animate">
|
||||
<div class="space-y-4">
|
||||
<p class="font-semibold text-spaghetti-brown dark:text-spaghetti-dark-cream">
|
||||
<p class="font-semibold text-ink">
|
||||
Website build with
|
||||
</p>
|
||||
<div class="flex flex-wrap items-center gap-2 mt-5">
|
||||
@@ -165,10 +171,10 @@ const stack = [
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
<div class="dark:text-spaghetti-dark-cream">
|
||||
<div class="text-ink">
|
||||
Performing reactivity and statefulness, special guest
|
||||
<a href="https://www.solidjs.com/" target="_blank" class="w-fit group underline decoration-[.5px] decoration-black/25 dark:decoration-white/50 hover:decoration-black dark:hover:decoration-white text-black dark:text-white underline-offset-2 blend">
|
||||
<span class="text-spaghetti-brown/75 dark:text-spaghetti-dark-cream/75 group-hover:text-spaghetti-brown group-hover:dark:text-spaghetti-dark-cream blend">
|
||||
<a href="https://www.solidjs.com/" target="_blank" class="w-fit group underline decoration-[.5px] decoration-edge text-ink-muted underline-offset-2 hover:text-link hover:decoration-link blend">
|
||||
<span class="group-hover:text-link blend">
|
||||
SolidJS
|
||||
</span>
|
||||
</a>
|
||||
@@ -180,11 +186,11 @@ const stack = [
|
||||
<section class="animate">
|
||||
<div class="space-y-4">
|
||||
<div class="flex justify-between">
|
||||
<p class="font-semibold text-spaghetti-brown dark:text-spaghetti-dark-cream">
|
||||
<p class="font-semibold text-ink">
|
||||
Recent projects
|
||||
</p>
|
||||
<a href="/projects" class="w-fit col-span-3 group flex gap-1 items-center underline decoration-[.5px] decoration-black/25 dark:decoration-white/50 hover:decoration-black dark:hover:decoration-white text-black dark:text-white underline-offset-2 blend">
|
||||
<span class="text-black/75 dark:text-white/75 group-hover:text-black group-hover:dark:text-white blend">
|
||||
<a href="/projects" class="w-fit col-span-3 group flex gap-1 items-center underline decoration-[.5px] decoration-edge text-ink-muted underline-offset-2 hover:text-link hover:decoration-link blend">
|
||||
<span class="group-hover:text-link blend">
|
||||
All projects
|
||||
</span>
|
||||
</a>
|
||||
@@ -201,7 +207,7 @@ const stack = [
|
||||
|
||||
<!-- Contact Section -->
|
||||
<section class="animate">
|
||||
<div class=" text-spaghetti-brown dark:text-spaghetti-dark-cream">
|
||||
<div class=" text-ink">
|
||||
<p class="font-semibold">
|
||||
Let's Connect
|
||||
</p>
|
||||
@@ -216,8 +222,8 @@ const stack = [
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-span-3 truncate">
|
||||
<a href={social.HREF} target="_blank" class="w-fit col-span-3 group flex gap-1 items-center underline decoration-[.5px] decoration-black/25 dark:decoration-white/50 hover:decoration-black dark:hover:decoration-white text-black dark:text-white underline-offset-2 blend">
|
||||
<span class="text-black/75 dark:text-white/75 group-hover:text-black group-hover:dark:text-white blend">
|
||||
<a href={social.HREF} target="_blank" class="w-fit col-span-3 group flex gap-1 items-center underline decoration-[.5px] decoration-edge text-ink-muted underline-offset-2 hover:text-link hover:decoration-link blend">
|
||||
<span class="group-hover:text-link blend">
|
||||
{social.TEXT}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
@@ -31,6 +31,6 @@ const doc = entry
|
||||
</div>
|
||||
</TopLayout>
|
||||
<BottomLayout>
|
||||
<article class="animate prose dark:prose-invert text-spaghetti-brown/100 dark:text-spaghetti-cream" set:html={doc.rendered?.html}></article>
|
||||
<article class="animate prose dark:prose-invert text-ink" set:html={doc.rendered?.html}></article>
|
||||
</BottomLayout>
|
||||
</PageLayout>
|
||||
@@ -29,17 +29,17 @@ function formatWorkDate(input: Date | string) {
|
||||
<ul>
|
||||
{
|
||||
work.sort((a, b) => a.data.dateEnd > b.data.dateEnd ? -1 : b.data.dateEnd > a.data.dateEnd ? 1 : 0).map((entry) => (
|
||||
<li class="animate border-b border-black/10 dark:border-white/25 mt-4 py-8 first-of-type:mt-0 first-of-type:pt-0 last-of-type:border-none">
|
||||
<div class="text-sm uppercase mb-4">
|
||||
<li class="animate border-b border-line mt-4 py-8 first-of-type:mt-0 first-of-type:pt-0 last-of-type:border-none">
|
||||
<div class="text-sm uppercase mb-4 text-accent">
|
||||
{formatWorkDate(entry.data.dateStart)} - {formatWorkDate(entry.data.dateEnd)}
|
||||
</div>
|
||||
<div class="text-spaghetti-brown/100 dark:text-spaghetti-yellow font-semibold">
|
||||
<div class="text-ink font-semibold">
|
||||
{entry.data.company}
|
||||
</div>
|
||||
<div class="text-sm font-semibold text-spaghetti-brown/100 dark:text-spaghetti-yellow">
|
||||
<div class="text-sm font-semibold text-accent">
|
||||
{entry.data.role}
|
||||
</div>
|
||||
<article class="prose dark:prose-invert text-spaghetti-brown/100 dark:text-spaghetti-cream" set:html={entry.rendered?.html}></article>
|
||||
<article class="prose dark:prose-invert text-ink" set:html={entry.rendered?.html}></article>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
|
||||
+292
-236
@@ -6,7 +6,65 @@
|
||||
|
||||
@plugin "@tailwindcss/typography";
|
||||
|
||||
/**
|
||||
* THE ONE PALETTE.
|
||||
*
|
||||
* Everything visual hangs off semantic tokens below. Utilities are generated from
|
||||
* `--color-*` in `@theme`, and Tailwind emits them as `var(--color-*)` references,
|
||||
* so re-declaring the same names under `html.dark` (see just after this block)
|
||||
* flips the whole site at runtime. That is why components no longer need `dark:`
|
||||
* colour variants: `bg-surface` is cream-white in light mode and espresso in dark,
|
||||
* from the same class.
|
||||
*
|
||||
* The pasta identity lives in the *values*, not the names: sauce-red links,
|
||||
* noodle-yellow chips, meatball-brown ink, parmesan highlights, and a warm
|
||||
* espresso plate for the night-sky mode. Ratios in the comments are measured
|
||||
* against the surface they sit on (WCAG AA: 4.5:1 body text, 3:1 large text and
|
||||
* interactive borders).
|
||||
*/
|
||||
@theme {
|
||||
/* --- Surfaces ---------------------------------------------------------- */
|
||||
--color-page: #FBF3E2; /* warm cream plate (light) / espresso (dark) */
|
||||
--color-surface: #FFFFFF; /* raised card on the plate */
|
||||
--color-wash: #F5EAD5; /* hover fill */
|
||||
|
||||
/* --- Ink --------------------------------------------------------------- */
|
||||
--color-ink: #3E2113; /* 13.3:1 on page, 14.7:1 on surface */
|
||||
--color-ink-muted: #6B4A32; /* 7.2:1 on page */
|
||||
--color-accent: #7A4E0F; /* dates, eyebrows, labels — 6.5:1 on page */
|
||||
|
||||
/* --- Sauce ------------------------------------------------------------- */
|
||||
--color-link: #B3261E; /* 5.9:1 on page */
|
||||
--color-link-hover: #8C1B15; /* 8.3:1 on page */
|
||||
|
||||
/* --- Edges ------------------------------------------------------------- */
|
||||
--color-edge: #9C8874; /* interactive borders — 3.07:1 on page (WCAG 1.4.11) */
|
||||
--color-line: #E4D9C6; /* decorative hairlines and dividers */
|
||||
|
||||
/* --- Noodles / parmesan ------------------------------------------------ */
|
||||
--color-chip: #FDE68A; /* tag + pill fill */
|
||||
--color-chip-ink: #3E2113; /* 11.8:1 on chip */
|
||||
/* Code blocks are a raised white card, not a tinted one. Measured: the
|
||||
`light-plus` syntax tokens (worst case #e50000 property names) hold 4.85:1
|
||||
on #FFFFFF but fall to 4.07:1 on the tinted #F5EAD5, so any cream wash
|
||||
under code puts real code text below AA. */
|
||||
--color-code-bg: #FFFFFF;
|
||||
--color-focus: #B3261E; /* focus ring, 5.9:1 on page */
|
||||
|
||||
/* --- Status light (footer) --------------------------------------------- */
|
||||
--color-status-ok: #15803D;
|
||||
--color-status-ok-ping: #4ADE80;
|
||||
--color-status-warn: #B45309;
|
||||
--color-status-warn-ping: #FBBF24;
|
||||
--color-status-down: #B3261E;
|
||||
--color-status-down-ping: #F87171;
|
||||
--color-status-maint: #3730A3;
|
||||
--color-status-maint-ping: #A5B4FC;
|
||||
--color-status-unknown: #6B7280;
|
||||
|
||||
/* --- Decorative source palette (hero sky, gradients, art) -------------- *
|
||||
* Raw ingredient colours. Never used for text: the pastels are tuned for
|
||||
* the dark sky and fall to 1.1-1.5:1 on the cream plate. */
|
||||
--color-spaghetti-yellow: #FDE68A;
|
||||
--color-spaghetti-red: #FECACA;
|
||||
--color-spaghetti-cream: #FEF3C7;
|
||||
@@ -15,7 +73,6 @@
|
||||
--color-spaghetti-dark-red: #FCA5A5;
|
||||
--color-spaghetti-dark-yellow: #FCD34D;
|
||||
|
||||
/* Sauce, meat and parmesan for the dark-mode sky. */
|
||||
--color-marinara: #E23B2C;
|
||||
--color-marinara-dark: #B3261E;
|
||||
--color-meatball: #A05A2E;
|
||||
@@ -23,6 +80,10 @@
|
||||
--color-meatball-dark: #34190C;
|
||||
--color-parmesan: #FFF6E5;
|
||||
|
||||
/* --- Type -------------------------------------------------------------- */
|
||||
--font-sans: "Atkinson", system-ui, sans-serif;
|
||||
|
||||
/* --- Motion ------------------------------------------------------------ */
|
||||
--animate-twinkle: twinkle 2s ease-in-out forwards;
|
||||
--animate-meatball: meatball 3s ease-in-out forwards;
|
||||
--animate-tumble: meatball-tumble 1.4s linear infinite;
|
||||
@@ -46,18 +107,39 @@
|
||||
}
|
||||
}
|
||||
|
||||
:root{
|
||||
--copy-btn-margin:10px;
|
||||
/* Pastel Palette Colors for Spaghetti Theme - Light Mode */
|
||||
--spaghetti-yellow: #FDE68A;
|
||||
--spaghetti-red: #FECACA;
|
||||
--spaghetti-cream: #FEF3C7;
|
||||
--spaghetti-brown: #451A03;
|
||||
/**
|
||||
* Dark mode: same names, cooked longer. Only the values change, so every
|
||||
* `bg-page` / `text-ink` / `border-edge` class in the components follows.
|
||||
*/
|
||||
html.dark {
|
||||
--color-page: #140C08;
|
||||
--color-surface: #1E130D;
|
||||
--color-wash: #241811;
|
||||
|
||||
/* Dark Mode Colors - Better contrast on black background */
|
||||
--spaghetti-dark-cream: #F5E6D3;
|
||||
--spaghetti-dark-red: #FCA5A5;
|
||||
--spaghetti-dark-yellow: #FCD34D;
|
||||
--color-ink: #F5E6D3; /* 15.8:1 on page */
|
||||
--color-ink-muted: #C9B49B; /* 9.7:1 on page */
|
||||
--color-accent: #FCD34D; /* 13.4:1 on page */
|
||||
|
||||
--color-link: #FCA5A5; /* 10.2:1 on page */
|
||||
--color-link-hover: #FFD1D1; /* 14.1:1 on page */
|
||||
|
||||
--color-edge: #6E6359; /* 3.31:1 on page, 3.11:1 on surface */
|
||||
--color-line: #2E2620;
|
||||
|
||||
--color-chip: #3E3014;
|
||||
--color-chip-ink: #F5E6D3; /* 10.5:1 on chip */
|
||||
--color-code-bg: #1E130D;
|
||||
--color-focus: #FCD34D;
|
||||
|
||||
--color-status-ok: #22C55E;
|
||||
--color-status-ok-ping: #86EFAC;
|
||||
--color-status-warn: #F59E0B;
|
||||
--color-status-warn-ping: #FCD34D;
|
||||
--color-status-down: #E23B2C;
|
||||
--color-status-down-ping: #FCA5A5;
|
||||
--color-status-maint: #818CF8;
|
||||
--color-status-maint-ping: #A5B4FC;
|
||||
--color-status-unknown: #9CA3AF;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
@@ -76,230 +158,209 @@
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
html {
|
||||
overflow-y: scroll;
|
||||
color-scheme: light;
|
||||
background-color: var(--spaghetti-cream);
|
||||
font-family: "Atkinson", sans-serif;
|
||||
background-color: var(--color-page);
|
||||
font-family: var(--font-sans);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
html.dark {
|
||||
html.dark {
|
||||
color-scheme: dark;
|
||||
background-color: #000000; /* Darker black for better contrast */
|
||||
}
|
||||
|
||||
body {
|
||||
@apply relative flex h-full w-full flex-col antialiased;
|
||||
background-color: var(--color-page);
|
||||
color: var(--color-ink);
|
||||
}
|
||||
|
||||
main {
|
||||
@apply flex flex-1 flex-col;
|
||||
background-color: var(--color-page);
|
||||
color: var(--color-ink);
|
||||
}
|
||||
|
||||
header {
|
||||
@apply border-b transition-all duration-300 ease-in-out;
|
||||
}
|
||||
|
||||
header:not(.scrolled) {
|
||||
@apply border-transparent bg-transparent;
|
||||
}
|
||||
|
||||
header.scrolled {
|
||||
/* Sits on the plate, so it has to be a translucent version of it. A fixed
|
||||
white/75 over cream page read as 1.00:1 — an invisible bar over content. */
|
||||
background-color: color-mix(in oklab, var(--color-page) 78%, transparent);
|
||||
@apply border-line backdrop-blur-sm saturate-200;
|
||||
}
|
||||
|
||||
.page-heading {
|
||||
@apply font-semibold;
|
||||
color: var(--color-ink);
|
||||
}
|
||||
|
||||
::selection {
|
||||
background-color: var(--color-chip);
|
||||
color: var(--color-chip-ink);
|
||||
}
|
||||
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--color-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Apply pastel cream background to main content areas */
|
||||
main {
|
||||
@apply flex flex-col flex-1 bg-spaghetti-cream dark:bg-black;
|
||||
/**
|
||||
* PROSE.
|
||||
*
|
||||
* The typography plugin only exposes its colours through `--tw-prose-*`, so this
|
||||
* is the single place article styling is set. Declared for `.prose` and
|
||||
* `.prose-invert` together: the tokens already flip with `html.dark`, so the
|
||||
* invert variant is now a no-op kept only so existing markup keeps working.
|
||||
*
|
||||
* The `html` prefix is load-bearing, not decoration. Tailwind emits the plugin's
|
||||
* own `.prose { --tw-prose-*: oklch(…) }` defaults into the same `components`
|
||||
* layer but *after* this block, so at equal specificity the plugin would win and
|
||||
* articles would render slate instead of sauce. `html .prose` is (0,1,1) and
|
||||
* outranks it.
|
||||
*/
|
||||
@layer components {
|
||||
/* `article` is in the list because the base rule below applies the `prose`
|
||||
utility with @apply, which inlines the plugin's oklch defaults onto the
|
||||
element. Blog articles carry no `.prose` class of their own, so they need
|
||||
these tokens directly or they render slate. */
|
||||
html .prose,
|
||||
html .prose-invert,
|
||||
html article {
|
||||
--tw-prose-body: var(--color-ink);
|
||||
--tw-prose-headings: var(--color-ink);
|
||||
--tw-prose-lead: var(--color-ink-muted);
|
||||
--tw-prose-links: var(--color-link);
|
||||
--tw-prose-bold: var(--color-ink);
|
||||
--tw-prose-counters: var(--color-accent);
|
||||
--tw-prose-bullets: var(--color-accent);
|
||||
--tw-prose-hr: var(--color-line);
|
||||
--tw-prose-quotes: var(--color-ink);
|
||||
--tw-prose-quote-borders: var(--color-chip);
|
||||
--tw-prose-captions: var(--color-ink-muted);
|
||||
--tw-prose-code: var(--color-ink);
|
||||
--tw-prose-pre-code: var(--color-ink);
|
||||
--tw-prose-pre-bg: var(--color-code-bg);
|
||||
--tw-prose-th-borders: var(--color-edge);
|
||||
--tw-prose-td-borders: var(--color-line);
|
||||
|
||||
/* The plugin's invert set points at the same tokens; without this, markup
|
||||
carrying `prose-invert` would fall back to the plugin's slate defaults. */
|
||||
--tw-prose-invert-body: var(--color-ink);
|
||||
--tw-prose-invert-headings: var(--color-ink);
|
||||
--tw-prose-invert-lead: var(--color-ink-muted);
|
||||
--tw-prose-invert-links: var(--color-link);
|
||||
--tw-prose-invert-bold: var(--color-ink);
|
||||
--tw-prose-invert-counters: var(--color-accent);
|
||||
--tw-prose-invert-bullets: var(--color-accent);
|
||||
--tw-prose-invert-hr: var(--color-line);
|
||||
--tw-prose-invert-quotes: var(--color-ink);
|
||||
--tw-prose-invert-quote-borders: var(--color-chip);
|
||||
--tw-prose-invert-captions: var(--color-ink-muted);
|
||||
--tw-prose-invert-code: var(--color-ink);
|
||||
--tw-prose-invert-pre-code: var(--color-ink);
|
||||
--tw-prose-invert-pre-bg: var(--color-code-bg);
|
||||
--tw-prose-invert-th-borders: var(--color-edge);
|
||||
--tw-prose-invert-td-borders: var(--color-line);
|
||||
}
|
||||
|
||||
article {
|
||||
@apply prose max-w-full pb-12;
|
||||
}
|
||||
|
||||
article img {
|
||||
@apply mx-auto block py-5;
|
||||
}
|
||||
|
||||
/* Inline code needs a fill of its own; the plugin gives it none.
|
||||
|
||||
Two things are load-bearing here:
|
||||
- `article` is in the selector list because article bodies are styled by the
|
||||
base `article { @apply prose }` rule, not by a `.prose` class, so the
|
||||
plugin inlines its defaults as `article :where(code) …`. A `.prose`-only
|
||||
rule would never match a blog post.
|
||||
- The `html` prefix wins the tie: the plugin's
|
||||
`article :where(code):not(:where([class~=not-prose] *))::before { content: "`" }`
|
||||
is (0,0,2) and emitted after a bare `:where` rule of equal weight, so
|
||||
without it the literal backticks survive. */
|
||||
html .prose :where(code):not(:where(pre code, [class~="not-prose"], [class~="not-prose"] *)),
|
||||
html article :where(code):not(:where(pre code, [class~="not-prose"], [class~="not-prose"] *)) {
|
||||
background-color: var(--color-code-bg);
|
||||
border: 1px solid var(--color-line);
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.1em 0.35em;
|
||||
}
|
||||
|
||||
html .prose :where(code):not(:where(pre code, [class~="not-prose"], [class~="not-prose"] *))::before,
|
||||
html .prose :where(code):not(:where(pre code, [class~="not-prose"], [class~="not-prose"] *))::after,
|
||||
html article :where(code):not(:where(pre code, [class~="not-prose"], [class~="not-prose"] *))::before,
|
||||
html article :where(code):not(:where(pre code, [class~="not-prose"], [class~="not-prose"] *))::after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
/* With `defaultColor: false` Shiki no longer paints a background inline, so
|
||||
the block is ours to colour. `article pre` is listed alongside `.prose pre`
|
||||
for the same reason as the inline-code rule above: article bodies get prose
|
||||
styling from `article { @apply prose }`, so a blog post's <pre> does not
|
||||
match a `.prose` class selector and would otherwise lose its border. */
|
||||
.prose pre,
|
||||
html article pre {
|
||||
background-color: var(--color-code-bg);
|
||||
border: 1px solid var(--color-line);
|
||||
border-radius: 0.5rem;
|
||||
color: var(--color-ink);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dual-theme Shiki swap.
|
||||
*
|
||||
* `themes: { light, dark }` + `defaultColor: false` puts each token's colour
|
||||
* in `--shiki-light` / `--shiki-dark` custom properties rather than a hard
|
||||
* `color:`, so nothing is painted until a rule like these chooses one per
|
||||
* mode. No `!important` is needed — the inline styles carry only the custom
|
||||
* properties, never a `color`.
|
||||
*
|
||||
* Only colour is swapped — this Shiki version emits no `--shiki-*-style`
|
||||
* variables, so forcing font-style here would flatten italic tokens.
|
||||
*/
|
||||
.astro-code {
|
||||
color: var(--shiki-light);
|
||||
}
|
||||
|
||||
.astro-code span {
|
||||
color: var(--shiki-light);
|
||||
}
|
||||
|
||||
html.dark .astro-code,
|
||||
html.dark .astro-code span {
|
||||
color: var(--shiki-dark);
|
||||
}
|
||||
|
||||
.prose blockquote {
|
||||
border-left-color: var(--color-chip);
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.prose a {
|
||||
text-decoration-color: color-mix(in oklab, var(--color-link) 45%, transparent);
|
||||
text-underline-offset: 3px;
|
||||
transition: color 300ms ease-in-out, text-decoration-color 300ms ease-in-out;
|
||||
}
|
||||
|
||||
.prose a:hover {
|
||||
color: var(--color-link-hover);
|
||||
text-decoration-color: currentColor;
|
||||
}
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
@apply h-full w-full antialiased;
|
||||
@apply text-black/75 dark:text-white/75;
|
||||
}
|
||||
|
||||
/* Better dark mode text contrast */
|
||||
.dark {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgba(255, 255, 255, var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
/* Improved border visibility in dark mode */
|
||||
.border-black\/15 {
|
||||
border-color: rgba(255, 255, 255, 0.15) !important;
|
||||
}
|
||||
|
||||
.border-white\/20 {
|
||||
border-color: rgba(255, 255, 255, 0.2) !important;
|
||||
}
|
||||
|
||||
/* Better contrast for links and important text */
|
||||
.prose a {
|
||||
color: var(--spaghetti-red) !important;
|
||||
}
|
||||
|
||||
.dark .prose h1,
|
||||
.dark .prose h2,
|
||||
.dark .prose h3,
|
||||
.dark .prose h4,
|
||||
.dark .prose h5,
|
||||
.dark .prose h6 {
|
||||
color: var(--spaghetti-dark-cream) !important;
|
||||
}
|
||||
|
||||
.dark .prose code {
|
||||
color: var(--spaghetti-dark-cream) !important;
|
||||
}
|
||||
|
||||
.prose blockquote {
|
||||
border-left-color: var(--spaghetti-yellow) !important;
|
||||
}
|
||||
|
||||
.dark .prose th,
|
||||
.dark .prose td {
|
||||
color: var(--spaghetti-dark-cream) !important;
|
||||
}
|
||||
|
||||
.page-heading {
|
||||
@apply font-semibold text-black dark:text-white;
|
||||
}
|
||||
|
||||
/* Better contrast for text elements - use dark brown for readability */
|
||||
.text-spaghetti-brown {
|
||||
color: var(--spaghetti-brown);
|
||||
}
|
||||
|
||||
/* Better background for code blocks in dark mode */
|
||||
.prose pre {
|
||||
background-color: #1f2937 !important; /* gray-800 */
|
||||
color: #f9fafb !important; /* gray-50 */
|
||||
}
|
||||
|
||||
/* Improved dark mode for cards and buttons */
|
||||
.group:hover .border-black\/15,
|
||||
.group:hover .border-white\/20 {
|
||||
border-color: rgba(255, 255, 255, 0.3) !important;
|
||||
}
|
||||
|
||||
/* Pastel Theme Colors */
|
||||
.text-spaghetti-yellow {
|
||||
color: var(--spaghetti-yellow);
|
||||
}
|
||||
|
||||
.text-spaghetti-red {
|
||||
color: var(--spaghetti-red);
|
||||
}
|
||||
|
||||
.text-spaghetti-brown {
|
||||
color: var(--spaghetti-brown);
|
||||
}
|
||||
|
||||
/* Dark mode text colors - use warm cream for better readability */
|
||||
.dark .text-spaghetti-yellow {
|
||||
color: var(--spaghetti-dark-yellow);
|
||||
}
|
||||
|
||||
.dark .text-spaghetti-red {
|
||||
color: var(--spaghetti-dark-red);
|
||||
}
|
||||
|
||||
.dark .text-spaghetti-brown {
|
||||
color: var(--spaghetti-dark-cream);
|
||||
}
|
||||
|
||||
/* NOTE: do not re-add an unlayered `.bg-spaghetti-cream` rule here. Unlayered CSS
|
||||
outranks every Tailwind layer, so it silently beat `dark:bg-black` and left the
|
||||
mobile drawer cream-on-white in dark mode. The Tailwind utility already resolves
|
||||
to the same #FEF3C7 via --color-spaghetti-cream.
|
||||
|
||||
The `.text-spaghetti-*` rules above are unlayered too, so they must not be paired
|
||||
with `dark:` variants: `.dark .text-spaghetti-brown` beats Tailwind's
|
||||
`dark:text-*` utilities, which makes `dark:bg-spaghetti-cream
|
||||
dark:text-spaghetti-brown` render cream-on-cream (1.1:1). Active nav pills use
|
||||
plain `text-black` in both modes instead — see ACTIVE_NAV_COLORS in src/lib/utils.ts. */
|
||||
|
||||
body {
|
||||
@apply relative flex flex-col;
|
||||
@apply bg-white dark:bg-black;
|
||||
}
|
||||
|
||||
main {
|
||||
@apply flex flex-col flex-1 bg-white dark:bg-black;
|
||||
}
|
||||
|
||||
header {
|
||||
@apply border-b;
|
||||
@apply transition-all duration-300 ease-in-out;
|
||||
}
|
||||
|
||||
header:not(.scrolled) {
|
||||
@apply bg-transparent border-transparent;
|
||||
}
|
||||
|
||||
header.scrolled {
|
||||
@apply bg-white/75 dark:bg-black/50;
|
||||
@apply border-black/10 dark:border-white/25;
|
||||
@apply backdrop-blur-sm saturate-200;
|
||||
}
|
||||
|
||||
article {
|
||||
@apply prose dark:prose-invert max-w-full pb-12;
|
||||
/* Ensure our theme colors are applied properly in prose */
|
||||
color: var(--spaghetti-brown);
|
||||
}
|
||||
|
||||
.dark article {
|
||||
color: var(--spaghetti-dark-cream);
|
||||
}
|
||||
|
||||
/* Override default prose styles that conflict with our theme */
|
||||
.prose {
|
||||
color: var(--spaghetti-brown);
|
||||
}
|
||||
|
||||
.dark .prose {
|
||||
color: var(--spaghetti-dark-cream);
|
||||
}
|
||||
|
||||
.prose a {
|
||||
color: var(--spaghetti-red);
|
||||
}
|
||||
|
||||
.dark .prose a {
|
||||
color: var(--spaghetti-dark-red);
|
||||
}
|
||||
|
||||
.prose h1,
|
||||
.prose h2,
|
||||
.prose h3,
|
||||
.prose h4,
|
||||
.prose h5,
|
||||
.prose h6 {
|
||||
color: var(--spaghetti-brown);
|
||||
}
|
||||
|
||||
.dark .prose h1,
|
||||
.dark .prose h2,
|
||||
.dark .prose h3,
|
||||
.dark .prose h4,
|
||||
.dark .prose h5,
|
||||
.dark .prose h6 {
|
||||
color: var(--spaghetti-dark-cream);
|
||||
}
|
||||
|
||||
.prose code {
|
||||
color: var(--spaghetti-brown);
|
||||
}
|
||||
|
||||
.dark .prose code {
|
||||
color: var(--spaghetti-dark-cream);
|
||||
}
|
||||
|
||||
.prose pre {
|
||||
background-color: var(--spaghetti-cream);
|
||||
}
|
||||
|
||||
.prose blockquote {
|
||||
border-left-color: var(--spaghetti-yellow);
|
||||
}
|
||||
|
||||
.prose th,
|
||||
.prose td {
|
||||
color: var(--spaghetti-brown);
|
||||
}
|
||||
|
||||
.dark .prose th,
|
||||
.dark .prose td {
|
||||
color: var(--spaghetti-dark-cream);
|
||||
}
|
||||
|
||||
.page-heading {
|
||||
@apply font-semibold text-black dark:text-white;
|
||||
}
|
||||
|
||||
.blend {
|
||||
@apply transition-all duration-300 ease-in-out;
|
||||
@@ -327,18 +388,11 @@ article {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
article img {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* PARMESAN FLECKS
|
||||
*/
|
||||
|
||||
#parmesan-fleck.template {
|
||||
#parmesan-fleck.template {
|
||||
@apply absolute -left-full; /* hide offscreen */
|
||||
}
|
||||
|
||||
@@ -486,5 +540,7 @@ article img {
|
||||
}
|
||||
|
||||
.copy-svg {
|
||||
@apply w-full aspect-square text-white opacity-70 hover:opacity-90;
|
||||
/* The button sits inside the code block, whose background is now the light
|
||||
`code-bg` token in light mode. `text-white` was invisible there (1.1:1). */
|
||||
@apply w-full aspect-square text-ink-muted opacity-70 hover:opacity-90;
|
||||
}
|
||||
@@ -7,9 +7,17 @@ export interface Site extends Page {
|
||||
AUTHOR: string
|
||||
}
|
||||
|
||||
/**
|
||||
* A nav entry. HREF may be site-relative (Home, Work, Blog, Projects) or an
|
||||
* absolute off-site URL (Docs → docs.spaghet.io). EXTERNAL marks the off-site
|
||||
* entries so the renderers can add target/rel and skip active-page styling;
|
||||
* it is intentionally explicit rather than sniffed at call sites so the two
|
||||
* navs (Header.astro, Drawer.astro) can never disagree.
|
||||
*/
|
||||
export type Links = {
|
||||
TEXT: string
|
||||
HREF: string
|
||||
EXTERNAL?: boolean
|
||||
}[]
|
||||
|
||||
export type Cta = {
|
||||
|
||||
Reference in new issue
Block a user