chore: setup astro
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
import { useState, useEffect } from 'preact/hooks';
|
||||
import Layout from '../../components/Layout';
|
||||
import About from '../../components/About';
|
||||
import Projects from '../../components/Projects';
|
||||
import Experience from '../../components/Experience';
|
||||
import Footer from '../../components/Footer';
|
||||
import Education from '../../components/Education';
|
||||
|
||||
export function Home({ theme }) {
|
||||
const [scrollPosition, setScrollPosition] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = () => setScrollPosition(window.scrollY);
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
return () => window.removeEventListener('scroll', handleScroll);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Layout theme={theme}>
|
||||
<About theme={theme} />
|
||||
<Education theme={theme} />
|
||||
<Experience theme={theme} />
|
||||
<Projects theme={theme} />
|
||||
<Footer theme={theme} />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
export function NotFound() {
|
||||
return (
|
||||
<section>
|
||||
<h1>404: Not Found</h1>
|
||||
<p>It's gone :(</p>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
11
src/pages/index.astro
Normal file
11
src/pages/index.astro
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
import Welcome from '../components/Welcome.astro';
|
||||
import Layout from '../layouts/Layout.astro';
|
||||
|
||||
// Welcome to Astro! Wondering what to do next? Check out the Astro documentation at https://docs.astro.build
|
||||
// Don't want to use any of this? Delete everything in this file, the `assets`, `components`, and `layouts` directories, and start fresh.
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<Welcome />
|
||||
</Layout>
|
||||
Reference in New Issue
Block a user