webapp/src/main.astro

40 lines
981 B
Plaintext
Raw Normal View History

2022-09-09 11:53:35 +00:00
---
2022-11-13 09:25:31 +00:00
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
2022-09-09 11:53:35 +00:00
2022-09-24 10:34:57 +00:00
const lang = Astro.url.searchParams.get('lang') || 'ru'
2022-11-14 19:01:03 +00:00
console.log('[main.astro] astro runtime locale is', lang)
2022-09-24 10:34:57 +00:00
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')
2022-09-09 11:53:35 +00:00
---
2022-09-22 09:37:49 +00:00
<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,
}}
/>
2022-09-22 09:37:49 +00:00
</head>
<body>
<slot />
</body>
</html>
2022-09-23 18:27:05 +00:00