Added a simple NavBar on some pages
This commit is contained in:
parent
8cb418dbba
commit
f2aef2012b
9 changed files with 108 additions and 23 deletions
35
components/NavBar.vue
Normal file
35
components/NavBar.vue
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<nav>
|
||||
<div v-for="link in links" :key="link">
|
||||
<NuxtLink :to="link.to" class="nav-button">
|
||||
<img :src="link.img.name" :alt="link.img.alt" />
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
nav {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.nav-button {
|
||||
padding: .25rem;
|
||||
margin: .25rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
const NavBar = resolveComponent('NavBar');
|
||||
|
||||
export default {
|
||||
props: {
|
||||
links: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue