바로 포폴 정상화화
This commit is contained in:
parent
f85634f651
commit
de09401b68
45 changed files with 4401 additions and 1800 deletions
14
src/routes/Home.css
Normal file
14
src/routes/Home.css
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#fullpage {
|
||||
scroll-snap-type: y mandatory;
|
||||
overflow-y: scroll;
|
||||
height: 100vh;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
.section {
|
||||
scroll-snap-align: start;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
38
src/routes/Home.tsx
Normal file
38
src/routes/Home.tsx
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import { useEffect } from 'react';
|
||||
import { useLocation } from 'react-router';
|
||||
import Top from "@/components/Home/Top";
|
||||
import About from "@/components/Home/About";
|
||||
import Timeline from "@/components/Home/Timeline";
|
||||
|
||||
import './Home.css';
|
||||
import Contact from '@/components/Home/Contact';
|
||||
|
||||
export default function Home() {
|
||||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
if (location.hash) {
|
||||
const element = document.getElementById(location.hash.substring(1));
|
||||
if (element) {
|
||||
element.scrollIntoView({ behavior: 'smooth' });
|
||||
}
|
||||
}
|
||||
}, [location]);
|
||||
|
||||
return (
|
||||
<div id="fullpage" className="bg-background text-foreground w-full">
|
||||
<div id="top" className="bg-background text-foreground w-full h-screen flex items-center justify-center section">
|
||||
<Top />
|
||||
</div>
|
||||
<div id="about" className="bg-background text-foreground w-full h-screen flex items-center justify-center section">
|
||||
<About />
|
||||
</div>
|
||||
<div id="timeline" className="bg-background text-foreground w-full h-screen flex items-center justify-center section">
|
||||
<Timeline />
|
||||
</div>
|
||||
<div id="contact" className="bg-background text-foreground w-full h-screen flex items-center justify-center section">
|
||||
<Contact />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
11
src/routes/Timeline.tsx
Normal file
11
src/routes/Timeline.tsx
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { useEffect } from "react";
|
||||
|
||||
export default function Timeline() {
|
||||
useEffect(() => {
|
||||
window.location.href = "/#timeline";
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<h1 className="w-full h-screen flex items-center justify-center">Redirecting</h1>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue