blog/src/layouts/Layout.astro
radishzzz 804cf72052 chore: update dependencies, enhance theme configuration, and improve layout structure
- Bump versions of several dependencies including @astrojs/mdx, astro, and vite.
- Refactor theme configuration to include code themes for light and dark modes.
- Update layout structure for better responsiveness and clarity.
- Enable JavaScript in TypeScript configuration for broader compatibility.
- Add new font styles and improve font-face definitions.
- Clean up unused imports and commented-out code in index.astro.
- Introduce global type definitions for Attributify attributes in JSX.
2025-01-21 21:21:24 +00:00

32 lines
758 B
Text

---
import Head from '@/components/Head.astro'
import ThemeToggle from '@/components/ThemeToggle.astro'
import themeConfig from '@/config'
import '@/styles/global.css'
interface Props {
postTitle?: string
postDescription?: string
postImage?: string
}
const { postTitle, postDescription, postImage } = Astro.props
const fontStyle = `font-${themeConfig.global.font}`
const colorMode = themeConfig.color.mode
---
<html lang={Astro.currentLocale || 'en-US'} class={`${fontStyle} ${colorMode}`}>
<head>
<Head {postTitle} {postDescription} {postImage} />
</head>
<body>
<ThemeToggle />
<main
class="mx-a max-w-123rem h-dvh"
lg="grid gap-x-6 cols-[3fr_1fr] rows-[1fr_9rem]"
>
<slot />
</main>
</body>
</html>