Skip to content

Commit

Permalink
增加网站更新日志
Browse files Browse the repository at this point in the history
  • Loading branch information
buyfakett committed Jan 20, 2025
1 parent 4aaf6d6 commit bed2b8d
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"react-dom": "^18.3.1",
"react-helmet": "^6.1.0",
"react-icons": "^5.4.0",
"react-markdown": "^9.0.3",
"react-router-dom": "^7.0.2",
"tailwind-merge": "^2.5.5",
"tailwindcss": "^3.4.17",
Expand Down Expand Up @@ -60,6 +61,7 @@
},
"devDependencies": {
"prettier": "3.4.2",
"raw-loader": "^4.0.2",
"react-scripts": "^5.0.1",
"react-snap": "^1.23.0",
"typescript": "^4.9.5"
Expand Down
2 changes: 2 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Pictures from './components/Pictures';
import Watermark from '@hi-ui/watermark';
import BackToTop from './components/BackToTop';
import { Helmet } from 'react-helmet';
import ChangeLog from "./util/ChangeLog.jsx";

const App = () => {
// semi-design的主题默认为暗色
Expand Down Expand Up @@ -81,6 +82,7 @@ const App = () => {
<Route path="/tools" element={<Tools />} />
<Route path="/urls" element={<Urls />} />
<Route path="/pictures" element={<Pictures />} />
<Route path="/changelog" element={<ChangeLog />} />
<Route path="*" element={<NotFound />} />
</Routes>

Expand Down
37 changes: 37 additions & 0 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
2025-01-20 增加网站更新日志

2025-01-19 拆分工作经历组件,增加项目经验

2025-01-08 重构图片页面,优化瀑布流的显示流畅度

2025-01-10 重构获取数据从py改为js

2025-01-06 封装BackTop组件,使得有进度条

2025-01-06 增加prettier来格式化代码

2024-12-24 增加提交数等显示

2024-12-17 增加水印

2024-12-17 增加回到顶部

2024-12-17 增加[wakatime](https://wakatime.com/)更新时间

2024-12-13 增加照片墙界面,使用瀑布流

2024-12-10 增加开源项目组件

2024-12-01 新增urls页面

2024-12-02 新增tools界面

2024-12-02 新增动画

2024-11-20 初步完成需求

2024-12-02 新增tools界面

2024-12-02 新增动画

2024-11-20 初步完成需求
32 changes: 32 additions & 0 deletions src/util/ChangeLog.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import Markdown from 'react-markdown';
import md from '!!raw-loader!../CHANGELOG.md';
import { pageVariants } from '../config.js';
import { Button } from '@douyinfe/semi-ui';
import { motion } from 'framer-motion';
import { IoIosArrowBack } from 'react-icons/io';

const ChangeLog = () => {
return (
<motion.div
className="w-[60%] mx-auto min-h-screen dark:bg-gray-900 text-white flex flex-col items-center p-4 mt-3"
variants={pageVariants}
initial="initial"
animate="animate"
exit="exit"
transition={{ duration: 0.5 }}>
<div className="w-full flex justify-start text-white">
<Button
theme="outline"
type="tertiary"
onClick={() => navigate('/')}>
<IoIosArrowBack />
返回首页
</Button>
</div>
<Markdown className="mt-10 text-2xl leading-loose">{md}</Markdown>
</motion.div>
);
};

export default ChangeLog;
10 changes: 9 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,12 @@ module.exports = {
resolve: {
extensions: ['.js', '.jsx', '.json', '.tsx'],
},
};
module: {
rules: [
{
test: /\.md$/,
use: 'raw-loader',
},
],
},
};

0 comments on commit bed2b8d

Please sign in to comment.