|
@@ -5,13 +5,39 @@
|
|
|
>
|
|
|
<slot name="default">
|
|
|
<node-view-figure
|
|
|
- v-if="mode === 'view' && type === 'prod' && node.title"
|
|
|
+ v-if="mode === 'view' && type === 'prod' && node.image"
|
|
|
@expand-image="image = $event"
|
|
|
:node="node"
|
|
|
/>
|
|
|
|
|
|
<div class="node-view-body-wrapper" v-html="node.content" />
|
|
|
|
|
|
+ <template v-if="mode === 'view'">
|
|
|
+ <div v-if="node.images" class="mt-5">
|
|
|
+ <div class="node-view-img-wrapper mt-3" v-for="img in node.images" :key="img.id">
|
|
|
+ <img :src="img.url" :alt="img.alt">
|
|
|
+ <button-expand @click="onImageExpandClick(img)" v-b-modal="'modal-image-' + node.id" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-if="node.videos">
|
|
|
+ <video
|
|
|
+ v-for="video in node.videos" :key="video.url"
|
|
|
+ :src="video.url" class="mt-3"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <ul v-if="node.files">
|
|
|
+ <h6>Fichiers:</h6>
|
|
|
+
|
|
|
+ <li v-for="file in node.files" :key="file.fid">
|
|
|
+ <b-button variant="dark" :href="file.url">
|
|
|
+ {{ file.filename }}
|
|
|
+ </b-button>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </template>
|
|
|
+
|
|
|
<fullscreen-modal v-if="mode === 'view' && image" :image="image" :id="'modal-image-' + node.id" />
|
|
|
|
|
|
<template v-if="mode === 'view'">
|
|
@@ -112,14 +138,18 @@ export default {
|
|
|
cloneImg.setAttribute('alt', image.alt)
|
|
|
cloneImg.setAttribute('id', image.id)
|
|
|
clone.querySelector('button').onclick = () => {
|
|
|
- this.image = image
|
|
|
- this.$bvModal.show('modal-image-' + this.node.id)
|
|
|
+ this.onImageExpandClick(image)
|
|
|
}
|
|
|
|
|
|
img.parentElement.replaceWith(clone)
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ onImageExpandClick (image) {
|
|
|
+ this.image = image
|
|
|
+ this.$bvModal.show('modal-image-' + this.node.id)
|
|
|
+ },
|
|
|
+
|
|
|
onFootnoteLinkClick (node, popoverBtnId) {
|
|
|
this.$root.$emit('bv::hide::popover', popoverBtnId)
|
|
|
this.$parent.$emit('open-node', getRelation(node))
|