blog/src/layouts/Layout.astro
radishzzz b46534419b feat: add language switcher component and update layout
- Introduced a new LanguageSwitcher component to facilitate language switching in the application.
- Added an SVG icon for the language switcher button.
- Updated the Header component to adjust margin for better spacing.
- Modified the Navigation component's margin and top properties for improved layout.
- Adjusted the ThemeToggle button size for consistency with the new design.
2025-01-24 10:11:56 +00:00

53 lines
1.4 KiB
Text

---
import Footer from '@/components/Footer.astro'
import Header from '@/components/Header.astro'
import LanguageSwitcher from '@/components/LanguageSwitcher.astro'
import Navigation from '@/components/Navigation.astro'
import PhotoSwipe from '@/components/PhotoSwipe.astro'
import Scrollbar from '@/components/Scrollbar.astro'
import ThemeToggle from '@/components/ThemeToggle.astro'
import themeConfig from '@/config'
import Head from '@/layouts/Head.astro'
import '@/styles/global.css'
import '@/styles/photoswipe.css'
interface Props {
postTitle?: string
postDescription?: string
postImage?: string
}
const { postTitle, postDescription, postImage } = Astro.props
const fontStyle = `font-${themeConfig.global.font}`
---
<html
lang={Astro.currentLocale || 'en-US'}
class:list={[fontStyle]}
data-overlayscrollbars-initialize
>
<Head {postTitle} {postDescription} {postImage} />
<body data-overlayscrollbars-initialize>
<div
class="mx-a max-w-492 h-dvh"
p="x-[calc(9.94vw-1.1784rem)] y-[calc(5.42vw+2.4488rem)] lg:(x-36 y-10.4167dvh)"
lg="grid cols-[1fr_22rem] rows-1 gap-[min(calc(16.8269vw-6.2727rem),18rem)]"
>
<div>
<Header />
<Navigation />
<Footer />
</div>
<main class="col-start-1 row-start-1">
<slot />
</main>
</div>
<ThemeToggle />
<LanguageSwitcher />
<Scrollbar />
<PhotoSwipe />
</body>
</html>