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.

91 lines
2.7 KiB

  1. <template lang='pug'>
  2. v-card.editor-modal-blocks.animated.fadeInLeft(flat, tile)
  3. v-container.pa-3(grid-list-lg, fluid)
  4. v-layout(row, wrap)
  5. v-flex(xs12, lg4, xl3)
  6. v-card.radius-7(light)
  7. v-card-text
  8. .d-flex
  9. v-toolbar.radius-7(color='teal lighten-5', dense, flat, height='44')
  10. .body-2.teal--text Blocks
  11. v-list(two-line)
  12. template(v-for='(item, idx) of blocks')
  13. v-list-item(@click='selectBlock(item)')
  14. v-list-item-avatar
  15. v-avatar.radius-7(color='teal')
  16. v-icon(dark) dashboard
  17. v-list-item-content
  18. v-list-item-title.body-2 {{item.title}}
  19. v-list-item-sub-title {{item.description}}
  20. v-list-item-avatar(v-if='block.key === item.key')
  21. v-icon.animated.fadeInLeft(color='teal') arrow_forward_ios
  22. v-divider(v-if='idx < blocks.length - 1')
  23. v-flex(xs3)
  24. v-card.radius-7.animated.fadeInLeft(light, v-if='block.key')
  25. v-card-text
  26. v-toolbar.radius-7(color='teal lighten-5', dense, flat)
  27. v-icon.mr-3(color='teal') dashboard
  28. .body-2.teal--text {{block.title}}
  29. .d-flex.mt-3
  30. v-toolbar.radius-7(flat, color='grey lighten-4', dense, height='44')
  31. .body-2 Coming soon
  32. v-btn.ml-3.my-0.mr-0.radius-7(color='teal', large, @click='', disabled)
  33. v-icon(left) save_alt
  34. span Insert
  35. </template>
  36. <script>
  37. import _ from 'lodash'
  38. import { sync } from 'vuex-pathify'
  39. export default {
  40. props: {
  41. value: {
  42. type: Boolean,
  43. default: false
  44. }
  45. },
  46. data() {
  47. return {
  48. blocks: [
  49. { key: 'hero', title: 'Hero', description: 'A large banner with a title.' },
  50. { key: 'toc', title: 'Table of Contents', description: 'A list of children pages.' }
  51. // { key: 'form', title: 'Form', description: '' }
  52. ],
  53. block: {
  54. key: false
  55. }
  56. }
  57. },
  58. computed: {
  59. isShown: {
  60. get() { return this.value },
  61. set(val) { this.$emit('input', val) }
  62. },
  63. activeModal: sync('editor/activeModal')
  64. },
  65. methods: {
  66. selectBlock (item) {
  67. this.block = _.cloneDeep(item)
  68. }
  69. }
  70. }
  71. </script>
  72. <style lang='scss'>
  73. .editor-modal-blocks {
  74. position: fixed;
  75. top: 112px;
  76. left: 64px;
  77. z-index: 10;
  78. width: calc(100vw - 64px - 17px);
  79. height: calc(100vh - 112px - 24px);
  80. background-color: rgba(darken(mc('grey', '900'), 3%), .9) !important;
  81. @include until($tablet) {
  82. left: 40px;
  83. width: calc(100vw - 40px);
  84. }
  85. }
  86. </style>