mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-22 18:21:33 +08:00
feat: 修改宽度
This commit is contained in:
@ -11,14 +11,21 @@ import icon from 'astro-icon'
|
||||
|
||||
import vercel from '@astrojs/vercel/serverless'
|
||||
|
||||
import react from '@astrojs/react';
|
||||
import react from '@astrojs/react'
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: 'https://example.me',
|
||||
integrations: [expressiveCode(expressiveCodeOptions), tailwind({
|
||||
site: 'https://blog.kazoottt.top',
|
||||
integrations: [
|
||||
expressiveCode(expressiveCodeOptions),
|
||||
tailwind({
|
||||
applyBaseStyles: false
|
||||
}), sitemap(), mdx(), icon(), react()],
|
||||
}),
|
||||
sitemap(),
|
||||
mdx(),
|
||||
icon(),
|
||||
react()
|
||||
],
|
||||
markdown: {
|
||||
remarkPlugins: [remarkUnwrapImages, remarkReadingTime],
|
||||
rehypePlugins: [
|
||||
|
@ -25,7 +25,7 @@ const {
|
||||
<body class='flex justify-center bg-background'>
|
||||
<ThemeProvider />
|
||||
<main
|
||||
class='flex min-h-screen w-screen max-w-[60rem] flex-col items-center px-6 pb-10 pt-7 font-satoshi text-[0.92rem] leading-relaxed sm:px-10 lg:px-10'
|
||||
class='flex min-h-screen w-screen max-w-[70rem] flex-col items-center px-6 pb-10 pt-7 font-satoshi text-[0.92rem] leading-relaxed sm:px-10 lg:px-10'
|
||||
>
|
||||
<Header />
|
||||
<slot />
|
||||
|
@ -4,7 +4,6 @@ import type { CollectionEntry } from 'astro:content'
|
||||
import BlogHero from '@/components/blog/Hero.astro'
|
||||
import TOC from '@/components/blog/TOC.astro'
|
||||
import Button from '@/components/Button.astro'
|
||||
|
||||
import PageLayout from './BaseLayout.astro'
|
||||
|
||||
interface Props {
|
||||
@ -44,7 +43,9 @@ const { headings } = await post.render()
|
||||
<article class='flex-1 flex-grow break-words' data-pagefind-body>
|
||||
<div id='blog-hero'><BlogHero content={post} /></div>
|
||||
<div
|
||||
id='blog-gallery'
|
||||
class='prose prose-base prose-zinc mt-12 text-muted-foreground dark:prose-invert prose-headings:font-medium prose-headings:text-foreground prose-headings:before:absolute prose-headings:before:-ms-4 prose-th:before:content-none'
|
||||
style='max-width: 65rem'
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
@ -88,4 +89,15 @@ const { headings } = await post.render()
|
||||
|
||||
const observer = new IntersectionObserver(callback)
|
||||
observer.observe(targetHeader)
|
||||
|
||||
import PhotoSwipeLightbox from 'photoswipe/lightbox'
|
||||
import 'photoswipe/style.css'
|
||||
|
||||
const lightbox = new PhotoSwipeLightbox({
|
||||
gallery: '#blog-gallery',
|
||||
children: 'a',
|
||||
pswpModule: () => import('photoswipe')
|
||||
})
|
||||
|
||||
lightbox.init()
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user