add gallery intro
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
|
||||
<side-view id="gallery-index" right>
|
||||
<template #default="{ hide }">
|
||||
<div class="gallery-intro" v-html="intro" />
|
||||
|
||||
<ul v-if="creations">
|
||||
<li v-for="crea in creations" :key="crea.id">
|
||||
<node-view-title
|
||||
@@ -84,6 +86,12 @@ export default {
|
||||
id: { type: [Number, String], default: undefined }
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
intro: ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(['creations', 'creation'])
|
||||
},
|
||||
@@ -107,6 +115,9 @@ export default {
|
||||
|
||||
created () {
|
||||
this.$store.dispatch('INIT_GALLERY', parseInt(this.id))
|
||||
this.$store.dispatch('QUERY_PAGE', 'gallery').then(page => {
|
||||
this.intro = page.content
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -10,7 +10,8 @@ export default {
|
||||
ids: {
|
||||
welcome: 263,
|
||||
intro: 264,
|
||||
kit: 265
|
||||
kit: 265,
|
||||
gallery: 349
|
||||
},
|
||||
visited: localStorage.getItem('visited') === 'true'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user