Skip to content

Commit faab603

Browse files
committed
use transition only outside homepage
1 parent f2883c9 commit faab603

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/Header/Header.astro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import ThemeModeToggle from "./ThemeModeToggle"
88
import GithubSvg from "~/assets/svgs/header/github.svg?raw"
99
// import LanguageSelector from "./LanguageSelector/index.tsx"
1010
import LanguageSelector from "./LanguageSelector/LanguageSelector.astro"
11-
import { ViewTransitions } from "astro:transitions"
1211
1312
import { localizePath } from "astro-i18next"
1413
import i18next from "i18next"
@@ -34,7 +33,6 @@ const section = frontmatter?.section ?? ""
3433
height="0"
3534
width="0"
3635
style="display:none;visibility:hidden"></iframe> --><!-- End Google Tag Manager (noscript) --><!-- Google tag (gtag.js) -->
37-
<ViewTransitions />
3836
<script async src="https://www.googletagmanager.com/gtag/js?id=G-56SBDN1LL2"></script>
3937
<script>
4038
window.dataLayer = window.dataLayer || []

src/layouts/MainLayout.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import * as CONFIG from "../config"
99
// import { NewsletterCTA } from "../components/Footer/NewsletterCTA.tsx"
1010
import Footer from "~/components/Footer/Footer.astro"
1111
import { changeLanguage } from "i18next"
12+
import { ViewTransitions } from "astro:transitions"
1213
1314
const { content = {}, frontmatter } = Astro.props
1415
// Astro.props?.headings is for .mdx pages, Astro.props?.content?.astro.headings is for .md pages
@@ -30,6 +31,7 @@ changeLanguage(content.lang)
3031

3132
<html transition:animate="none" dir={content.dir ?? "ltr"} lang={content.lang ?? "en-us"} class="initial">
3233
<head>
34+
<ViewTransitions />
3335
<HeadCommon />
3436
<HeadSEO {content} {canonicalURL} />
3537
<title>{formattedContentTitle}</title>

0 commit comments

Comments
 (0)