friends-best/components/NavBar.vue

57 lines
804 B
Vue
Raw Permalink Normal View History

2022-05-22 21:04:20 +00:00
<template>
<nav>
<div v-for="link in links" :key="link">
2022-05-23 19:37:02 +00:00
<div class="nav-button">
<NuxtLink :to="link.to">
<img :src="link.img.name" :alt="link.img.alt" />
<p>{{ link.name }}</p>
</NuxtLink>
</div>
2022-05-22 21:04:20 +00:00
</div>
</nav>
</template>
<style lang="scss" scoped>
2022-05-23 19:37:02 +00:00
@use '../assets/styles/colours';
2022-05-22 21:04:20 +00:00
nav {
2022-05-23 19:37:02 +00:00
margin: 0 auto;
position: -webkit-sticky;
position: sticky;
display: flex;
justify-content: center;
align-items: center;
2022-05-22 21:04:20 +00:00
}
2022-05-23 19:37:02 +00:00
nav :hover {
filter: colours.$filter-accent-colour-light;
}
nav a {
text-decoration: none;
color: black;
}
p {
padding: 0;
margin: 0;
}
2022-05-22 21:04:20 +00:00
.nav-button {
2022-05-23 19:37:02 +00:00
margin: 0 1rem;
padding: 0.5rem;
2022-05-22 21:04:20 +00:00
}
</style>
<script>
const NavBar = resolveComponent('NavBar');
export default {
props: {
links: {
type: Array,
required: true,
},
},
};
</script>