feat(nav): refactor primary navigation to split labels + icons; remove redundant nav code
This commit is contained in:
parent
38992d10f1
commit
13914c29fa
18 changed files with 105 additions and 360 deletions
51
src/assets/styles/components/nav.css
Normal file
51
src/assets/styles/components/nav.css
Normal 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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue