feat: custom 404 page

This commit is contained in:
Alejandro Laguna
2025-08-23 15:04:12 +02:00
parent 56ddc1ed55
commit 715538ae70
2 changed files with 42 additions and 2 deletions

40
src/pages/404.astro Normal file
View File

@@ -0,0 +1,40 @@
---
import "../styles/global.css"
import Layout from "../layouts/Layout.astro"
import NavigationCard from '../components/NavigationCard.astro';
import { ArrowLeft } from 'lucide-astro';
const navItems = [
{
href: "/",
icon: ArrowLeft,
heading: "Home",
content: "Go back"
},
];
---
<Layout>
<section class="max-w-4xl mb-20 sm:mb-28">
<h2 class="text-4xl sm:text-5xl lg:text-6xl font-bold leading-[1.1] mb-6 text-neutral-900 dark:text-neutral-100">
Seems like you tried to find something that doesn't exist yet.
</h2>
<p class="text-lg sm:text-xl text-neutral-600 dark:text-neutral-400 leading-relaxed max-w-2xl">
I don't like to remove anything from here, but it can happen from time to time. Or maybe you mistyped something. In any case, my apologies. Feel free to go back to the very beginning if you want.
</p>
</section>
<section class="mb-20 sm:mb-28" aria-labelledby="navigation-heading">
<h2 id="navigation-heading" class="sr-only">Site navigation</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-5">
{navItems.map(item => (
<NavigationCard
href={item.href}
icon={item.icon}
heading={item.heading}
content={item.content}
/>
))}
</div>
</section>
</Layout>

View File

@@ -74,7 +74,7 @@ const experiences = [
<section class="max-w-3xl mb-10 sm:mb-14"> <section class="max-w-3xl mb-10 sm:mb-14">
<h1 class="text-4xl sm:text-5xl font-bold mb-6 text-neutral-900 dark:text-neutral-100">About</h1> <h1 class="text-4xl sm:text-5xl font-bold mb-6 text-neutral-900 dark:text-neutral-100">About</h1>
<p class="text-lg text-neutral-600 dark:text-neutral-400 leading-relaxed text-justify"> <p class="text-lg text-neutral-600 dark:text-neutral-400 leading-relaxed text-justify">
I'm a second year computer science student at the European Institute of Technology, still trying to figure out my place but enjoying the journey through systems programming, webdev and other fields. Outside of code, my favorite writer is Isaac Asimov, my favorite piece of music is Spiegel im Spiegel, and my favorite book is The Witches by Roald Dahl. My favorite star is Vega because it was once our north star and will be again in about 12,000 years - something poetic about that cycle. And that's pretty much everything you need to know about me, except maybe my tea preferences, but we'll save that for another time... </p> Guilty of having too many interests and being unable to focus on a couple of them and making notable progress. Currently a second-year computer science student at the <a class="underline" href="https://www.epitech.eu/"> European Institute of Technology</a>, and Software Engineer Intern at <a class="underline" href="https://migalabs.io/"> Migalabs </a></p>
</section> </section>
<section class="mb-12 bg-neutral-50 dark:bg-neutral-800 p-6 rounded-2xl border border-neutral-200 dark:border-neutral-700"> <section class="mb-12 bg-neutral-50 dark:bg-neutral-800 p-6 rounded-2xl border border-neutral-200 dark:border-neutral-700">
@@ -94,7 +94,7 @@ const experiences = [
<p class="text-sm text-neutral-600 dark:text-neutral-400">INS Cendrassos, class of 2024</p> <p class="text-sm text-neutral-600 dark:text-neutral-400">INS Cendrassos, class of 2024</p>
<ul class="list-['-_'] pl-8 italic text-sm text-neutral-700 dark:text-neutral-300"> <ul class="list-['-_'] pl-8 italic text-sm text-neutral-700 dark:text-neutral-300">
<li> Erasmus+ Scholarship </li> <li> Erasmus+ Scholarship </li>
<li> First of the class of 2024 </li> <li> First of the class</li>
<li> Student of the year </li> <li> Student of the year </li>
</ul> </ul>
</li> </li>