|
|
@ -1,5 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div class="hello"> |
|
|
|
<div class="mensa"> |
|
|
|
<h3 id="date">{{date}}</h3> |
|
|
|
<div class="meal" v-for="meal in meals"> |
|
|
|
<h3>{{meal.category}}</h3> |
|
|
|
<p>{{meal.title}}</p> |
|
|
@ -13,6 +14,7 @@ export default { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
meals: [], |
|
|
|
date: '', |
|
|
|
days: [1, 2, 3, 4, 5, 6], |
|
|
|
dayOfWeek: { |
|
|
|
1: 'Montag', |
|
|
@ -39,7 +41,10 @@ export default { |
|
|
|
loadMeals () { |
|
|
|
fetch(`/static/${this.$route.params.mensa}.${this.$route.params.tag}.json`) |
|
|
|
.then(res => res.json()) |
|
|
|
.then(menu => { this.meals = menu.meals }) |
|
|
|
.then(menu => { |
|
|
|
this.meals = menu.meals |
|
|
|
this.date = menu.date |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
created () { |
|
|
@ -61,4 +66,10 @@ export default { |
|
|
|
margin-top: 0.4em; |
|
|
|
} |
|
|
|
|
|
|
|
#date{ |
|
|
|
margin-bottom: -1em; |
|
|
|
} |
|
|
|
.mensa{ |
|
|
|
margin-bottom: 3em; |
|
|
|
} |
|
|
|
</style> |