Skip to content

Commit

Permalink
Refactor Navbar again (#46)
Browse files Browse the repository at this point in the history
* Refactor Navbar again

* Optimize SVGs
  • Loading branch information
adriandelgado authored Aug 6, 2024
1 parent d296347 commit 534b29b
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
Binary file removed src/lib/assets/images/logo.png
Binary file not shown.
17 changes: 17 additions & 0 deletions src/lib/assets/logos/gecko-code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/lib/assets/logos/gecko.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions src/lib/components/layout/Navbar.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { page } from "$app/stores";
import logo from "$lib/assets/images/logo.png";
import gecko_code from "$lib/assets/logos/gecko-code.svg";
const current_path = $derived($page.url.pathname);
Expand All @@ -14,20 +14,20 @@
</script>

<nav class="flex items-center justify-between p-4">
<img src={logo} alt="Logo de Kokoa" width="40" height="40" />
<img src={gecko_code} alt="Logo de Kokoa" width="52.9" height="24.4" />
<div class="flex gap-x-8 text-lg">
{#each LINKS as { href, text } (href)}
<a {href} class="relative font-bold hover:underline">
<a {href} class="relative font-fira hover:underline">
<span
aria-hidden="true"
class="absolute -left-2 text-green-400 {current_path !== href ? 'hidden' : ''}"
class="absolute -left-3 text-lime-500 {current_path !== href ? 'hidden' : ''}"
>
{"{"}
</span>
{text}
<span
aria-hidden="true"
class="absolute -right-2 text-green-400 {current_path !== href ? 'hidden' : ''}"
class="absolute -right-3 text-lime-500 {current_path !== href ? 'hidden' : ''}"
>
{"}"}
</span>
Expand Down

0 comments on commit 534b29b

Please sign in to comment.