1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-14 19:38:28 +01:00
Pinafore-Web-Client-Frontend/routes/settings/_components/SettingsNavItem.html
2018-01-21 01:19:28 -08:00

24 lines
539 B
HTML

<a class='settings-nav-item {{getCurrentClass(page, name)}}' aria-label='{{getAriaLabel(page, name, label)}}' href='{{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>