feat(blog): add blog feature with layout, list component and i18n support
- Create BlogLayout for consistent blog page structure - Implement BlogList component with responsive design and line-clamp - Add blog navigation to header with proper routing - Include i18n support for both English and Chinese - Add sample blog pages with mock data
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import ThemeToggle from "./ui/theme-toggle";
|
||||
import { personalInfo } from "@/lib/data";
|
||||
import LanguageSwitcher from "./LanguageSwitcher";
|
||||
import ThemeToggle from "./ui/theme-toggle";
|
||||
import { useTranslations, getLocalizedPath, type Lang } from "@/i18n/utils";
|
||||
import { useState, useEffect } from "react";
|
||||
import { Menu, X } from "lucide-react";
|
||||
@@ -45,10 +45,11 @@ export default function GlassHeader({ lang }: GlassHeaderProps) {
|
||||
{ key: 'nav.about', icon: '👨💻 ', sectionId: 'about' },
|
||||
{ key: 'nav.services', icon: '🛠️ ', sectionId: 'services' },
|
||||
{ key: 'nav.projects', icon: '🚀 ', sectionId: 'projects' },
|
||||
{ key: 'nav.blog', icon: '📝 ', href: getLocalizedPath('/blog', lang) },
|
||||
].map((item) => (
|
||||
<a
|
||||
key={item.key}
|
||||
href={`#${item.sectionId}`}
|
||||
href={item.href || `#${item.sectionId}`}
|
||||
className="transition-colors duration-150 hover:text-foreground/80 text-foreground/60"
|
||||
>
|
||||
{item.icon}
|
||||
@@ -87,10 +88,11 @@ export default function GlassHeader({ lang }: GlassHeaderProps) {
|
||||
{ key: 'nav.about', icon: '👨💻 ', sectionId: 'about' },
|
||||
{ key: 'nav.services', icon: '🛠️ ', sectionId: 'services' },
|
||||
{ key: 'nav.projects', icon: '🚀 ', sectionId: 'projects' },
|
||||
{ key: 'nav.blog', icon: '📝 ', href: getLocalizedPath('/blog', lang) },
|
||||
].map((item) => (
|
||||
<a
|
||||
key={item.key}
|
||||
href={`#${item.sectionId}`}
|
||||
href={item.href || `#${item.sectionId}`}
|
||||
className="transition-colors duration-150 hover:text-foreground/80 text-foreground/60 py-2 block"
|
||||
onClick={toggleMenu}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user