apply formatting rules

This commit is contained in:
2025-11-05 09:45:08 -05:00
parent a1ea385448
commit 6b86b0adb2
24 changed files with 679 additions and 5080 deletions
+48 -49
View File
@@ -1,65 +1,64 @@
---
import { navLinks } from '../../data/nav-links';
import { navLinks } from "../../data/nav-links";
const { pathname } = Astro.url;
const pathComponents = pathname.split('/').slice(1);
const pathComponents = pathname.split("/").slice(1);
---
<nav>
{
navLinks.map((link) => (
<li>
<a
href={`/${link.path}`}
class={pathComponents[0] === link.path ? 'selected' : null}
>
{link.label}
</a>
</li>
))
}
{
navLinks.map((link) => (
<li>
<a
href={`/${link.path}`}
class={pathComponents[0] === link.path ? "selected" : null}
>
{link.label}
</a>
</li>
))
}
</nav>
<style>
nav {
display: flex;
flex-direction: row;
list-style: none;
gap: 10px;
font-size: 1.15rem;
font-weight: 600;
}
nav {
display: flex;
flex-direction: row;
list-style: none;
gap: 10px;
font-size: 1.15rem;
font-weight: 600;
}
a {
color: var(--text);
padding: 5px 10px;
border-radius: var(--radius);
transition: background-color 0.2s ease-in-out;
}
a {
color: var(--text);
padding: 5px 10px;
border-radius: var(--radius);
transition: background-color 0.2s ease-in-out;
}
a:hover {
background-color: rgba(0, 0, 0, 0.04);
opacity: 1;
}
a:hover {
background-color: rgba(0, 0, 0, 0.04);
opacity: 1;
}
.underline {
height: 2px;
width: 100%;
background-color: var(--orange);
}
.underline {
height: 2px;
width: 100%;
background-color: var(--orange);
}
@media screen and (max-width: 768px) {
nav {
display: none;
}
}
@media screen and (max-width: 768px) {
nav {
display: none;
}
}
@media (prefers-color-scheme: dark) {
a:hover {
background-color: rgba(231, 237, 255, 0.1);
opacity: 1;
}
}
@media (prefers-color-scheme: dark) {
a:hover {
background-color: rgba(231, 237, 255, 0.1);
opacity: 1;
}
}
</style>