From dd298c9a74e081436d0c617601b7ef1f57afb2e2 Mon Sep 17 00:00:00 2001 From: Mark Teekman Date: Tue, 26 Dec 2023 13:40:02 +0100 Subject: [PATCH] Add View Transitions as an example --- src/components/Header.astro | 1 - src/components/Navigation.astro | 286 ++++++++++++++++---------------- src/components/SiteMeta.astro | 4 + src/layouts/DefaultLayout.astro | 2 +- 4 files changed, 148 insertions(+), 145 deletions(-) diff --git a/src/components/Header.astro b/src/components/Header.astro index 233da03..8da7be6 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -51,7 +51,6 @@ import { Icon } from 'astro-icon' path { fill: var(--action-color); - transition: fill 0.2s ease-in-out; } } diff --git a/src/components/Navigation.astro b/src/components/Navigation.astro index 8aba2e5..ec44078 100644 --- a/src/components/Navigation.astro +++ b/src/components/Navigation.astro @@ -1,8 +1,8 @@ --- import ResponsiveToggle from './ResponsiveToggle.astro' import { DarkMode } from 'accessible-astro-components' -import { Image } from "astro:assets" -import logo from "../assets/img/logo.svg" +import { Image } from 'astro:assets' +import logo from '../assets/img/logo.svg' --- @@ -272,7 +274,6 @@ import logo from "../assets/img/logo.svg" text-decoration: none; font-size: 1.125rem; line-height: 1.6875rem; - transition: color 0.15s ease-in-out; } a:hover, @@ -386,7 +387,6 @@ import logo from "../assets/img/logo.svg" svg path { fill: var(--action-color); - transition: fill 0.2s ease-in-out; } &:hover { diff --git a/src/components/SiteMeta.astro b/src/components/SiteMeta.astro index e88029f..2a0665f 100644 --- a/src/components/SiteMeta.astro +++ b/src/components/SiteMeta.astro @@ -1,4 +1,6 @@ --- +import { ViewTransitions } from 'astro:transitions' + const { title, description, url, image, author } = Astro.props let subtitle = 'Accessible Astro Starter' @@ -20,3 +22,5 @@ let subtitle = 'Accessible Astro Starter' {title} - {subtitle} + + diff --git a/src/layouts/DefaultLayout.astro b/src/layouts/DefaultLayout.astro index bf182cf..2290c34 100644 --- a/src/layouts/DefaultLayout.astro +++ b/src/layouts/DefaultLayout.astro @@ -35,7 +35,7 @@ const {
-
+