feat: Sticky navbar #30

Open
aniva wants to merge 2 commits from component/navbar into main
2 changed files with 8 additions and 2 deletions
Showing only changes of commit e8e52588e4 - Show all commits

View File

@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
import '../app.css'; import '../app.css';
import { page } from '$app/stores'; import { page } from '$app/stores';
import { name } from '$content/metadata.json';
import Footer from "./Footer.svelte"; import Footer from "./Footer.svelte";
import Navbar from "./Navbar.svelte"; import Navbar from "./Navbar.svelte";
import PageTransition from "./PageTransition.svelte"; import PageTransition from "./PageTransition.svelte";
@ -12,6 +13,7 @@
{#if $page.url.pathname != "/"} {#if $page.url.pathname != "/"}
<div id="layout"> <div id="layout">
<div id="nav"> <div id="nav">
<p id="bio-name">{name}</p>
<Navbar /> <Navbar />
<slot name="header" /> <slot name="header" />
</div> </div>
@ -31,6 +33,12 @@
{/if} {/if}
<style> <style>
#bio-name {
font-family: serif;
font-size: 3rem;
font-weight: normal;
color: var(--name);
}
#layout { #layout {
max-width: max(80vw, 100vh); max-width: max(80vw, 100vh);
margin-left: auto; margin-left: auto;

View File

@ -1,7 +1,6 @@
<script lang="ts"> <script lang="ts">
import { page } from '$app/stores'; import { page } from '$app/stores';
import { routes } from "$lib/sitemap.ts" import { routes } from "$lib/sitemap.ts"
import { name } from '$content/metadata.json';
import ThemeSwitch from "$lib/components/ThemeSwitch.svelte" import ThemeSwitch from "$lib/components/ThemeSwitch.svelte"
import { Rss } from "lucide-svelte"; import { Rss } from "lucide-svelte";
@ -12,7 +11,6 @@
</script> </script>
<div id="navbar" class="h-5 space-x-4"> <div id="navbar" class="h-5 space-x-4">
<p id="bio-name">{name}</p>
{#each routes as item} {#each routes as item}
<a <a
class="nav-link" class="nav-link"