diff --git a/AGENTS.md b/AGENTS.md index 601086a..001a092 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,7 +5,7 @@ Josselin Perrus's personal site: an Astro 7 static site served by Cloudflare Wor ## Layout - `src/`: pages, layouts and components. Pages are built in the `Frame` component, which holds the header and the footer; the portfolio view of `/documents/` has its own. -- `src/styles/`: `tokens.css` holds the colours and fonts as custom properties, `global.css` the base styles, and `legacy.css` the content styles of the pages not yet rebuilt in the redesign. +- `src/styles/`: `tokens.css` holds the colours and fonts as custom properties, and `global.css` the base styles. - `src/fonts/`: the self-hosted fonts, DejaVu Sans Mono and Newsreader, subset by `scripts/subset-fonts.py`, with their licences. The site loads no outside fonts. - The page background (`src/components/Background.astro`: the paper texture and the corner pattern) and the topic map (`TopicMap.astro`, inside the `Intro` of Home and About) are drawn on canvases from small images in `src/assets/background/`. `scripts/make-background.py` makes those images, from the map's land in `src/data/topic-map.json`; rerun it after changing either, and commit its output. The site loads no shader library. - `src/content/writing/`: git submodule of [meaningfool-writing](https://github.com/meaningfool/meaningfool-writing), which holds every article, activity log and image. Read its `AGENTS.md` before editing content. diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 6d759b6..bd465dc 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,6 +1,5 @@ --- import '../styles/global.css'; -import '../styles/legacy.css'; import Background from '../components/Background.astro'; import Frame from '../components/Frame.astro'; import Favicons from '../components/Favicons.astro'; diff --git a/src/styles/legacy.css b/src/styles/legacy.css deleted file mode 100644 index 259e424..0000000 --- a/src/styles/legacy.css +++ /dev/null @@ -1,208 +0,0 @@ -/* The content styles of the pages from before the redesign, kept until each page is rebuilt: the home (#31) and About - (#33); the article page (#32) has been. They apply inside an element with the legacy class, which those pages give - their
. Rebuilding a page drops the class, and the last one deletes this file. - - Only the fonts, the weights and the colours changed with the redesign's foundations (#29). :where() gives each rule - the specificity it had as a global rule, so the pages' own styles still win where they did. */ - -/* The rem sizes below, and the pages' own, are based on 18px. The redesign's components use px. */ -html { font-size: 18px; } - -.legacy { - max-width: 75ch; - margin: 2rem auto 0; - font-size: 1rem; - line-height: 1.7; -} - -/* Section base */ -:where(.legacy) section { - padding: 2rem 0; -} - -:where(.legacy) section + section { - padding-top: 1rem; -} - -@media (max-width: 768px) { - :where(.legacy) section { - padding: 1.5rem 0; - } - - :where(.legacy) section + section { - padding-top: 0.75rem; - } -} - -/* Typography base */ -:where(.legacy) :is(h1, h2, h3, h4, h5, h6) { - font-family: var(--mono); - font-weight: 400; - line-height: 1.25; - letter-spacing: -0.015em; - margin: 0 0 0.5rem 0; -} - -:where(.legacy) h1 { - font-size: clamp(1.125rem, 2.5vw, 1.5rem); - text-indent: -2ch; - padding-left: 2ch; - margin: 2.5rem 0 1rem 0; -} - -:where(.legacy) h1:first-child { - margin-top: 0; -} - -:where(.legacy) h1::before { - content: "# "; - color: var(--accent); -} - -:where(.legacy) h2 { - font-size: 1.375rem; -} - -:where(.legacy) h3 { - font-size: 1.25rem; -} - -:where(.legacy) :is(h4, h5, h6) { - font-size: 1.125rem; -} - -:where(.legacy) .section-title { - margin-bottom: 1rem; -} - -:where(.legacy) :is(p, ul, ol) { - margin: 0 0 1rem 0; - line-height: 1.7; -} - -:where(.legacy) :is(ul, ol) li { - margin-bottom: 0.5rem; -} - -:where(.legacy) :is(ul, ol) li:last-child { - margin-bottom: 0; -} - -:where(.legacy) :is(strong, b) { - font-weight: 400; -} - -:where(.legacy) a { - word-break: break-word; - overflow-wrap: break-word; -} - -/* Code styling */ -:where(.legacy) code { - font-family: var(--mono); - font-size: 0.9em; - background-color: #0d1117; - color: #f0f6fc; - padding: 0.2em 0.4em; - border-radius: 3px; - word-break: break-all; - overflow-wrap: break-word; -} - -:where(.legacy) pre { - font-family: var(--mono); - padding: 1rem; - border-radius: 6px; - overflow-x: auto; - line-height: 1.5; -} - -:where(.legacy) pre code { - background: none; - color: inherit; - padding: 0; - font-size: inherit; -} - -/* Blockquote styling */ -:where(.legacy) blockquote { - margin: 1.5rem 0; - padding: 1rem 1.5rem; - border-left: 4px solid var(--accent); - background-color: var(--tint); - font-style: italic; -} - -:where(.legacy) blockquote p:last-child { - margin-bottom: 0; -} - -/* Table styling */ -:where(.legacy) table { - width: 100%; - margin: 1.5rem 0; - border-collapse: collapse; - font-size: inherit; - display: block; - overflow-x: auto; -} - -:where(.legacy) table :is(th, td) { - padding: 0.75rem; - border: 1px solid #000000; -} - -:where(.legacy) table th { - font-weight: 600; - background-color: var(--page); -} - -:where(.legacy) table tr:nth-child(even) { - background-color: #f9f9f9; -} - -@media (max-width: 768px) { - :where(.legacy) table { - font-size: 0.85rem; - } - - :where(.legacy) table :is(th, td) { - padding: 0.5rem; - } -} - -/* Task list styling */ -:where(.legacy) ul li:has(input[type="checkbox"]) { - list-style: none; - margin-left: -1.5rem; -} - -:where(.legacy) ul li:has(input[type="checkbox"]) input[type="checkbox"] { - margin-right: 0.5rem; -} - -/* Footnotes styling */ -:where(.legacy) .footnotes { - font-size: 0.875rem; - line-height: 1.4; - margin-top: 3rem; - padding-top: 1.5rem; - border-top: 1px solid var(--line); -} - -:where(.legacy) .footnotes ol { - margin: 0; -} - -:where(.legacy) .footnotes li { - margin-bottom: 0.5rem; -} - -/* Image styling */ -:where(.legacy) img { - max-width: 100%; - height: auto; - border-radius: 6px; - margin: 1rem 0; - display: block; -}