fix: keep navigation labels single and accessible
This commit is contained in:
@@ -8,7 +8,7 @@ const props = defineProps<{
|
||||
onSectionLinkClick: (event: MouseEvent) => void;
|
||||
}>();
|
||||
|
||||
const compactLabels: Readonly<Record<SectionId, string>> = {
|
||||
const navigationLabels: Readonly<Record<SectionId, string>> = {
|
||||
start: 'Start',
|
||||
profile: 'Profile',
|
||||
experience: 'Career',
|
||||
@@ -30,8 +30,7 @@ const compactLabels: Readonly<Record<SectionId, string>> = {
|
||||
props.journey.activeSectionId === item.id ? 'page' : undefined
|
||||
"
|
||||
@click="props.onSectionLinkClick"
|
||||
><span class="site-navigation__full-label">{{ item.label }}</span
|
||||
><span class="site-navigation__compact-label">{{ compactLabels[item.id] }}</span></a
|
||||
>{{ navigationLabels[item.id] }}</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -73,10 +73,6 @@
|
||||
outline-offset: -3px;
|
||||
}
|
||||
|
||||
.site-navigation__compact-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.portfolio-main {
|
||||
min-width: 0;
|
||||
padding-block: var(--space-4) var(--space-5);
|
||||
@@ -131,14 +127,6 @@
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.site-navigation__full-label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.site-navigation__compact-label {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.portfolio-section {
|
||||
scroll-margin-block-start: calc(
|
||||
var(--site-navigation-block-size) + var(--space-3)
|
||||
|
||||
Reference in New Issue
Block a user