NEXT craftinamerica.org. Base setup for headless wordpress https://www.craftinamerica.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

block.vue 771B

1234567891011121314151617181920212223242526272829303132333435
  1. <template lang="pug">
  2. .block.gallery(v-if="block.hasOwnProperty('gallery')")
  3. p place-holder gallery {{ block.gallery }}
  4. .block.embed(v-else-if="block[0].blockName == 'core/embed'")
  5. .youtube(v-if="block[0].attrs.providerNameSlug == 'youtube'")
  6. p youtube: {{ block[0].attrs }}
  7. .not-youtube(v-else)
  8. p not youtube: {{ block[0].attrs }}
  9. rblock(v-else-if="typeof block === 'object'" :block="block")
  10. .block.single(v-else)
  11. .single--content(v-html="block")
  12. </template>
  13. <script>
  14. import rblock from './block-recursive'
  15. export default {
  16. components: { rblock },
  17. props: {
  18. block: { required: true }
  19. },
  20. data() {
  21. return {
  22. }
  23. },
  24. computed: {
  25. }
  26. }
  27. </script>
  28. <style lang="postcss">
  29. .block
  30. </style>