update
This commit is contained in:
22
src/App.jsx
22
src/App.jsx
@@ -13,6 +13,10 @@ function App() {
|
||||
const [activePhoto, setActivePhoto] = useState(null);
|
||||
const [photos, setPhotos] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
document.title = import.meta.env.VITE_APP_TITLE || 'Chronicle';
|
||||
}, []);
|
||||
|
||||
// Theme State
|
||||
const [theme, setTheme] = useState(() => {
|
||||
return localStorage.getItem('theme_preference') || 'dark';
|
||||
@@ -58,7 +62,7 @@ function App() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="app-container">
|
||||
<div className="app-container" style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
|
||||
{/* Theme Toggle */}
|
||||
<div style={{ position: 'fixed', top: '20px', right: '20px', zIndex: 50 }}>
|
||||
<button
|
||||
@@ -84,7 +88,21 @@ function App() {
|
||||
</div>
|
||||
|
||||
{/* Main Timeline View */}
|
||||
<Timeline photos={photos} onSelectPhoto={setActivePhoto} />
|
||||
<div style={{ flex: 1 }}>
|
||||
<Timeline photos={photos} onSelectPhoto={setActivePhoto} />
|
||||
</div>
|
||||
|
||||
{/* Footer */}
|
||||
<footer style={{
|
||||
padding: '2rem',
|
||||
textAlign: 'center',
|
||||
color: 'var(--text-secondary)',
|
||||
fontSize: '0.9rem',
|
||||
borderTop: '1px solid var(--border)',
|
||||
marginTop: 'auto'
|
||||
}}>
|
||||
<p>© {new Date().getFullYear()} {import.meta.env.VITE_APP_TITLE || 'Chronicle'}. All rights reserved.</p>
|
||||
</footer>
|
||||
|
||||
{/* Detail Overlay */}
|
||||
{activePhoto && (
|
||||
|
||||
Reference in New Issue
Block a user