forked from cybrespace/pinafore
27 lines
535 B
HTML
27 lines
535 B
HTML
<a class="settings-nav-item {{getCurrentClass(page, name)}}"
|
|
aria-label={{getAriaLabel(page, name, label)}}
|
|
:href
|
|
>
|
|
{{label}}
|
|
</a>
|
|
<style>
|
|
a.settings-nav-item {
|
|
font-size: 1.2em;
|
|
}
|
|
|
|
a.settings-nav-item.selected {
|
|
font-weight: 600;
|
|
}
|
|
</style>
|
|
<script>
|
|
export default {
|
|
helpers: {
|
|
getCurrentClass (page, name) {
|
|
return page === name ? 'selected' : ''
|
|
},
|
|
getAriaLabel (page, name, label) {
|
|
return page === name ? `${label} (current page)` : label
|
|
}
|
|
}
|
|
}
|
|
</script> |