From f7d2471bb9a589953c0fb14bd9218b375acbeb3c Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Sat, 25 Feb 2023 20:29:17 +0100 Subject: [PATCH] feat(astro): finish header and footer styling --- .cspell/dictionary.txt | 1 - src/components/Backlink.astro | 4 +-- src/components/Headline.svelte | 12 ++++++++ src/components/Legal.astro | 10 +++---- src/components/MainNavigation.astro | 14 ++++------ src/components/PageFooter.astro | 11 ++++++-- src/components/PageHeader.astro | 5 +--- src/components/PageTitle.svelte | 10 +++++++ src/components/RSSLink.astro | 15 ++++++++++ src/components/SocialLinks.astro | 2 +- src/components/Subheadline.svelte | 12 ++++++++ src/components/Subnavigation.astro | 40 ++++++++++++++++++++++++++ src/components/Subsubheadline.svelte | 12 ++++++++ src/components/ThemeToggle.astro | 4 +-- src/components/UpLink.astro | 4 +-- src/data/navigation.json | 4 --- src/data/subnavigation.json | 42 ++++++++++++++++++++++++++++ tailwind.config.cjs | 3 +- 18 files changed, 170 insertions(+), 35 deletions(-) create mode 100644 src/components/Headline.svelte create mode 100644 src/components/PageTitle.svelte create mode 100644 src/components/RSSLink.astro create mode 100644 src/components/Subheadline.svelte create mode 100644 src/components/Subnavigation.astro create mode 100644 src/components/Subsubheadline.svelte create mode 100644 src/data/subnavigation.json diff --git a/.cspell/dictionary.txt b/.cspell/dictionary.txt index 4417fc4..a1d8cce 100644 --- a/.cspell/dictionary.txt +++ b/.cspell/dictionary.txt @@ -10,7 +10,6 @@ crossorigin cssnano evenodd favicons -halfcolumn linejoin lucida menlo diff --git a/src/components/Backlink.astro b/src/components/Backlink.astro index 9621528..397f55d 100644 --- a/src/components/Backlink.astro +++ b/src/components/Backlink.astro @@ -11,12 +11,12 @@ const { backLink } = Astro.props; { backLink && ( diff --git a/src/data/navigation.json b/src/data/navigation.json index 7c5c807..3f9d19a 100644 --- a/src/data/navigation.json +++ b/src/data/navigation.json @@ -10,9 +10,5 @@ { "title": "Journal", "url": "/journal/" - }, - { - "title": "Projects", - "url": "/projects/" } ] diff --git a/src/data/subnavigation.json b/src/data/subnavigation.json new file mode 100644 index 0000000..f0969d1 --- /dev/null +++ b/src/data/subnavigation.json @@ -0,0 +1,42 @@ +{ + "main": [ + { + "title": "About", + "url": "/about/" + }, + { + "title": "Journal", + "url": "/journal/" + }, + { + "title": "Projects", + "url": "/projects/" + }, + { + "title": "Sketchnotes", + "url": "/sketchnotes/" + }, + { + "title": "Haiku", + "url": "/haiku/" + } + ], + "misc": [ + { + "title": "Colophon", + "url": "/colophon/" + }, + { + "title": "Tools", + "url": "/tools/" + }, + { + "title": "Now", + "url": "/now/" + }, + { + "title": "Imprint", + "url": "/imprint/" + } + ] +} diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 2dc9c81..d5f8991 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -40,7 +40,7 @@ module.exports = { 18: 'repeat(18, minmax(0, 1fr))', // --grid-fullsize }, gridTemplateRows: ({ theme }) => ({ - layout: `clamp(3rem, ${theme('spacing.layout')}, 9rem)`, + layout: `clamp(3rem, ${theme('spacing.column')}, 9rem)`, }), columns: { 13: '13', @@ -107,7 +107,6 @@ module.exports = { 19: 'clamp(7.43rem, 15.9vw, 8.916rem)', // --space-19 20: 'clamp(8.916rem, 19.08vw, 10.699rem)', // --space-20 column: '5.55vw', // --space-55 TODO: new name, e.g. spacing-grid - halfcolumn: '2.775vw', layout: 'clamp(1.5rem, 5.55vw, 4.5rem)', icon: '24px', 'icon-small': '20px',