feat: Sticky navbar #30

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

View File

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