Files
archtika/web-app/src/lib/templates/common/Head.svelte

27 lines
636 B
Svelte
Raw Normal View History

2024-08-20 19:17:05 +02:00
<script lang="ts">
2024-08-25 16:31:12 +02:00
const {
title,
favicon,
2024-09-07 16:45:20 +02:00
nestingLevel = 0,
metaDescription = null
}: {
title: string;
favicon: string;
nestingLevel?: number;
metaDescription?: string | null;
2024-09-07 16:45:20 +02:00
} = $props();
2024-08-20 19:17:05 +02:00
</script>
<svelte:head>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{title}</title>
2024-09-07 16:45:20 +02:00
<meta name="description" content={metaDescription ?? title} />
2024-08-20 19:17:05 +02:00
<link rel="stylesheet" href={`${"../".repeat(nestingLevel)}styles.css`} />
2024-08-25 16:31:12 +02:00
{#if favicon}
<link rel="icon" href={favicon} />
{/if}
2024-08-20 19:17:05 +02:00
</head>
</svelte:head>