71 lines
2.6 KiB
Plaintext
71 lines
2.6 KiB
Plaintext
---
|
|
import "@/style/globals.css";
|
|
|
|
import { ClientRouter } from "astro:transitions";
|
|
|
|
import Header from "@/components/header";
|
|
import Footer from "@/components/footer";
|
|
import Background from "@/components/background";
|
|
import ThemeSwitcher from "@/components/theme-switcher";
|
|
import AnimationSwitcher from "@/components/animation-switcher";
|
|
import VercelAnalytics from "@/components/analytics";
|
|
import MobileNav from "@/components/mobile-nav";
|
|
import { THEME_LOADER_SCRIPT, THEME_NAV_SCRIPT } from "@/lib/themes/loader";
|
|
import { ANIMATION_LOADER_SCRIPT, ANIMATION_NAV_SCRIPT } from "@/lib/animations/loader";
|
|
|
|
export interface Props {
|
|
title: string;
|
|
description: string;
|
|
}
|
|
|
|
const { title, description } = Astro.props;
|
|
const ogImage = "https://timmypidashev.dev/og-image.jpg";
|
|
---
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<title>{title}</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width" />
|
|
<meta property="og:image" content={ogImage} />
|
|
<meta property="og:image:width" content="1200" />
|
|
<meta property="og:image:height" content="630" />
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
<meta name="twitter:image" content={ogImage} />
|
|
<meta name="twitter:description" content={description} />
|
|
<meta name="description" content={description} />
|
|
<meta property="og:description" content={description} />
|
|
<link rel="icon" type="image/jpeg" href="/me.jpeg" />
|
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
|
<ClientRouter />
|
|
<script is:inline>
|
|
if (window.innerWidth < 1024 || navigator.maxTouchPoints > 0) {
|
|
document.addEventListener('click', function(e) {
|
|
var a = e.target.closest('a[href]');
|
|
if (a && a.href && !a.target && a.origin === location.origin) {
|
|
e.preventDefault();
|
|
e.stopPropagation();
|
|
window.location.href = a.href;
|
|
}
|
|
}, true);
|
|
}
|
|
</script>
|
|
<script is:inline set:html={THEME_LOADER_SCRIPT} />
|
|
<script is:inline set:html={ANIMATION_LOADER_SCRIPT} />
|
|
</head>
|
|
<body class="bg-background text-foreground overflow-hidden h-screen">
|
|
<Header client:load transparent />
|
|
<main>
|
|
<Background layout="index" client:only="react" transition:persist />
|
|
<slot />
|
|
</main>
|
|
<Footer client:load transition:persist fixed=true />
|
|
<ThemeSwitcher client:only="react" transition:persist />
|
|
<AnimationSwitcher client:only="react" transition:persist />
|
|
<VercelAnalytics client:load />
|
|
<MobileNav client:load transparent />
|
|
<script is:inline set:html={THEME_NAV_SCRIPT} />
|
|
<script is:inline set:html={ANIMATION_NAV_SCRIPT} />
|
|
</body>
|
|
</html>
|