Browse Source

Remove unnecessary Tag.vue file

vuex
Schneider 7 years ago
parent
commit
7497de3ae1
  1. 44
      src/components/Tag.vue

44
src/components/Tag.vue

@ -1,44 +0,0 @@
<template>
<div id="tag">
<div class="meal" v-for="meal in meals">
<h3>{{meal.category}}</h3>
<p>{{meal.title}}</p>
</div>
</div>
</template>
<script>
export default {
name: 'mensa',
data () {
return {
meals: []
}
},
watch: {$route: 'loadMeals'},
created () {
this.loadMeals()
},
methods: {
loadMeals () {
fetch(`/static/${this.$route.params.mensa}.${this.$route.params.tag}.json`)
.then(res => res.json())
.then(menu => { this.meals = menu.meals })
}
}
}
</script>
<style>
.meal{
margin: 2em 0;
}
.meal>h3{
margin-bottom:0em;
}
.meal>p{
margin-top: 0.4em;
}
</style>
Loading…
Cancel
Save