Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mejoras de UI al error 404 Not Found #333

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/pages/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ import Footer from "@/sections/Footer.astro"
description="Web Oficial de La Velada del Año IV, evento de boxeo entre streamers y creadores de contenido, organizado por Ibai Llanos"
title="La Velada del Año 4 - Página no encontrada"
>
<main>
<Error error="404" message="Página no encontrada" />
</main>
<main>
<Error
error="404"
message="Página no encontrada"
contextMessage="¡Hola! Lo sentimos, pero no pudimos encontrar lo que buscabas. Verifica que la dirección URL sea correcta."
/>
</main>
<Footer />
</Layout>
32 changes: 23 additions & 9 deletions src/sections/Error.astro
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
---
import Action from "@/components/Action.astro"
import HeroLogo from "@/components/HeroLogo.astro"
import Typography from "@/components/Typography.astro"

const { error, message } = Astro.props
const { error, message, contextMessage } = Astro.props
---

<section class="mt-8 flex flex-col place-items-center text-primary md:mt-16">
<section
class="m-auto flex w-full flex-wrap place-items-center items-center justify-center text-primary"
>
<HeroLogo
class="h-auto w-[300px] text-primary animate-duration-0 md:w-[500px]"
class="m-5 h-auto w-[300px] text-primary animate-duration-0 md:w-[500px]"
disableAnimation
/>
<div class="mt-16 text-center">
<h1 class="text-5xl font-semibold uppercase text-white md:text-6xl">Error {error}</h1>
<h1 class="mt-5 text-2xl font-semibold uppercase md:text-4xl">{message}</h1>
<div class="m-5 mt-16 text-center">
<Typography
as="h1"
variant="atomic-title"
color="neutral"
class:list={"mb-10 font-bold text-white"}
>
error {error}
</Typography>
<Typography as="h2" variant="h2" color="neutral" class:list={"text-white"}>
<p>{message}</p>
</Typography>
<p class="mt-5 max-w-80 text-xl">{contextMessage}</p>

<Action class="mt-7 text-center" href="/" aria-label="volver a la página principal" as="a"
>Ir al inicio</Action
>
</div>
<Action class="mt-5 text-center" href="/" aria-label="volver a la página principal" as="a"
>Volver</Action
>
</section>
Loading