40 lines
981 B
Plaintext
40 lines
981 B
Plaintext
---
|
|
import { setLocale } from './stores/ui'
|
|
import './styles/app.scss'
|
|
import { t } from './utils/intl'
|
|
import { Seo } from "astro-seo-meta"
|
|
|
|
// Setting locale for prerendered content here
|
|
|
|
const lang = Astro.url.searchParams.get('lang') || 'ru'
|
|
console.log('[main.astro] astro runtime locale is', lang)
|
|
setLocale(lang)
|
|
const { protocol, host} = Astro.url
|
|
const title = Astro.props.title ?? t('Discours');
|
|
const imageUrl = Astro.props.imageUrl ?? `${protocol}${host}/public/bonfire.png`
|
|
const description = Astro.props.description ?? t('Horizontal collaborative journalistic platform')
|
|
---
|
|
<html lang={lang || 'ru'}>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width" />
|
|
<Seo
|
|
title={title}
|
|
icon="favicon.png"
|
|
facebook={{
|
|
image: imageUrl,
|
|
type: "website",
|
|
}}
|
|
twitter={{
|
|
image: imageUrl,
|
|
card: description,
|
|
}}
|
|
/>
|
|
</head>
|
|
<body>
|
|
<slot />
|
|
</body>
|
|
</html>
|
|
|
|
|