---
import '../styles/app.scss'
import { useStore } from '@nanostores/solid'
import { Suspense } from 'solid-js'
import { Header } from '../components/Nav/Header'
import { locale as langstore } from '../stores/ui'
import { router } from '../stores/router'
import { t } from '../utils/intl'

const { title } = Astro.params
const locale = useStore(langstore)
router.open(Astro.url.pathname) // mb doesn't work!
---

<html lang={locale() || 'ru'}>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <link rel="icon" type="image/png" href="/favicon.png" />
    <title>{t('Discours') + ':' + title}</title>
  </head>
  <body>
    <main class="content">
      <Suspense>
        <Header />
        <slot />
      </Suspense>
    </main>
  </body>
</html>
