Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions blog-forum/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions blog-forum/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
44 changes: 44 additions & 0 deletions blog-forum/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 博客论坛系统(Vue 3 + TypeScript + Vite + Tailwind)

一个简单的博客论坛原型:发布 Markdown 文章、查看详情、登录与评论(基于 Pinia 的内存数据存储)。

## 本地运行

```bash
npm install
npm run dev
```

访问开发地址:`http://localhost:5173`。

## 功能概览
- 发布文章(Markdown 编辑 + 预览)
- 文章列表与详情
- 登录/退出(简化为内存会话)
- 评论(登录后可发)

## 主要技术
- Vue 3 + TypeScript
- Vite 7
- Pinia(状态管理)
- Vue Router 4
- Tailwind CSS v4(含 typography 插件)
- marked + DOMPurify(Markdown 渲染与 XSS 防护)

## 目录结构
```
src/
components/ # 通用组件(导航、Markdown 编辑/渲染、卡片等)
pages/ # 页面组件(Home/Login/NewPost/Profile/PostDetail)
router/ # 路由配置
stores/ # Pinia stores(auth/posts/comments)
style.css # Tailwind 引入
main.ts # 应用入口,挂载 Pinia 与路由
```

## 构建
```bash
npm run build
npm run preview
```

13 changes: 13 additions & 0 deletions blog-forum/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading