munch-ease-frontend/src/App.vue

93 lines
1.7 KiB
Vue
Raw Normal View History

2024-01-07 02:40:35 +00:00
<template>
2024-10-14 04:29:02 +00:00
<div>
2024-01-13 02:00:15 +00:00
<ul class="nav">
<li class="nav-item">
<router-link class="nav-link" to="/recipes" active-class="active">Recipes</router-link>
2024-01-13 02:00:15 +00:00
</li>
<li class="nav-item">
<router-link class="nav-link" to="/mealplan" active-class="active">Meal Plan</router-link>
</li>
<li class="nav-item">
<router-link class="nav-link" to="/shopping" active-class="active">Shopping</router-link>
</li>
</ul>
2024-10-14 04:29:02 +00:00
</div>
2024-01-17 13:34:42 +00:00
<div class="viewport">
<router-view/>
</div>
2024-09-21 22:02:21 +00:00
<alert-toast />
2024-01-07 02:40:35 +00:00
</template>
<script>
2024-09-21 22:02:21 +00:00
import AlertToast from './components/AlertToast.vue'
2024-04-28 02:13:49 +00:00
2024-01-07 02:40:35 +00:00
export default {
2024-09-21 22:02:21 +00:00
name: 'App',
components: {
'alert-toast': AlertToast
},
2024-01-13 02:00:15 +00:00
computed: {
currentRoute() {
return this.$route.path
}
}
2024-01-07 02:40:35 +00:00
}
</script>
<style>
2024-10-15 22:29:04 +00:00
2024-01-07 02:40:35 +00:00
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
2024-01-13 02:00:15 +00:00
/* Make nav bar links buttons across top of screen */
.nav {
2024-01-17 13:34:42 +00:00
position: fixed;
left: 0;
right: 0;
top: 0;
z-index: 1;
2024-01-13 02:00:15 +00:00
display: flex;
justify-content: space-around;
list-style-type: none;
margin: 0;
padding: 0;
position: fixed;
top: 0;
width: 100%;
background-color: #333;
}
2024-10-15 22:29:04 +00:00
.nav li {
flex: 1;
}
2024-01-13 02:00:15 +00:00
/* Style the links inside the navigation bar */
.nav a {
display: inline-block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
/* Have active route use different color */
2024-10-15 22:29:04 +00:00
.nav li:has(> a.active) {
2024-01-13 02:00:15 +00:00
background-color: #4CAF50;
color: white;
}
2024-01-17 13:34:42 +00:00
.viewport {
max-width: 1200px;
margin: auto;
}
2024-01-07 02:40:35 +00:00
</style>