Fix navbar issues and styling

This commit is contained in:
pancakes 2024-11-18 20:05:25 +10:00
parent 1013f18082
commit 92ee5122ea
No known key found for this signature in database
GPG key ID: ED53D426432B861B
3 changed files with 27 additions and 13 deletions

View file

@ -20,6 +20,7 @@
"href": "https://github.com/pancakesmeow",
"icon": "github-mark.png",
"iconInvert": true,
"mainOnly": true,
"name": "GitHub (inactive)",
"username": "pancakesmeow"
},

View file

@ -1,6 +1,6 @@
<script>
import links from "../../data/links.json";
import { page } from "$app/stores";
import links from "../../data/links.json";
</script>
<a href="#main-content" class="skip-to-main">Skip to main content</a>
@ -10,19 +10,22 @@
<a href="/">pancakes</a>
</span>
{#if $page.url.pathname !== "/"}
<ul>
<ul class="links">
{#each links as link}
<li>
<div class="icon-link">
<img
src={"/assets/icons/" + link.icon}
alt={link.name}
/>
<a href={link.href} target="_blank">
{link.name}
</a>
</div>
</li>
{#if link.href && !link.mainOnly}
<li>
<div class="icon-link">
<img
class={link.iconInvert ? "invert" : ""}
src={"/assets/icons/" + link.icon}
alt={link.name}
/>
<a href={link.href} target="_blank">
{link.name}
</a>
</div>
</li>
{/if}
{/each}
</ul>
{/if}

View file

@ -137,6 +137,16 @@ main:first-of-type {
max-width: 768px;
}
nav {
margin-left: auto;
margin-right: auto;
max-width: 768px;
}
nav .links {
font-size: small;
}
h1 {
border-bottom: 2px solid var(--accent-2);
font-size: xx-large;