|
|
@@ -10,34 +10,17 @@
|
|
10
|
10
|
p end: {{ dateFrom(post.end) }}
|
|
11
|
11
|
|
|
12
|
12
|
|
|
13
|
|
- .post-single.block-wrapper(v-for="(block, i) in post.blocks" :key="`block-${i}`")
|
|
14
|
|
- //- ?: are objects are always gallery blocks
|
|
15
|
|
- .gallery.block(v-if="typeof block === 'object'" :class="`gallery-${i}`")
|
|
16
|
|
- p gallery number: {{ i }}
|
|
17
|
|
- p {{ post.blocks }}
|
|
18
|
|
- //- p ids: {{ post.galleries[block.gallery].innerHTML }}
|
|
19
|
|
- //- .test(v-html="post.galleries[block.gallery].innerHTML")
|
|
20
|
|
- //- ul.t-cntr(v-if="post.galleries[block.gallery]")
|
|
21
|
|
- //- li(v-for="(imageID, j) in getImageIdsForGallery(block.gallery)" :class="`gallery-${i}--image-${j+1}`" :key="`block-${i}-${j}`")
|
|
22
|
|
- //- img(@click="openGallery(i - 1, imageID)" :src="post.attached[imageID]['thumbnail']")
|
|
23
|
|
- //- //- TO DO Caption stuff and full screen Title/Description
|
|
24
|
|
- //- p Caption goes here<br>
|
|
25
|
|
- //- button(@click="openGallery(i - 1, imageID)") gallery: {{ i }} image: {{ imageID }}
|
|
26
|
|
- br
|
|
27
|
|
- //- Fullscreen gallery component for every gallery block
|
|
28
|
|
- gallery(
|
|
29
|
|
- v-if="activeGalleryIndex == (i - 1)"
|
|
30
|
|
- :activeImageIndex="activeImageIndex"
|
|
31
|
|
- v-on:close="activeGalleryIndex = -1"
|
|
32
|
|
- :images="imagesInGallery"
|
|
33
|
|
- )
|
|
34
|
|
-
|
|
|
13
|
+ .post-single.block-wrapper(v-for="(block, index) in post.blocks" :key="`block-${index}`")
|
|
|
14
|
+ block(:block="block")
|
|
|
15
|
+ p(v-if="block.hasOwnProperty('gallery')") {{ block }}
|
|
|
16
|
+ p(v-else-if="block.length && typeof block === 'object'" v-for="inner in block") {{ inner }}
|
|
|
17
|
+ p(v-else) single {{ block }}
|
|
35
|
18
|
//- Just a regular block (html or img)
|
|
36
|
|
- .block(v-else v-html="block")
|
|
|
19
|
+ //- .block(v-else v-html="block")
|
|
37
|
20
|
|
|
38
|
21
|
sidebar(v-if="sidebar" :type="`${type}`")
|
|
39
|
22
|
.shadow
|
|
40
|
|
- h1.t-up single slot
|
|
|
23
|
+ h1.t-up single slot
|
|
41
|
24
|
div
|
|
42
|
25
|
p body whatever
|
|
43
|
26
|
</template>
|
|
|
@@ -45,12 +28,14 @@
|
|
45
|
28
|
<script>
|
|
46
|
29
|
import sidebar from '@/components/sidebars/sidebar'
|
|
47
|
30
|
import gallery from '@/components/gallery/'
|
|
|
31
|
+import block from '@/components/block'
|
|
|
32
|
+
|
|
48
|
33
|
import { postTypeGetters } from './mixin-post-types'
|
|
49
|
34
|
|
|
50
|
35
|
import { convertTitleCase, typeFromRoute } from '@/utils/helpers'
|
|
51
|
36
|
|
|
52
|
37
|
export default {
|
|
53
|
|
- components: { sidebar, gallery },
|
|
|
38
|
+ components: { sidebar, gallery, block },
|
|
54
|
39
|
props: {
|
|
55
|
40
|
sidebar: { type: Boolean }
|
|
56
|
41
|
},
|