<template>
  <div class="mensa">
    <h3 id="date">{{date}}</h3>
      <div class="meal" v-for="meal in meals">
        <h3>{{meal.category}}</h3>
        <p>{{meal.title}}</p>
      </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'mensa',
  computed:{
    ...mapGetters({
      meals: 'getMeals',
      date: 'getDate'
    })
  }
}
</script>
<style>
.meal{
  margin: 2em 0;
}

.meal>h3{
  margin-bottom:0em;
}

.meal>p{
  margin-top: 0.4em;
}

#date{
  margin-bottom: -1em;
}
.mensa{
  margin-bottom: 3em;
}
</style>
