Initial commit: anime-minimalist personal blog

- React 18 + Vite + React Router v6
- Glass morphism cards with rounded corners
- Dark/light theme toggle
- Article CRUD with localStorage persistence
- Search, admin panel (PIN: 2501), sakura petal canvas animation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-01 18:10:59 +08:00
commit c5994759fb
59 changed files with 5582 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { useEffect, useState } from 'react';
import styles from './ScrollProgress.module.css';
export default function ScrollProgress() {
const [pct, setPct] = useState(0);
useEffect(() => {
const update = () => {
const el = document.documentElement;
const scrolled = el.scrollTop;
const total = el.scrollHeight - el.clientHeight;
setPct(total > 0 ? (scrolled / total) * 100 : 0);
};
window.addEventListener('scroll', update, { passive: true });
return () => window.removeEventListener('scroll', update);
}, []);
return (
<div className={styles.bar} style={{ width: `${pct}%` }} aria-hidden="true" />
);
}