Skip to content

Commit

Permalink
fix: reapply #4260
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Oct 13, 2024
1 parent ef703cf commit b96712c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
15 changes: 12 additions & 3 deletions src/client/theme-default/components/VPMenuLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,19 @@ const { page } = useData()
<template>
<div class="VPMenuLink">
<VPLink
:class="{ active: isActive(page.relativePath, item.activeMatch || item.link, !!item.activeMatch) }"
:class="{
active: isActive(
page.relativePath,
item.activeMatch || item.link,
!!item.activeMatch
)
}"
:href="item.link"
:target="item.target"
:rel="item.rel"
:no-icon="item.noIcon"
>
{{ item.text }}
<span v-html="item.text"></span>
</VPLink>
</div>
</template>
Expand All @@ -40,7 +47,9 @@ const { page } = useData()
font-weight: 500;
color: var(--vp-c-text-1);
white-space: nowrap;
transition: background-color 0.25s, color 0.25s;
transition:
background-color 0.25s,
color 0.25s;
}
.link:hover {
Expand Down
2 changes: 1 addition & 1 deletion src/client/theme-default/components/VPNavBarMenuLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const { page } = useData()
)
}"
:href="item.link"
:noIcon="item.noIcon"
:target="item.target"
:rel="item.rel"
:no-icon="item.noIcon"
tabindex="0"
>
<span v-html="item.text"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ const closeScreen = inject('close-screen') as () => void
:href="item.link"
:target="item.target"
:rel="item.rel"
:no-icon="item.noIcon"
@click="closeScreen"
>
{{ item.text }}
<span v-html="item.text"></span>
</VPLink>
</template>

Expand Down
10 changes: 7 additions & 3 deletions src/client/theme-default/components/VPNavScreenMenuLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ const closeScreen = inject('close-screen') as () => void
:href="item.link"
:target="item.target"
:rel="item.rel"
:no-icon="item.noIcon"
@click="closeScreen"
v-html="item.text"
/>
>
<span v-html="item.text"></span>
</VPLink>
</template>

<style scoped>
Expand All @@ -30,7 +32,9 @@ const closeScreen = inject('close-screen') as () => void
font-size: 14px;
font-weight: 500;
color: var(--vp-c-text-1);
transition: border-color 0.25s, color 0.25s;
transition:
border-color 0.25s,
color 0.25s;
}
.VPNavScreenMenuLink:hover {
Expand Down

0 comments on commit b96712c

Please sign in to comment.