Skip to content

Commit

Permalink
Add Heading
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanEstrada003 committed Sep 5, 2024
1 parent 52a5591 commit e238d98
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
16 changes: 16 additions & 0 deletions src/lib/assets/forms/frame.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions src/lib/assets/forms/line_nav.svg

This file was deleted.

16 changes: 9 additions & 7 deletions src/lib/components/layout/Navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import gecko_code from "$lib/assets/logos/gecko-code.svg";
const current_path = $derived($page.url.pathname);
let menuOpen = $state(false);
const LINKS = [
{ text: "Inicio", href: "/" },
{ text: "Eventos", href: "/events" },
Expand All @@ -21,7 +21,6 @@
const closeMenu = () => {
menuOpen = false;
};
</script>

<nav class="nav-background flex items-center justify-between p-4">
Expand All @@ -32,7 +31,7 @@
<span class="line"></span>
<span class="line"></span>
</button>
<div class="links relative z-10 flex gap-x-8 text-lg links {menuOpen ? 'open' : ''}">
<div class="links links relative z-10 flex gap-x-8 text-lg {menuOpen ? 'open' : ''}">
{#each LINKS as { href, text } (href)}
<a {href} class="relative font-fira hover:underline" on:click={closeMenu}>
<span
Expand Down Expand Up @@ -62,7 +61,6 @@
.nav-background {
background-image: url("$lib/assets/forms/line.svg");
background-repeat: no-repeat;
background-position: left;
top: 20px;
background-size: 97% auto;
}
Expand All @@ -85,10 +83,10 @@
background-color: white;
}
/* Estilos para pantallas pequeñas */
/* Estilos para pantallas pequeñas */
@media (max-width: 768px) {
.links {
position: fixed; /* Posición fija para que el menú cubra toda la pantalla */
position: fixed;
inset: 0; /* El menú ocupará toda la pantalla */
background-color: rgba(0, 0, 0, 0.9); /* Fondo oscuro para mayor visibilidad */
z-index: 50; /* Asegurar que esté por delante de otros elementos */
Expand All @@ -100,13 +98,17 @@
width: 100%;
}
nav img {
margin-bottom: 5rem;
}
.links.open {
display: flex; /* Mostrar el menú cuando esté abierto */
}
.hamburger {
display: flex;
margin-right: 20px;
margin-bottom: 5rem;
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/routes/events/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<script lang="ts">
import Event from "$lib/components/Event.svelte";
import Heading from "$lib/components/layout/Heading.svelte";
let { data } = $props();
</script>

<Heading title="EVENTOS" />
<div class="flex flex-col items-center px-8">
{#each data.events as event}
<Event
Expand Down
3 changes: 2 additions & 1 deletion src/routes/projects/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<script lang="ts">
import CommonCard from "$lib/components/CommonCard.svelte";
import Heading from "$lib/components/layout/Heading.svelte";
let { data } = $props();
</script>

<Heading title="PROYECTOS" />
<p class="font-medium">{data.description}</p>
<div class="mt-8 flex flex-col items-center sm:flex sm:flex-row sm:flex-wrap">
{#each data.projects as project}
Expand Down

0 comments on commit e238d98

Please sign in to comment.