Merge pull request #4 from deployn/beta

Beta
This commit is contained in:
deployn 2024-03-08 23:42:33 +01:00 committed by GitHub
commit c1c7fa9d88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 21 additions and 3 deletions

View File

@ -1,3 +1,17 @@
# [1.22.0-beta.2](https://github.com/deployn/astro-deploy/compare/v1.22.0-beta.1...v1.22.0-beta.2) (2024-03-08)
### Features
* **blog:** transition blogpost titles ([aece417](https://github.com/deployn/astro-deploy/commit/aece417bff6717db76e7db95d20f4fe222b3b4eb))
# [1.22.0-beta.1](https://github.com/deployn/astro-deploy/compare/v1.21.0...v1.22.0-beta.1) (2024-03-08)
### Features
* add view transitions ([769ccc4](https://github.com/deployn/astro-deploy/commit/769ccc451cdb99d7091d4a8951044b1336426fbe))
# [1.21.0](https://github.com/deployn/astro-deploy/compare/v1.20.0...v1.21.0) (2024-03-08) # [1.21.0](https://github.com/deployn/astro-deploy/compare/v1.20.0...v1.21.0) (2024-03-08)

View File

@ -1,7 +1,7 @@
{ {
"name": "astro-deploy", "name": "astro-deploy",
"type": "module", "type": "module",
"version": "1.21.0", "version": "1.22.0-beta.2",
"description": "A custom Astro.js template", "description": "A custom Astro.js template",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@ -1,4 +1,5 @@
--- ---
import { ViewTransitions } from 'astro:transitions';
import '@/styles/globals.css'; import '@/styles/globals.css';
import Header from '@/components/layout/Header.astro'; import Header from '@/components/layout/Header.astro';
import Footer from '@/components/layout/Footer.astro'; import Footer from '@/components/layout/Footer.astro';
@ -21,6 +22,7 @@ const { title, description } = Astro.props as Props;
<link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png" /> <link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png" />
<link rel="manifest" href="/site.webmanifest" /> <link rel="manifest" href="/site.webmanifest" />
<link rel="sitemap" href="/sitemap-index.xml" /> <link rel="sitemap" href="/sitemap-index.xml" />
<ViewTransitions />
</head> </head>
<body class="flex min-h-screen flex-col dark:bg-secondary"> <body class="flex min-h-screen flex-col dark:bg-secondary">
<Header /> <Header />

View File

@ -18,7 +18,9 @@ const allBlogposts = await getCollection('blog');
{ {
allBlogposts.map((post) => ( allBlogposts.map((post) => (
<div class="flex flex-col space-y-4"> <div class="flex flex-col space-y-4">
<h2 class="text-lg font-semibold text-zinc-800 hover:text-zinc-600 dark:text-zinc-200 dark:hover:text-zinc-400 sm:text-xl"> <h2
transition:name={post.data.title}
class="text-lg font-semibold text-zinc-800 hover:text-zinc-600 dark:text-zinc-200 dark:hover:text-zinc-400 sm:text-xl">
<a href={`/blog/${post.slug}/`}>{post.data.title}</a> <a href={`/blog/${post.slug}/`}>{post.data.title}</a>
</h2> </h2>
<p class="text-sm leading-relaxed text-zinc-600 dark:text-zinc-400"> <p class="text-sm leading-relaxed text-zinc-600 dark:text-zinc-400">

View File

@ -27,7 +27,7 @@ const descriptionMeta =
<BaseLayout title={title} description={descriptionMeta}> <BaseLayout title={title} description={descriptionMeta}>
<div class="container prose mx-auto px-4 py-16 dark:prose-invert lg:px-8 lg:py-32 xl:max-w-7xl"> <div class="container prose mx-auto px-4 py-16 dark:prose-invert lg:px-8 lg:py-32 xl:max-w-7xl">
<h1 class="text-4xl font-bold">{title}</h1> <h1 transition:name={title} class="text-4xl font-bold">{title}</h1>
<Content components={components} /> <Content components={components} />
</div> </div>
</BaseLayout> </BaseLayout>