mirror of
https://github.com/sergeyyarkov/yarkov.tech.git
synced 2026-10-11 10:29:21 +03:00
83 lines
2.3 KiB
Plaintext
83 lines
2.3 KiB
Plaintext
---
|
|
import "@styles/global.scss";
|
|
import siteconfig from "siteconfig.json";
|
|
import { SITE_METADATA } from "@root/constants";
|
|
import YaMetrika from "./Analytics/YaMetrika.astro";
|
|
import { useTranslation } from "@root/i18n/utils";
|
|
|
|
export interface Props {
|
|
title?: string;
|
|
description?: string;
|
|
image?: string;
|
|
}
|
|
|
|
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
|
|
const { title, description } = Astro.props;
|
|
const isDev = import.meta.env.DEV;
|
|
const t = useTranslation(Astro);
|
|
---
|
|
|
|
<head>
|
|
<!-- Fonts -->
|
|
<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'"
|
|
/>
|
|
|
|
<!-- Canonical URL -->
|
|
<link rel="canonical" href={canonicalURL.href} />
|
|
|
|
<!-- Base metadata -->
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>{title || SITE_METADATA.title}</title>
|
|
|
|
<!-- Metadata -->
|
|
<meta name="title" content={title || SITE_METADATA.title} />
|
|
<meta name="generator" content={Astro.generator} />
|
|
<meta name="description" content={description || t("site.description")} />
|
|
<meta name="theme-color" content={SITE_METADATA.themeColor} />
|
|
<meta name="msapplication-TileColor" content="#da532c" />
|
|
|
|
<!-- Favicons -->
|
|
<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" />
|
|
<slot />
|
|
<script is:inline src="/assets/js/detect-theme.js"></script>
|
|
<script src="../quicklink.js"></script>
|
|
{!isDev && siteconfig?.ymCounter && <YaMetrika counter={siteconfig.ymCounter} />}
|
|
</head>
|