2018-04-30 00:45:03 +00:00
|
|
|
<a class="settings-nav-item {{getCurrentClass(page, name)}}"
|
|
|
|
aria-label={{getAriaLabel(page, name, label)}}
|
|
|
|
:href
|
|
|
|
>
|
2018-01-13 18:53:25 +00:00
|
|
|
{{label}}
|
|
|
|
</a>
|
|
|
|
<style>
|
2018-01-20 20:35:38 +00:00
|
|
|
a.settings-nav-item {
|
2018-01-13 18:53:25 +00:00
|
|
|
font-size: 1.2em;
|
|
|
|
}
|
|
|
|
|
2018-01-20 20:35:38 +00:00
|
|
|
a.settings-nav-item.selected {
|
2018-01-13 18:53:25 +00:00
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
helpers: {
|
2018-04-20 04:38:01 +00:00
|
|
|
getCurrentClass (page, name) {
|
|
|
|
return page === name ? 'selected' : ''
|
2018-01-13 18:53:25 +00:00
|
|
|
},
|
2018-04-20 04:38:01 +00:00
|
|
|
getAriaLabel (page, name, label) {
|
2018-01-21 09:19:28 +00:00
|
|
|
return page === name ? `${label} (current page)` : label
|
2018-01-13 18:53:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|