feat: add ViewTransitions from Astro

Integrate ViewTransitions API from Astro v3.

resolve #96
This commit is contained in:
satnaing
2023-09-14 14:00:08 +06:30
committed by Sat Naing
parent e486687610
commit cbdaa59bae
11 changed files with 103 additions and 35 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import Header from "@components/Header.astro";
import Footer from "@components/Footer.astro";
import LinkButton from "@components/LinkButton.astro";
import Hr from "@components/Hr.astro";
import Card from "@components/Card";
import Card from "@components/Card.astro";
import Socials from "@components/Socials.astro";
import getSortedPosts from "@utils/getSortedPosts";
import slugify from "@utils/slugify";
+4 -2
View File
@@ -4,7 +4,7 @@ import Layout from "@layouts/Layout.astro";
import Main from "@layouts/Main.astro";
import Header from "@components/Header.astro";
import Footer from "@components/Footer.astro";
import Card from "@components/Card";
import Card from "@components/Card.astro";
import getUniqueTags from "@utils/getUniqueTags";
import getPostsByTag from "@utils/getPostsByTag";
import slugify from "@utils/slugify";
@@ -41,9 +41,11 @@ const sortTagsPost = getSortedPosts(tagPosts);
<Layout title={`Tag:${tag} | ${SITE.title}`}>
<Header activeNav="tags" />
<Main
pageTitle={`Tag:${tag}`}
pageTitle={[`Tag:`, `${tag}`]}
titleTransition={tag}
pageDesc={`All the articles with the tag "${tag}".`}
>
<h1 slot="title" transition:name={tag}>{`Tag:${tag}`}</h1>
<ul>
{
sortTagsPost.map(({ data }) => (