Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix($core): #2627 Dup ID violates HTML5-3
  • Loading branch information
adico1 committed Oct 8, 2020
commit 235a4aaac26e2996f3538b802eb132b7c6c22c13
51 changes: 25 additions & 26 deletions packages/@vuepress/core/lib/client/components/OutboundLink.vue
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
<template>
<svg
class="icon outbound"
xmlns="http://www.w3.org/2000/svg"
:aria-labelledby="rIdx"
role="img"
focusable="false"
x="0px"
y="0px"
viewBox="0 0 100 100"
width="15"
height="15"
<span
:title="openInNewWindowTitle"
class="sr-only"
>
<title :id="rIdx">{{ openInNewWindowTitle }}</title>
<path
fill="currentColor"
d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"
/>
<polygon
fill="currentColor"
points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"
/>
</svg>
<svg
class="icon outbound"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
role="img"
focusable="false"
x="0px"
y="0px"
viewBox="0 0 100 100"
width="15"
height="15"
>
<path
fill="currentColor"
d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"
/>
<polygon
fill="currentColor"
points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"
/>
</svg>
</span>
</template>

<script>
export default {
data: function () {
return {
rIdx: 'outbound-link-title-' + Math.floor(Math.random() * 1000000)
}
},
computed: {
openInNewWindowTitle () {
return this.$themeLocaleConfig.openNewWindowText || '(opens new window)'
Expand Down