Revert "Revert the revert"

This reverts commit 4c311a8dbb.
This commit is contained in:
Kevin
2019-06-20 00:31:29 +02:00
parent 21ccb787f6
commit b35d5bc356
14 changed files with 27 additions and 283 deletions

View File

@@ -1,19 +0,0 @@
<template lang="pug">
div
h1 {{ resources.title }}
.cards
template(v-for='resource in resources.resources')
Card(:title='resource.title' :desc='resource.desc' :url='resource.url')
</template>
<script>
import Card from './Card'
export default {
props: ["resources"],
components: {
Card
},
}
</script>

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>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'communities')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'css')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'daily')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'design')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'frontend')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'fullstack')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'general')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'html')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'javascript')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'php')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'server')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,22 +0,0 @@
<template lang="pug">
CategoryPage(:resources="resources")
</template>
<script>
import CategoryPage from '../../components/CategoryPage'
import store from '../../store.json'
export default {
data() {
return {
resources: store.find(x => x.title.toLowerCase() === 'tools')
}
},
components: {
CategoryPage
}
}
</script>
<style lang="scss" scoped>
</style>