highlight logo in nav bar

Signed-off-by: Tobias Erbshäußer <tobias@tesoft.dev>
This commit is contained in:
2026-05-24 09:23:04 +02:00
parent 7af09cdbca
commit 31cc11a2f6
2 changed files with 13 additions and 7 deletions
+12 -6
View File
@@ -25,10 +25,6 @@
padding: var(--small-padding) var(--medium-padding);
}
img {
width: 100%;
}
a {
display: grid;
grid-template-columns: 1fr;
@@ -36,7 +32,10 @@
}
a > svg {
fill: var(--light-gray);
background-color: var(--gold);
border-radius: var(--button-border-radius);
fill: var(--gray);
padding: 0.4rem;
}
slot {
@@ -126,7 +125,14 @@
<nav>
<div>
<a href="/">
<img src="/assets/logo.svg" alt="logo">
<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
<g>
<rect x="15" y="15" width="226" height="45" stroke-width="2.342"/>
<rect x="80" y="75" width="50" height="166" stroke-width="2.1158"/>
<rect x="145" y="196" width="96" height="45" stroke-width="1.5264"/>
<rect x="145" y="105.5" width="96" height="45" stroke-width="1.5264"/>
</g>
</svg>
</a>
<slot>
</slot>
+1 -1
View File
@@ -17,7 +17,7 @@
<body>
<div>
<tesoft-nav>
{% for item in [{title: "Blog", href: "/blog"}, {title: "About me", href: "/about"}] %}
{% for item in [{title: "Home", href: "/"}, {title: "Blog", href: "/blog"}, {title: "About me", href: "/about"}] %}
<tesoft-button transparent href="{{ item.href }}" {% if item.title == title %}selected{% endif %}>
{{ item.title }}
</tesoft-button>