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.

81 lines
1.8 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-row(dense)
  5. v-col(
  6. v-for='(item, idx) of blocks'
  7. :key='`block-` + item.key'
  8. cols='12'
  9. lg='4'
  10. xl='3'
  11. )
  12. v-card.radius-7(light, flat, @click='selectBlock(item)')
  13. v-card-text
  14. .d-flex.align-center
  15. v-avatar.radius-7(color='teal')
  16. v-icon(dark) {{item.icon}}
  17. .pl-3
  18. .body-2: strong.teal--text {{item.title}}
  19. .caption.grey--text {{item.description}}
  20. </template>
  21. <script>
  22. import _ from 'lodash'
  23. import { sync } from 'vuex-pathify'
  24. export default {
  25. props: {
  26. value: {
  27. type: Boolean,
  28. default: false
  29. }
  30. },
  31. data() {
  32. return {
  33. blocks: [
  34. {
  35. key: 'childlist',
  36. title: 'List Children Pages',
  37. description: 'Display a links list of all children of this page.',
  38. icon: 'mdi-format-list-text'
  39. },
  40. {
  41. key: 'tabs',
  42. title: 'Tabs',
  43. description: 'Organize content within tabs.',
  44. icon: 'mdi-tab'
  45. }
  46. ]
  47. }
  48. },
  49. computed: {
  50. isShown: {
  51. get() { return this.value },
  52. set(val) { this.$emit('input', val) }
  53. },
  54. activeModal: sync('editor/activeModal')
  55. },
  56. methods: {
  57. selectBlock (item) {
  58. this.block = _.cloneDeep(item)
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang='scss'>
  64. .editor-modal-blocks {
  65. position: fixed;
  66. top: 112px;
  67. left: 64px;
  68. z-index: 10;
  69. width: calc(100vw - 64px - 17px);
  70. height: calc(100vh - 112px - 24px);
  71. background-color: rgba(darken(mc('grey', '900'), 3%), .9) !important;
  72. @include until($tablet) {
  73. left: 40px;
  74. width: calc(100vw - 40px);
  75. }
  76. }
  77. </style>