This commit is contained in:
29
src/layouts/BaseLayout.astro
Normal file
29
src/layouts/BaseLayout.astro
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
import { ClientRouter } from 'astro:transitions';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
description?: string;
|
||||
keywords?: string[];
|
||||
viewTransition?: boolean;
|
||||
}
|
||||
|
||||
const { title, description, keywords, viewTransition } = Astro.props;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en" transition:name="root" transition:animate="none">
|
||||
<head>
|
||||
{viewTransition && <ClientRouter />}
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<title>{title}</title>
|
||||
<meta name="og:title" content={title} />
|
||||
<meta name="description" content={description} />
|
||||
{keywords && <meta name="keywords" content={keywords.join(', ')} />}
|
||||
</head>
|
||||
<body>
|
||||
<slot />
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user