From 0ca3dd52f012c71d90a96ed0594fde0f9c8eae27 Mon Sep 17 00:00:00 2001 From: Mark Teekman Date: Sat, 18 Apr 2026 14:06:05 +0200 Subject: [PATCH 01/12] refactor: update SCSS import paths across multiple components --- src/components/CallToAction.astro | 2 +- src/components/ColorContrast.astro | 2 +- src/components/Feature.astro | 2 +- src/components/Header.astro | 2 +- src/components/Navigation.astro | 4 ++-- src/components/ResponsiveToggle.astro | 2 +- src/layouts/DefaultLayout.astro | 2 +- src/pages/accessible-components.astro | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/CallToAction.astro b/src/components/CallToAction.astro index 410748e6..5526b999 100644 --- a/src/components/CallToAction.astro +++ b/src/components/CallToAction.astro @@ -43,7 +43,7 @@ const { +` +} + +export function createNavigation(includeLauncher: boolean): string { + return `--- +import ResponsiveToggle from './ResponsiveToggle.astro' +import NavigationItems from './NavigationItems.astro' +import Logo from './Logo.astro' +${includeLauncher ? "import { LauncherTrigger } from 'accessible-astro-launcher'" : ''} +--- + + + + + + +` +} + +export function createNavigationItems(includeLauncher: boolean): string { + return `--- +import themeConfig from '@theme-config' +import { Link, DarkMode } from 'accessible-astro-components' +${includeLauncher ? "import { LauncherTrigger } from 'accessible-astro-launcher'" : ''} +import { Icon } from 'astro-icon/components' + +const currentPathname = Astro.url.pathname + +const isCurrentPage = (href: string): boolean => { + if (href === '/') { + return currentPathname === '/' + } + + return currentPathname.startsWith(href) +} +--- + + +` +} + +export function createHero(options: Pick): string { + const [firstWord = '', ...remainingWords] = options.siteName.trim().split(/\s+/) + const remainingTitle = remainingWords.length > 0 ? ` ${escapeForSingleQuotedString(remainingWords.join(' '))}` : '' + const description = + options.preset === 'blog' + ? 'A clean, accessible blog starter with a contact flow and room to shape your editorial voice.' + : options.preset === 'portfolio' + ? 'Showcase your work with accessible project pages, content collections, and a simple contact flow.' + : 'A flexible starting point for publishing content, sharing work, and building accessibly with Astro.' + const notification = + options.preset === 'blog' + ? ` + +

Update the blog routes, data source, and homepage copy to match how you want to publish content.

+
` + : options.preset === 'portfolio' + ? ` + +

Swap the placeholder project content for your own case studies and update the tags to match your work.

+
` + : '' + const actions = + options.preset === 'blog' + ? `Browse posts` + : options.preset === 'portfolio' + ? `View projects` + : ` +