I am struggling to add a footer to my Vue.js project homepage. Being an inexperienced beginner in Vue, I am finding it difficult to make it work.
Here is where I need to add the footer
Below is my footer component:
<template>
<footer>
</footer>
</template>
<style scoped>
footer
{
display: flex;
background-color: #42b942;
height: 50px;
width: 100%;
position: fixed;}
</style>
This is the code snippet from App.vue:
<template>
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div>
<router-view/>
</div>
</template>
<script>
import footer from '@/components/footer.vue';
export default {
name: "footer",
components: {
footer
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
#nav {
padding: 30px;
}
#nav a {
font-weight: bold;
color: #2c3e50;
}
#nav a.router-link-exact-active {
color: #42b983;
}
</style>
Could someone guide me on what changes are needed to successfully display the footer on the Vue project homepage?