Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions scaffold/layouts/layout-builder-block-preview.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<div>
<Nuxt />
</div>
</template>

<script>
export default {
data () {
return {
isIframeResizer: false
}
},
head () {
return {
script: [
{
hid: 'iframeResizer',
src: 'https://cdn.jsdelivr.net/npm/[email protected]/js/iframeResizer.contentWindow.min.js',
defer: true,
callback: () => { this.isIframeResizer = true }
}
]
}
}
}
</script>
20 changes: 20 additions & 0 deletions scaffold/pages/node/_node/layout/_uuid/_.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template>
<div>
<component :is="$drupal.contentComponent(page.content)" />
</div>
</template>

<script>
import { mapState } from 'vuex'

export default {
layout: 'layout-builder-block-preview',
async asyncData ({ route, $drupal }) {
// Fill the drupal-ce store with data, but do not return the data here to avoid hydrating data twice.
await $drupal.fetchPage(route.path, { params: route.query })
},
computed: {
...mapState('drupalCe', ['page'])
}
}
</script>