From f3aeeb1b5f28dfac0c6eacd84a9f3775c6884261 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Mon, 12 Jan 2026 11:19:21 -0500 Subject: [PATCH] remove toc --- public/styles/common.css | 165 ++++++++++++++++++++++++++ public/styles/index.css | 166 +-------------------------- src/components/TableOfContents.astro | 80 ------------- src/content/config.ts | 1 - src/layouts/BaseLayout.astro | 2 +- src/layouts/PostLayout.astro | 18 +-- src/pages/404.astro | 22 +--- src/pages/index.astro | 5 +- 8 files changed, 177 insertions(+), 282 deletions(-) create mode 100644 public/styles/common.css delete mode 100644 src/components/TableOfContents.astro diff --git a/public/styles/common.css b/public/styles/common.css new file mode 100644 index 0000000..37005a5 --- /dev/null +++ b/public/styles/common.css @@ -0,0 +1,165 @@ +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-Thin.ttf") format("truetype"); + font-weight: 100; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-ThinItalic.ttf") format("truetype"); + font-weight: 100; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-Extralight.ttf") format("truetype"); + font-weight: 200; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-ExtralightItalic.ttf") format("truetype"); + font-weight: 200; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-Light.ttf") format("truetype"); + font-weight: 300; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-LightItalic.ttf") format("truetype"); + font-weight: 300; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-Regular.ttf") format("truetype"); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-RegularItalic.ttf") format("truetype"); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-Medium.ttf") format("truetype"); + font-weight: 500; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-MediumItalic.ttf") format("truetype"); + font-weight: 500; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-Bold.ttf") format("truetype"); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-BoldItalic.ttf") format("truetype"); + font-weight: 700; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-Black.ttf") format("truetype"); + font-weight: 900; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Signifier"; + src: url("/fonts/signifier/Signifier-BlackItalic.ttf") format("truetype"); + font-weight: 900; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "Apercu Mono"; + src: url("/fonts/apercu-mono/ApercuMonoProLight.ttf") format("truetype"); + font-weight: 300; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Apercu Mono"; + src: url("/fonts/apercu-mono/ApercuMonoProRegular.ttf") format("truetype"); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Apercu Mono"; + src: url("/fonts/apercu-mono/ApercuMonoProMedium.ttf") format("truetype"); + font-weight: 500; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "Apercu Mono"; + src: url("/fonts/apercu-mono/ApercuMonoProBold.ttf") format("truetype"); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +pre, +code, +pre code, +.astro-code, +code[class*="language-"] { + font-family: "Apercu Mono", monospace !important; +} + +html, +body { + font-family: "Signifier", serif; +} + +header, +footer { + padding: 30px 20px; + font-size: 1.5em; + display: flex; + align-items: center; + justify-content: space-between; +} diff --git a/public/styles/index.css b/public/styles/index.css index 37005a5..888e2e7 100644 --- a/public/styles/index.css +++ b/public/styles/index.css @@ -1,165 +1,5 @@ -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-Thin.ttf") format("truetype"); - font-weight: 100; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-ThinItalic.ttf") format("truetype"); - font-weight: 100; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-Extralight.ttf") format("truetype"); - font-weight: 200; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-ExtralightItalic.ttf") format("truetype"); - font-weight: 200; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-Light.ttf") format("truetype"); +header h1 { font-weight: 300; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-LightItalic.ttf") format("truetype"); - font-weight: 300; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-Regular.ttf") format("truetype"); - font-weight: 400; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-RegularItalic.ttf") format("truetype"); - font-weight: 400; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-Medium.ttf") format("truetype"); - font-weight: 500; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-MediumItalic.ttf") format("truetype"); - font-weight: 500; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-Bold.ttf") format("truetype"); - font-weight: 700; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-BoldItalic.ttf") format("truetype"); - font-weight: 700; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-Black.ttf") format("truetype"); - font-weight: 900; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Signifier"; - src: url("/fonts/signifier/Signifier-BlackItalic.ttf") format("truetype"); - font-weight: 900; - font-style: italic; - font-display: swap; -} - -@font-face { - font-family: "Apercu Mono"; - src: url("/fonts/apercu-mono/ApercuMonoProLight.ttf") format("truetype"); - font-weight: 300; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Apercu Mono"; - src: url("/fonts/apercu-mono/ApercuMonoProRegular.ttf") format("truetype"); - font-weight: 400; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Apercu Mono"; - src: url("/fonts/apercu-mono/ApercuMonoProMedium.ttf") format("truetype"); - font-weight: 500; - font-style: normal; - font-display: swap; -} - -@font-face { - font-family: "Apercu Mono"; - src: url("/fonts/apercu-mono/ApercuMonoProBold.ttf") format("truetype"); - font-weight: 700; - font-style: normal; - font-display: swap; -} - -pre, -code, -pre code, -.astro-code, -code[class*="language-"] { - font-family: "Apercu Mono", monospace !important; -} - -html, -body { - font-family: "Signifier", serif; -} - -header, -footer { - padding: 30px 20px; - font-size: 1.5em; - display: flex; - align-items: center; - justify-content: space-between; + font-size: 2em; + /* letter-spacing: 0.05em; */ } diff --git a/src/components/TableOfContents.astro b/src/components/TableOfContents.astro deleted file mode 100644 index b567f49..0000000 --- a/src/components/TableOfContents.astro +++ /dev/null @@ -1,80 +0,0 @@ ---- -// Auto-generated TOC from MDX headings - Left sidebar -interface Props { - headings: Array<{ - depth: number; - slug: string; - text: string; - }>; -} - -const { headings } = Astro.props; - -// Filter to only show h1 and h2 -const tocHeadings = headings.filter((h) => h.depth <= 2); ---- - -{ - tocHeadings.length > 0 && ( - - ) -} - - diff --git a/src/content/config.ts b/src/content/config.ts index 8c75f2a..639dfe1 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -8,7 +8,6 @@ const base = z.object({ useD3: z.boolean().optional(), scripts: z.array(z.string()).optional(), redirect: z.string().optional(), - showToc: z.boolean().optional(), }); export const collections = { diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 9dff095..4627356 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -10,7 +10,7 @@ const { title, description = "barrett ruth's website" } = Astro.props; - + {title} diff --git a/src/layouts/PostLayout.astro b/src/layouts/PostLayout.astro index 82490bd..701a43e 100644 --- a/src/layouts/PostLayout.astro +++ b/src/layouts/PostLayout.astro @@ -1,6 +1,5 @@ --- import BaseLayout from "./BaseLayout.astro"; -import TableOfContents from "../components/TableOfContents.astro"; interface Props { frontmatter: { @@ -11,7 +10,6 @@ interface Props { useD3?: boolean; scripts?: string[]; category?: string; - showToc?: boolean; }; post?: { id?: string; @@ -26,13 +24,7 @@ interface Props { } const { frontmatter, headings = [] } = Astro.props as Props; -const { - title, - description, - useKatex = false, - useD3 = false, - showToc = false, -} = frontmatter; +const { title, description, useKatex = false, useD3 = false } = frontmatter; let documentTitle = title; --- @@ -54,14 +46,6 @@ let documentTitle = title; - { - showToc && ( - - ) - } -

{title}

diff --git a/src/pages/404.astro b/src/pages/404.astro index 426ecb1..1d9724d 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -2,24 +2,8 @@ import BaseLayout from "../layouts/BaseLayout.astro"; --- - -
-

404

+ +
+

404 - not found

- - diff --git a/src/pages/index.astro b/src/pages/index.astro index 5099726..88495e6 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,4 +3,7 @@ import BaseLayout from "../layouts/BaseLayout.astro"; const title = "barrett ruth"; --- - henlo +barrett ruth + +