Commit Graph

7 Commits

Author SHA1 Message Date
joyzhao
5fcf7a9d33 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.
2025-06-19 18:10:49 +08:00
joyzhao
7951121c7f refactor(blog): extract blog utilities into shared module
Move common blog functionality like post filtering, sorting and data extraction into a centralized utils module.
Replace Astro.glob with import.meta.glob for better performance.
Update all blog components and pages to use the new utilities.
2025-06-19 16:28:59 +08:00
joyzhao
429b13985f feat(blog): refactor blog components and improve category/tag handling
- Add new CategoryCard and TagCard components to centralize UI logic
- Convert BlogList from React to Astro component
- Improve category and tag matching by using IDs from frontmatter
- Update all blog pages to use new components
- Add line-height to global styles for better readability
2025-06-19 14:45:29 +08:00
joyzhao
deb80c0df7 feat(blog): add tagId and categoryId for multilingual routing support
- Add tagId and categoryId fields to blog post frontmatter and interfaces
- Update blog list, category, and tag pages to use IDs for routing
- Implement fallback to regular tags/categories when IDs are not available
- Improve tag and category links with hover effects and proper encoding
- Update post meta component to support multilingual routing
2025-06-19 14:08:47 +08:00
joyzhao
fb9b2b6971 feat(blog): replace hardcoded posts with dynamic loading from markdown files
Dynamically load blog posts from markdown files instead of using hardcoded data. Posts are now sorted by date and categories/tags are automatically extracted from frontmatter. This makes content management easier and more maintainable.
2025-06-19 11:34:04 +08:00
joyzhao
c1f240d007 refactor(i18n): simplify language handling across components
use Astro.currentLocale as single source of truth for language
remove manual lang prop passing to components
components now read language from document lang attribute
2025-06-19 10:24:48 +08:00
joyzhao
b4b2153bde 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
2025-06-16 21:52:16 +08:00