feat(ui): add Container component and replace manual container divs
Implement a reusable Container component with size variants (sm, md, lg, xl, full) to standardize content width across the application. Replace all manual container divs with the new component for consistent styling and maintainability.
This commit is contained in:
@@ -3,6 +3,7 @@ import BlogLayout from '../../../layouts/BlogLayout.astro';
|
||||
import BlogList from '../../../components/blog/BlogList.astro';
|
||||
import CategoryCard from '../../../components/blog/CategoryCard.astro';
|
||||
import TagCard from '../../../components/blog/TagCard.astro';
|
||||
import Container from '../../../components/ui/Container';
|
||||
import { type BlogPost } from '@/types';
|
||||
import { type Lang } from '@/i18n/utils';
|
||||
import { defaultLang } from '@/i18n/ui';
|
||||
@@ -55,19 +56,19 @@ const tags = extractTags(allPostsArray);
|
||||
<BlogLayout title="博客 - 赵桂阳" description="深入我对编程、技术趋势和开发者生活的思考。探索我的最新文章。">
|
||||
<main class="min-h-screen">
|
||||
<!-- 头部区域 -->
|
||||
<div class="container mx-auto px-4 pt-24 pb-12">
|
||||
<Container client:load size="md" className="pt-24 pb-12">
|
||||
<div class="text-center mb-16">
|
||||
<h1 class="text-5xl md:text-6xl font-bold bg-gradient-to-r from-foreground via-purple-600 to-purple-800 dark:from-foreground dark:via-purple-200 dark:to-purple-300 bg-clip-text text-transparent mb-6">
|
||||
我的 <span class="text-purple-500">最新</span> 博客
|
||||
我的<span class="text-purple-500">博客</span>
|
||||
</h1>
|
||||
<p class="text-xl text-muted-foreground max-w-3xl mx-auto">
|
||||
深入我对编程、技术趋势和开发者生活的思考。探索我的最新文章。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
|
||||
<!-- 主要内容 -->
|
||||
<div class="container mx-auto px-4 pb-20">
|
||||
<Container client:load size="md" className="pb-20">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
|
||||
<!-- 侧边栏 -->
|
||||
<div class="lg:col-span-1 space-y-8">
|
||||
|
||||
Reference in New Issue
Block a user