From 1174b7cf8ae728c2baad0a434f91f4fcd7071406 Mon Sep 17 00:00:00 2001 From: Mark Teekman Date: Tue, 26 Dec 2023 13:39:27 +0100 Subject: [PATCH 1/2] Update Astro to 4.0 and update dependencies --- README.md | 2 ++ package.json | 12 ++++++------ src/pages/index.astro | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7f06a82..db07894 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Accessible Astro Starter is a ready to use, SEO and a11y friendly blogging theme ## ♿ (Accessibility) Features +- Astro 4.0 - Tailwind CSS support - Prettier integration with `prettier-plugin-astro` and `prettier-plugin-tailwind` - ESLint integration with strict accessibility settings for `eslint-plugin-jsx-a11y` @@ -30,6 +31,7 @@ Accessible Astro Starter is a ready to use, SEO and a11y friendly blogging theme - `prefers-reduced-motion` disables animations for users that have this preference turned on - Ships with many components such as Accordions, Breadcrumbs, Modals, Pagination [and many more](https://accessible-astro.dev/accessible-components) - A collection of utility classes such as breakpoints, button classes, font settings, resets and outlines in `src/assets/scss/base` +- View Transitions (⚠️ see [astro-docs](https://docs.astro.build/en/guides/view-transitions/#accessibility) for accessibility considerations) ## 🚀 Getting started diff --git a/package.json b/package.json index 3e6bd12..4acf958 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "accessible-astro-starter", "description": "An Accessible Starter Theme for Astro including several accessibility features and tools to help you build faster.", - "version": "3.0.3", + "version": "3.1.0", "author": "Mark Teekman", "homepage": "https://accessible-astro.netlify.app/", "scripts": { @@ -11,13 +11,13 @@ "preview": "astro preview" }, "devDependencies": { - "@astrojs/mdx": "^1.0.2", - "@astrojs/partytown": "^2.0.0", - "@astrojs/tailwind": "^5.0.0", + "@astrojs/mdx": "^2.0.2", + "@astrojs/partytown": "^2.0.2", + "@astrojs/tailwind": "^5.0.4", "@typescript-eslint/eslint-plugin": "^5.50.0", "@typescript-eslint/parser": "^5.50.0", - "accessible-astro-components": "^2.3.0", - "astro": "^3.0.10", + "accessible-astro-components": "^2.3.3", + "astro": "^4.0.7", "astro-compress": "^2.0.6", "astro-icon": "^0.7.3", "eslint": "^8.33.0", diff --git a/src/pages/index.astro b/src/pages/index.astro index 84eb36a..7bcd5e1 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -59,11 +59,11 @@ import ContentMedia from '../components/ContentMedia.astro' reaching WCAG AA compliance.

-
+

Counters

- + From dd298c9a74e081436d0c617601b7ef1f57afb2e2 Mon Sep 17 00:00:00 2001 From: Mark Teekman Date: Tue, 26 Dec 2023 13:40:02 +0100 Subject: [PATCH 2/2] 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 {
-
+