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">
|
2025-10-18 02:08:22 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
|
<router-link class="nav-link" :to="{ name: 'recipes' }" active-class="active"
|
|
|
|
|
>Recipes</router-link
|
|
|
|
|
>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item">
|
|
|
|
|
<router-link class="nav-link" :to="{ name: 'mealplan' }" active-class="active"
|
|
|
|
|
>Meal Plan</router-link
|
|
|
|
|
>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="nav-item">
|
|
|
|
|
<router-link class="nav-link" :to="{ name: 'shopping' }" active-class="active"
|
|
|
|
|
>Shopping</router-link
|
|
|
|
|
>
|
|
|
|
|
</li>
|
2024-01-13 02:00:15 +00:00
|
|
|
</ul>
|
2024-10-14 04:29:02 +00:00
|
|
|
</div>
|
2024-01-17 13:34:42 +00:00
|
|
|
<div class="viewport">
|
2025-10-18 02:08:22 +00:00
|
|
|
<router-view />
|
2024-01-17 13:34:42 +00:00
|
|
|
</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 {
|
2025-10-18 02:08:22 +00:00
|
|
|
name: 'App',
|
|
|
|
|
components: {
|
|
|
|
|
'alert-toast': AlertToast,
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
currentRoute() {
|
|
|
|
|
return this.$route.path
|
2024-09-21 22:02:21 +00:00
|
|
|
},
|
2025-10-18 02:08:22 +00:00
|
|
|
},
|
2024-01-07 02:40:35 +00:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
#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 {
|
2025-10-18 02:08:22 +00:00
|
|
|
position: fixed;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
list-style-type: none;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
background-color: #333;
|
2024-01-13 02:00:15 +00:00
|
|
|
}
|
|
|
|
|
|
2024-10-15 22:29:04 +00:00
|
|
|
.nav li {
|
2025-10-18 02:08:22 +00:00
|
|
|
flex: 1;
|
2024-10-15 22:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
2024-01-13 02:00:15 +00:00
|
|
|
/* Style the links inside the navigation bar */
|
|
|
|
|
.nav a {
|
2025-10-18 02:08:22 +00:00
|
|
|
display: inline-block;
|
|
|
|
|
color: #f2f2f2;
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 14px 16px;
|
|
|
|
|
text-decoration: none;
|
2024-01-13 02:00:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Have active route use different color */
|
2024-10-15 22:29:04 +00:00
|
|
|
.nav li:has(> a.active) {
|
2025-10-18 02:08:22 +00:00
|
|
|
background-color: #4caf50;
|
|
|
|
|
color: white;
|
2024-01-13 02:00:15 +00:00
|
|
|
}
|
2024-01-17 13:34:42 +00:00
|
|
|
|
|
|
|
|
.viewport {
|
2025-10-18 02:08:22 +00:00
|
|
|
max-width: 1200px;
|
|
|
|
|
margin: auto;
|
2024-01-17 13:34:42 +00:00
|
|
|
}
|
2024-01-07 02:40:35 +00:00
|
|
|
</style>
|