mirror of
https://github.com/sergeyyarkov/yarkov.tech.git
synced 2026-10-11 10:29:21 +03:00
42 lines
1.8 KiB
Plaintext
42 lines
1.8 KiB
Plaintext
---
|
|
import { SITE_METADATA } from "@root/config";
|
|
import { useTranslation } from "@i18n/utils";
|
|
|
|
export interface Props {
|
|
title?: string | undefined;
|
|
description?: string | undefined;
|
|
canonicalUrl?: string | undefined;
|
|
}
|
|
|
|
const t = useTranslation(Astro);
|
|
const { title = SITE_METADATA.title, description, canonicalUrl } = Astro.props as Props;
|
|
---
|
|
|
|
<head>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono&display=swap"
|
|
rel="preload"
|
|
as="style"
|
|
onload="this.rel='stylesheet'"
|
|
/>
|
|
{canonicalUrl && <link rel="canonical" href={canonicalUrl} />}
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>{title}</title>
|
|
<meta name="title" content={title} />
|
|
<meta name="description" content={description || t("site.description")} />
|
|
<meta name="theme-color" content={SITE_METADATA.themeColor} />
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-light-32x32.png" media="(prefers-color-scheme: light)" />
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-light-16x16.png" media="(prefers-color-scheme: light)" />
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-dark-32x32.png" media="(prefers-color-scheme: dark)" />
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-dark-16x16.png" media="(prefers-color-scheme: dark)" />
|
|
<link rel="manifest" href="/site.webmanifest" />
|
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
|
|
<meta name="msapplication-TileColor" content="#da532c" />
|
|
<slot />
|
|
<script is:inline src="/assets/js/detect-theme.js"></script>
|
|
</head>
|