api-client/components/app/Sidenav.vue

64 lines
1.4 KiB
Vue
Raw Normal View History

2020-03-04 01:17:02 +00:00
<template>
2021-07-01 16:39:11 +00:00
<aside>
<nav class="flex flex-col flex-nowrap">
<nuxt-link
v-for="(navigation, index) in primaryNavigation"
:key="`navigation-${index}`"
:to="localePath(navigation.target)"
2021-07-07 23:28:42 +00:00
class="nav-link"
>
2021-07-07 23:28:42 +00:00
<i class="material-icons">{{ navigation.icon }}</i>
<span>{{ navigation.title }}</span>
2021-07-01 16:39:11 +00:00
</nuxt-link>
</nav>
</aside>
2020-03-04 01:17:02 +00:00
</template>
2021-05-18 06:26:59 +00:00
<script>
export default {
data() {
return {
2021-07-01 16:39:11 +00:00
primaryNavigation: [
{ target: "index", icon: "apps", title: "App" },
2021-07-01 16:39:11 +00:00
{ target: "realtime", icon: "language", title: "Realtime" },
{ target: "graphql", icon: "code", title: "GraphQL" },
{ target: "documentation", icon: "book", title: "Doc" },
2021-07-01 16:39:11 +00:00
{ target: "profile", icon: "person", title: "Profile" },
{ target: "settings", icon: "settings", title: "Settings" },
{ target: "home", icon: "home", title: "Home" },
],
}
},
2021-05-18 06:26:59 +00:00
}
</script>
2020-06-19 17:37:40 +00:00
<style scoped lang="scss">
2021-07-07 23:28:42 +00:00
.nav-link {
@apply p-4;
2021-07-20 10:29:30 +00:00
@apply flex flex-col flex-1;
2021-07-07 23:28:42 +00:00
@apply items-center;
@apply justify-center;
@apply transition;
2021-07-20 10:29:30 +00:00
@apply hover:bg-primaryDark;
@apply hover:text-secondaryDark;
2021-07-07 23:28:42 +00:00
.material-icons {
2021-07-24 16:46:48 +00:00
@apply opacity-75;
2021-07-07 23:28:42 +00:00
}
span {
@apply mt-2;
@apply font-semibold;
}
&.active {
@apply text-accent;
@apply hover:text-accent;
.material-icons {
@apply opacity-100;
}
}
2020-06-19 17:37:40 +00:00
}
</style>