Commit Graph

48 Commits

Author SHA1 Message Date
b2fdca86f8 refactor: 简化Dockerfile中的依赖安装和构建逻辑,移除条件判断 2025-07-28 11:07:56 +08:00
cb5c92cfae fix: 修复加载语言文件时的警告信息,确保错误信息正确输出 2025-07-28 11:06:38 +08:00
812962eb84 feat: 添加代码高亮支持,优化Markdown渲染,新增滚动到顶部组件 2025-07-28 11:04:13 +08:00
06e270545a fix: 调整用户登出路由权限,优化登出逻辑注释并移除无用打印 2025-07-28 08:52:11 +08:00
ca8e1f92bd 🐛 Implement feature X to enhance user experience and optimize performance 2025-07-28 08:42:56 +08:00
a3403995c0 feat: 添加帖子元数据组件,优化帖子头部显示 2025-07-28 08:39:13 +08:00
89e2fbe0b9 feat: enhance post retrieval with authorization token
- Updated `getPostById` function to accept an optional authorization token.
- Modified `PostPage` to retrieve the token from cookies and pass it to the API call.
- Added smooth transition effects for background and text colors in `globals.css`.
- Cleaned up imports and formatting in `blog-home.tsx`.
- Refactored `blog-post.tsx` to use `MDXRemote` for rendering markdown content.
- Introduced `blog-comment.tsx` and `blog-post-header.client.tsx` components for better structure.
- Added a switch component for dark/light mode toggle in the navbar.
- Updated `Post` model to include a description field.
2025-07-28 08:30:37 +08:00
d73ed493be feat: 更新评论和帖子模型,添加用户信息和原创标识,优化API请求和组件结构 2025-07-28 06:22:07 +08:00
5c20a310e3 Merge pull request #1 from redish101/main
feat: ️ feat: 添加评论 CRUD 操作
2025-07-26 16:32:42 +08:00
2bd981135d fix: 纠正获取评论列表排序参数的错误 2025-07-26 16:31:15 +08:00
339d420918 feat: ️ feat: 添加评论 CRUD 操作 2025-07-26 16:26:14 +08:00
a805767030 ️ feat: 在README中添加Kubernetes容器化部署说明 2025-07-26 10:45:33 +08:00
d5d0b75dd3 ️ feat: 更新README以包含环境变量配置说明,并删除示例docker-compose文件 2025-07-26 10:44:27 +08:00
49ebb484fa ️ feat: 在README中添加BACKEND_URL环境变量说明,并更新源码构建部署部分的描述 2025-07-26 10:39:44 +08:00
7918f04059 ️ feat: 在前端服务中添加端口映射,并在API客户端中记录后端URL 2025-07-26 10:30:36 +08:00
b92fce5c7c ️ feat: 更新后端URL环境变量为BACKEND_URL,以支持更灵活的配置 2025-07-26 10:21:31 +08:00
99e291654d ♻️ refactor: standardize code formatting and improve readability across components
- Updated component files to use consistent single quotes for strings.
- Removed unnecessary newlines and adjusted indentation for better readability.
- Simplified conditional rendering and improved code structure in various components.
- Added ESLint configuration for better code quality and adherence to standards.
- Enhanced error handling in i18n request logic.
2025-07-26 10:01:27 +08:00
e659de23fb ️ feat: refactor sorting parameters in post listing API and components
- Renamed `orderedBy` to `orderBy` and `reverse` to `desc` in ListPostsParams interface and related functions.
- Updated all usages of the sorting parameters in the post listing logic to reflect the new naming convention.

feat: add user-related API functions

- Implemented `getLoginUser` and `getUserById` functions in the user API to fetch user details.
- Enhanced user model to include `language` property.

feat: integrate next-intl for internationalization

- Added `next-intl` plugin to Next.js configuration for improved localization support.
- Removed previous i18n implementation and replaced it with a new structure using JSON files for translations.
- Created locale files for English, Japanese, and Chinese with basic translations.
- Implemented a request configuration to handle user locales and messages dynamically.

fix: clean up unused imports and code

- Removed unused i18n utility functions and language settings from device context.
- Cleaned up commented-out code in blog card component and sidebar.

chore: update dependencies

- Added `deepmerge` for merging locale messages.
- Updated package.json and pnpm-lock.yaml to reflect new dependencies.
2025-07-26 09:48:23 +08:00
9984f665d4 feat: 新增 Like、Comment、Repo 和 Service 模块的基础包结构 2025-07-26 09:48:14 +08:00
c565b5b5ef ️ feat: Refactor API client to support server-side and client-side configurations
fix: Update post fetching logic to use dynamic ID instead of hardcoded value

feat: Enhance layout with animated transitions using framer-motion

refactor: Remove old post and user page implementations, introduce new structure

feat: Implement sidebar components for blog home with dynamic content

feat: Create blog post component with wave header and metadata display

feat: Add responsive sidebar menu for navigation on mobile devices

chore: Introduce reusable sheet component for modal-like functionality
2025-07-25 06:18:24 +08:00
a76f03038c feat: 修复创建帖子时参数验证失败的处理逻辑,并更新博客卡片链接路径 2025-07-25 04:32:00 +08:00
1cbfe60f8c feat: 更新标签列表获取逻辑,支持空数据处理 2025-07-25 04:23:45 +08:00
d03730a7fa feat: 重构构建工作流,分离前端和后端构建步骤 2025-07-25 04:15:59 +08:00
5d5e008bc0 Merge branch 'main' of https://github.com/snowykami/neo-blog 2025-07-25 04:13:58 +08:00
f1e5959440 ️ feat: 更新 Docker 配置,优化前端环境变量设置并添加部署工作流 2025-07-25 04:13:56 +08:00
f60584ac3b Rename Sidebar.tsx to sidebar.tsx 2025-07-25 04:02:10 +08:00
f96e3391b1 Rename Navbar.tsx to navbar.tsx 2025-07-25 04:01:55 +08:00
1b4ab6b685 Rename Gravatar.tsx to gravatar.tsx 2025-07-25 04:01:41 +08:00
5fac42439a ️ feat: add post fetching by ID and improve blog home page
- Implemented `getPostById` API function to fetch a post by its ID.
- Refactored the main page to use a new `BlogHome` component for better organization.
- Added loading state and sorting functionality for posts on the blog home page.
- Integrated label fetching and display on the blog home page.
- Enhanced the blog card component with improved layout and statistics display.
- Updated the navbar to use dynamic configuration values.
- Added Docker support with a comprehensive build and push workflow.
- Created a custom hook `useStoredState` for managing local storage state.
- Added a new page for displaying individual posts with metadata generation.
- Removed unused components and files to streamline the codebase.
2025-07-25 03:58:53 +08:00
abe1099711 ️ feat: update global styles and color variables for improved theming
refactor: change import paths for DeviceContext and GravatarAvatar components

fix: adjust login form API call and update UI text for clarity

feat: add post API for listing posts with pagination and filtering options

feat: implement BlogCard component for displaying blog posts with enhanced UI

feat: create Badge component for consistent styling of labels and indicators

refactor: reintroduce DeviceContext with improved functionality for theme and language management

feat: define Label and Post models for better type safety and structure
2025-07-24 13:12:59 +08:00
21a1726f71 feat: 添加管理员服务,支持 OIDC 配置的 CRUD 操作 2025-07-24 13:12:49 +08:00
9ca307f4d9 ️ feat: add main page layout with navigation and footer
feat: create random labels page

feat: implement login page with OpenID Connect support

feat: add Gravatar component for user avatars

feat: create Navbar component with navigation menu

chore: create Sidebar component placeholder

feat: implement login form with OIDC and email/password options

feat: add reusable button component

feat: create card component for structured content display

feat: implement input component for forms

feat: create label component for form labels

feat: add navigation menu component for site navigation

chore: add configuration file for site metadata

feat: implement device context for responsive design

feat: add utility functions for class name management

feat: define OIDC configuration model

feat: define base response model for API responses

feat: define user model for user data

feat: implement i18n for internationalization support

feat: add English and Chinese translations for login

chore: create index for locale resources

chore: add blog home view placeholder
2025-07-24 09:22:50 +08:00
19c8a9eac5 添加管理员控制器,支持 OIDC 配置的 CRUD 操作,更新路由和 DTO 结构 2025-07-24 09:22:35 +08:00
58c370ec65 implement OIDC configuration management with CRUD operations, add admin routes, and enhance error handling 2025-07-23 03:32:00 +08:00
562b9bd17f add like functionality with Like model, implement like/unlike methods, and update Post and Comment models to track like counts 2025-07-22 22:45:55 +08:00
cbe73121f2 refactor user service methods, implement OIDC login and user management features, and enhance token handling 2025-07-22 20:45:05 +08:00
f07200b0b9 update environment mode handling, refactor user registration logic, and add username/email existence checks 2025-07-22 10:04:42 +08:00
08872ea015 add .env.example file with configuration settings, refactor environment variable access methods 2025-07-22 09:31:58 +08:00
00c28fea9c implement user registration with email verification, enhance error handling, and update database configuration 2025-07-22 09:15:12 +08:00
1f5f67761b refactor project structure by renaming files and updating test function signature 2025-07-22 08:53:40 +08:00
a0d215fa2e implement email verification feature, add captcha validation middleware, and enhance user authentication flow 2025-07-22 08:50:16 +08:00
6187425df6 修正 .gitignore 中的路径格式,确保 configs 和 data 目录正确忽略 2025-07-22 06:21:25 +08:00
b9400e0785 update user authentication error handling, add invalid credentials response, and modify .gitignore for data directory 2025-07-22 06:20:25 +08:00
d1a040617f implement user authentication and database initialization, add models for user, comment, label, and OIDC configuration 2025-07-22 06:18:23 +08:00
99a3f80e12 add middleware for authentication and captcha, implement initial API routes for user, post, label, and page 2025-07-18 03:26:15 +08:00
70b653a88b initialize project structure with main, routing, and environment utilities 2025-07-17 04:01:30 +08:00
47db58b967 initialize project structure with main, routing, and environment utilities 2025-07-17 04:01:27 +08:00
723f3010a3 Initial commit 2025-07-16 21:08:26 +08:00