feat(nav): refactor primary navigation to split labels + icons; remove redundant nav code

This commit is contained in:
Cory Dransfeldt 2025-04-13 16:56:47 -07:00
parent 38992d10f1
commit 13914c29fa
No known key found for this signature in database
18 changed files with 105 additions and 360 deletions

View file

@ -0,0 +1,51 @@
nav {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: var(--spacing-md);
padding: 0;
margin: 0;
.icon > span,
.active > span {
display: none;
}
&.primary {
margin-top: var(--spacing-base);
}
&.icons {
justify-content: end;
}
&.primary,
&.sub-pages {
gap: var(--sizing-sm);
}
&.social,
&.sub-pages {
align-items: center;
justify-content: center;
}
&.icons,
&.social {
gap: var(--spacing-md);
}
&.social {
margin-bottom: var(--spacing-lg);
}
&.primary,
&.social {
width: var(--sizing-full);
}
&.sub-pages {
font-size: var(--font-size-sm);
padding-bottom: var(--spacing-3xl);
}
}

View file

@ -1,31 +0,0 @@
nav {
&.social,
&.sub-pages {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: center;
}
&.social {
gap: var(--spacing-md);
margin-bottom: var(--spacing-lg);
width: var(--sizing-full);
.icon > span,
.active > span {
display: none;
}
.active {
display: flex;
}
}
&.sub-pages {
font-size: var(--font-size-sm);
padding-bottom: var(--spacing-3xl);
gap: var(--sizing-sm);
}
}

View file

@ -1,25 +0,0 @@
.nav-list {
display: flex;
flex-direction: row;
flex-wrap: wrap;
list-style: none;
gap: var(--spacing-md);
padding: 0;
margin: 0;
@media screen and (min-width: 768px) {
justify-content: center;
}
& > li {
margin-bottom: 0;
:is(.icon, .active) svg {
display: block;
}
:is(.icon, .active) span {
display: none;
}
}
}