chore: setup astro

This commit is contained in:
Alejandro Laguna
2025-08-02 14:40:33 +02:00
parent 3b0278b7fc
commit 8bb138dbe5
33 changed files with 5206 additions and 3491 deletions

View File

@@ -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>
);
}

View File

@@ -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
View 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>