Revert the revert

This commit is contained in:
Unknown
2019-06-17 13:44:47 +02:00
parent 43987b1de0
commit 4c311a8dbb
17 changed files with 756 additions and 966 deletions

27
pages/_category.vue Normal file
View File

@@ -0,0 +1,27 @@
<template lang="pug">
div
h1 {{ category.title }}
.cards
template(v-for='resource in category.resources')
Card(:title='resource.title' :desc='resource.desc' :url='resource.url')
</template>
<script>
import store from '../store.json'
import Card from '../components/Card'
export default {
data () {
return {
categoryTitle: this.$route.params.category,
categories: store,
}
},
computed: {
category() {
return this.categories.find(category => category.title.toLowerCase() === this.categoryTitle.toLowerCase())
}
},
components: { Card, },
}
</script>