|
@@ -31,7 +31,7 @@
|
|
:src="image_accroche.url"
|
|
:src="image_accroche.url"
|
|
:alt="image_accroche.alt"
|
|
:alt="image_accroche.alt"
|
|
:title="image_accroche.title"
|
|
:title="image_accroche.title"
|
|
- @click="setLightboxIndex(0)"
|
|
|
|
|
|
+ @click="setcoolLightBoxIndex(0)"
|
|
/>
|
|
/>
|
|
</figure>
|
|
</figure>
|
|
</section>
|
|
</section>
|
|
@@ -62,20 +62,13 @@
|
|
</div> <!-- //col-left -->
|
|
</div> <!-- //col-left -->
|
|
<div class="col col-right">
|
|
<div class="col col-right">
|
|
<section class="body" v-html="article.body"></section>
|
|
<section class="body" v-html="article.body"></section>
|
|
- <CoolLightBox
|
|
|
|
- :items="lightbox_items"
|
|
|
|
- :index="lightbox_index"
|
|
|
|
- :loop="true"
|
|
|
|
- srcName="url"
|
|
|
|
- @close="lightbox_index = null">
|
|
|
|
- </CoolLightBox>
|
|
|
|
<div class="gallery-wrapper">
|
|
<div class="gallery-wrapper">
|
|
<div
|
|
<div
|
|
class="image"
|
|
class="image"
|
|
v-for="(image, imageIndex) in lightbox_items"
|
|
v-for="(image, imageIndex) in lightbox_items"
|
|
v-if="imageIndex > 0"
|
|
v-if="imageIndex > 0"
|
|
:key="imageIndex"
|
|
:key="imageIndex"
|
|
- @click="setLightboxIndex(imageIndex)"
|
|
|
|
|
|
+ @click="setcoolLightBoxIndex(imageIndex)"
|
|
:style="{ backgroundImage: 'url(' + image.thumb + ')' }"
|
|
:style="{ backgroundImage: 'url(' + image.thumb + ')' }"
|
|
></div>
|
|
></div>
|
|
</div>
|
|
</div>
|
|
@@ -156,7 +149,9 @@ export default {
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState({
|
|
...mapState({
|
|
- items: state => state.Blabla.items
|
|
|
|
|
|
+ items: state => state.Blabla.items,
|
|
|
|
+ coolLightBoxItems: state => state.Common.coolLightBoxItems,
|
|
|
|
+ coolLightBoxIndex: state => state.Common.coolLightBoxIndex
|
|
})
|
|
})
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
@@ -166,7 +161,9 @@ export default {
|
|
...mapActions({
|
|
...mapActions({
|
|
getItems: 'Blabla/getItems',
|
|
getItems: 'Blabla/getItems',
|
|
getItemIndex: 'Blabla/getItemIndex',
|
|
getItemIndex: 'Blabla/getItemIndex',
|
|
- getPrevNextItems: 'Blabla/getPrevNextItems'
|
|
|
|
|
|
+ getPrevNextItems: 'Blabla/getPrevNextItems',
|
|
|
|
+ setcoolLightBoxItems: 'Common/setcoolLightBoxItems',
|
|
|
|
+ setcoolLightBoxIndex: 'Common/setcoolLightBoxIndex'
|
|
}),
|
|
}),
|
|
getArticle(){
|
|
getArticle(){
|
|
console.log('getArticle', this.$route)
|
|
console.log('getArticle', this.$route)
|
|
@@ -278,6 +275,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
console.log('Article this.content.lightbox_items', this.lightbox_items)
|
|
console.log('Article this.content.lightbox_items', this.lightbox_items)
|
|
|
|
+ this.setcoolLightBoxItems(this.lightbox_items)
|
|
|
|
|
|
// update main page title
|
|
// update main page title
|
|
this.$store.commit('Common/setPagetitle', article.title)
|
|
this.$store.commit('Common/setPagetitle', article.title)
|
|
@@ -293,9 +291,6 @@ export default {
|
|
name:`article`,
|
|
name:`article`,
|
|
params: { alias:alias, id: pn.nid }
|
|
params: { alias:alias, id: pn.nid }
|
|
})
|
|
})
|
|
- },
|
|
|
|
- setLightboxIndex(index) {
|
|
|
|
- this.lightbox_index = index
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|