diff --git a/SITE-ARCHITECTURE.md b/SITE-ARCHITECTURE.md index b3f8195fe..474c2481f 100644 --- a/SITE-ARCHITECTURE.md +++ b/SITE-ARCHITECTURE.md @@ -297,9 +297,10 @@ Replaces the default anchor element to enable MkDocs-style relative linking. Res These override default Starlight components: -- **`Head.astro`**: Adds Mermaid diagram support by transforming code blocks with `language="mermaid"` into rendered diagrams. +- **`Head.astro`**: Adds Mermaid diagram support and loads `SiteScripts` (Shortbread + WebSDK). - **`Header.astro`**: Custom header with navigation tabs and theme-aware logos (see [Header Navigation](#header-navigation) below). - **`MarkdownContent.astro`**: Injects the custom frontmatter banners (experimental, community, languages) at the top of page content. +- **`PageFrame.astro`**: Extends Starlight's default `PageFrame` to add a full-width site footer containing the `Copyright` component. The footer spans the content area (respecting sidebar offset) with `--sl-color-bg-nav` background to match the header. - **`Sidebar.astro`** and **`SidebarSublist.astro`**: Custom sidebar navigation that mimics MkDocs Material theme's `navigation.sections` behavior. #### Sidebar Navigation Style @@ -579,6 +580,7 @@ The landing page uses a custom layout that provides the Starlight header without - Mocks `Astro.locals.starlightRoute` with minimal data needed for the Header component - Mocks `Astro.locals.t` translation function (with `.all()` method for Search component) - Loads Figtree font from Google Fonts for landing page typography +- Includes `SiteScripts` for Shortbread consent and WebSDK **Usage:** ```astro @@ -598,6 +600,7 @@ The main landing page includes: - Hero section with frosted glass effect - Feature cards that expand on hover to show descriptions - Testimonials slider with fade transitions and auto-play +- Footer with `Copyright` component (left-aligned, `--sl-color-bg-nav` background) **Assets:** - `src/assets/curve-primary.svg` and `src/assets/curve-secondary.svg` - Animated strand patterns diff --git a/astro.config.mjs b/astro.config.mjs index c5b295ab4..e10b89438 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -70,6 +70,7 @@ export default defineConfig({ Header: './src/components/overrides/Header.astro', MarkdownContent: './src/components/overrides/MarkdownContent.astro', Sidebar: './src/components/overrides/Sidebar.astro', + PageFrame: './src/components/overrides/PageFrame.astro', }, }), astroBrokenLinksChecker({ diff --git a/src/components/Copyright.astro b/src/components/Copyright.astro new file mode 100644 index 000000000..b4594807e --- /dev/null +++ b/src/components/Copyright.astro @@ -0,0 +1,34 @@ +--- +/** + * AWS legal footer links and copyright notice. + * Used in PageFrame.astro (docs pages) and index.astro (landing page). + */ +--- + +
+ Privacy + | + Site Terms + | + Cookie Preferences + | + © 2026, Amazon Web Services, Inc. or its affiliates. All rights reserved. +
+ + diff --git a/src/components/SiteScripts.astro b/src/components/SiteScripts.astro new file mode 100644 index 000000000..0807e3179 --- /dev/null +++ b/src/components/SiteScripts.astro @@ -0,0 +1,84 @@ +--- +/** + * AWS Shortbread cookie consent and Analytics WebSDK initialization. + * Included in both Head.astro (docs pages) and LandingLayout.astro (index page). + */ +--- + + + + diff --git a/src/components/overrides/Head.astro b/src/components/overrides/Head.astro index 40ebc8b9a..7f9f59df8 100644 --- a/src/components/overrides/Head.astro +++ b/src/components/overrides/Head.astro @@ -1,8 +1,10 @@ --- /** - * Custom Head override to add Mermaid diagram support and favicon. + * Custom Head override to add Mermaid diagram support, favicon, and AWS Shortbread cookie consent. * See ARCHITECTURE.md for details. */ +import SiteScripts from '../SiteScripts.astro' + const { head } = Astro.locals.starlightRoute // Get base path for favicon @@ -15,6 +17,9 @@ const faviconHref = base.endsWith('/') ? `${base}favicon.svg` : `${base}/favicon + +