add gallery intro

This commit is contained in:
axolotle
2021-08-01 18:05:27 +02:00
parent d08487957a
commit e173ec64b8
2 changed files with 13 additions and 1 deletions
+11
View File
@@ -28,6 +28,8 @@
<side-view id="gallery-index" right> <side-view id="gallery-index" right>
<template #default="{ hide }"> <template #default="{ hide }">
<div class="gallery-intro" v-html="intro" />
<ul v-if="creations"> <ul v-if="creations">
<li v-for="crea in creations" :key="crea.id"> <li v-for="crea in creations" :key="crea.id">
<node-view-title <node-view-title
@@ -84,6 +86,12 @@ export default {
id: { type: [Number, String], default: undefined } id: { type: [Number, String], default: undefined }
}, },
data () {
return {
intro: ''
}
},
computed: { computed: {
...mapGetters(['creations', 'creation']) ...mapGetters(['creations', 'creation'])
}, },
@@ -107,6 +115,9 @@ export default {
created () { created () {
this.$store.dispatch('INIT_GALLERY', parseInt(this.id)) this.$store.dispatch('INIT_GALLERY', parseInt(this.id))
this.$store.dispatch('QUERY_PAGE', 'gallery').then(page => {
this.intro = page.content
})
} }
} }
</script> </script>
+2 -1
View File
@@ -10,7 +10,8 @@ export default {
ids: { ids: {
welcome: 263, welcome: 263,
intro: 264, intro: 264,
kit: 265 kit: 265,
gallery: 349
}, },
visited: localStorage.getItem('visited') === 'true' visited: localStorage.getItem('visited') === 'true'
}, },