Advertisement
Guest User

Untitled

a guest
Oct 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. <template>
  2. <div class="preview">
  3. <table width="100%">
  4. <tr v-for="sectionName in ['header', 'body', 'footer']" :key="sectionName">
  5. <td align="center" :style="document[sectionName].style()">
  6.  
  7. <table width="600">
  8. <tr>
  9. <td>
  10.  
  11. <table width="100%">
  12. <tr v-for="row in document[sectionName].children" :id="row.id" :key="row.id" :style="row.style()">
  13. <td>
  14.  
  15. <table width="100%">
  16. <tr>
  17. <td
  18. v-for="col in row.children"
  19. :id="col.id"
  20. :style="col.style()"
  21. :width="col.attributes.width"
  22. :key="col.id"
  23. >
  24. <img v-if="constructorName(col.children[0]) === 'ContentImage'" :src="col.children[0].url" :style="col.children[0].style()">
  25. <span v-if="constructorName(col.children[0]) === 'ContentText'" v-html="markdownToHtml(col.children[0].text)"></span>
  26. <hr v-if="constructorName(col.children[0]) === 'ContentHorizontalRule'" />
  27. <div v-if="constructorName(col.children[0]) === 'ContentSpacer'" :style="col.children[0].style()" /></div>
  28. <a v-if="constructorName(col.children[0]) === 'ContentButton'" :href="col.children[0].url" target="_blank" :style="col.children[0].style()" />{{col.children[0].text}}</a>
  29. </td>
  30. </tr>
  31. </table>
  32.  
  33. </td>
  34. </tr>
  35. </table>
  36.  
  37. </td>
  38. </tr>
  39. </table>
  40.  
  41. </td>
  42. </tr>
  43. </table>
  44. </div>
  45. </template>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement