editor-modal-editorselect.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <template lang='pug'>
  2. v-dialog(v-model='isShown', persistent, max-width='700')
  3. v-card.radius-7(color='blue darken-3', dark)
  4. v-card-text.text-center.py-4
  5. .subtitle-1.white--text {{$t('editor:select.title')}}
  6. v-container(grid-list-lg, fluid)
  7. v-layout(row, wrap, justify-center)
  8. v-flex(xs4)
  9. v-hover
  10. template(v-slot:default='{ hover }')
  11. v-card.radius-7.grey.animated.fadeInUp(
  12. hover
  13. light
  14. ripple
  15. )
  16. v-card-text.text-center(@click='')
  17. img(src='/svg/editor-icon-api.svg', alt='API', style='width: 36px;')
  18. .body-2.mt-2.grey--text.text--darken-2 API Docs
  19. .caption.grey--text.text--darken-1 REST / GraphQL
  20. v-fade-transition
  21. v-overlay(
  22. v-if='hover'
  23. absolute
  24. color='primary'
  25. opacity='.8'
  26. )
  27. .body-2.mt-7 Coming Soon
  28. v-flex(xs4)
  29. v-hover
  30. template(v-slot:default='{ hover }')
  31. v-card.radius-7.grey.animated.fadeInUp.wait-p1s(
  32. hover
  33. light
  34. ripple
  35. )
  36. v-card-text.text-center(@click='')
  37. img(src='/svg/editor-icon-wikitext.svg', alt='WikiText', style='width: 36px;')
  38. .body-2.grey--text.mt-2.text--darken-2 Blog
  39. .caption.grey--text.text--darken-1 Timeline of Posts
  40. v-fade-transition
  41. v-overlay(
  42. v-if='hover'
  43. absolute
  44. color='primary'
  45. opacity='.8'
  46. )
  47. .body-2.mt-7 Coming Soon
  48. v-flex(xs4)
  49. v-card.radius-7.animated.fadeInUp.wait-p2s(
  50. hover
  51. light
  52. ripple
  53. )
  54. v-card-text.text-center(@click='selectEditor("code")')
  55. img(src='/svg/editor-icon-code.svg', alt='Code', style='width: 36px;')
  56. .body-2.primary--text.mt-2 Code
  57. .caption.grey--text Raw HTML
  58. v-flex(xs4)
  59. v-card.radius-7.animated.fadeInUp.wait-p1s(
  60. hover
  61. light
  62. ripple
  63. )
  64. v-card-text.text-center(@click='selectEditor("markdown")')
  65. img(src='/svg/editor-icon-markdown.svg', alt='Markdown', style='width: 36px;')
  66. .body-2.primary--text.mt-2 Markdown
  67. .caption.grey--text Plain Text Formatting
  68. v-flex(xs4)
  69. v-hover
  70. template(v-slot:default='{ hover }')
  71. v-card.radius-7.grey.animated.fadeInUp.wait-p2s(
  72. hover
  73. light
  74. ripple
  75. )
  76. v-card-text.text-center(@click='')
  77. img(src='/svg/editor-icon-tabular.svg', alt='Tabular', style='width: 36px;')
  78. .body-2.grey--text.mt-2.text--darken-2 Tabular
  79. .caption.grey--text.text--darken-1 Excel-like
  80. v-fade-transition
  81. v-overlay(
  82. v-if='hover'
  83. absolute
  84. color='primary'
  85. opacity='.8'
  86. )
  87. .body-2.mt-7 Coming Soon
  88. v-flex(xs4)
  89. v-card.radius-7.animated.fadeInUp.wait-p3s(
  90. hover
  91. light
  92. ripple
  93. )
  94. v-card-text.text-center(@click='selectEditor("ckeditor")')
  95. img(src='/svg/editor-icon-ckeditor.svg', alt='Visual Editor', style='width: 36px;')
  96. .body-2.mt-2.primary--text Visual Editor
  97. .caption.grey--text Rich-text WYSIWYG
  98. .caption.blue--text.text--lighten-2 {{$t('editor:select.cannotChange')}}
  99. v-card.radius-7.mt-2(color='indigo darken-3', dark)
  100. v-toolbar(dense, flat, color='light-green darken-3')
  101. v-spacer
  102. .caption.mr-1 Or convert from
  103. v-btn.mx-1(depressed, color='light-green darken-2', @click='')
  104. v-icon(left) mdi-alpha-a-box
  105. .body-2.text-none AsciiDoc
  106. v-btn.mx-1(depressed, color='light-green darken-2', @click='')
  107. v-icon(left) mdi-alpha-w-circle
  108. .body-2.text-none WikiText
  109. v-spacer
  110. v-card.radius-7.mt-2(color='teal darken-3', dark)
  111. v-card-text.text-center.py-4
  112. .subtitle-1.white--text {{$t('editor:select.customView')}}
  113. v-container(grid-list-lg, fluid)
  114. v-layout(row, wrap, justify-center)
  115. v-flex(xs4)
  116. v-hover
  117. template(v-slot:default='{ hover }')
  118. v-card.radius-7.grey.animated.fadeInUp(
  119. hover
  120. light
  121. ripple
  122. )
  123. v-card-text.text-center(@click='')
  124. img(src='/svg/icon-cube.svg', alt='From Template', style='width: 42px;')
  125. .body-2.mt-1.grey--text.text--darken-2 From Template
  126. .caption.grey--text.text--darken-1 Use an existing page / tree
  127. v-fade-transition
  128. v-overlay(
  129. v-if='hover'
  130. absolute
  131. color='teal'
  132. opacity='.8'
  133. )
  134. .body-2.mt-7 Coming Soon
  135. v-flex(xs4)
  136. v-hover
  137. template(v-slot:default='{ hover }')
  138. v-card.radius-7.grey.animated.fadeInUp.wait-p1s(
  139. hover
  140. light
  141. ripple
  142. )
  143. v-card-text.text-center(@click='')
  144. img(src='/svg/icon-tree-structure.svg', alt='Tree View', style='width: 42px;')
  145. .body-2.mt-1.grey--text.text--darken-2 Tree View
  146. .caption.grey--text.text--darken-1 List children pages
  147. v-fade-transition
  148. v-overlay(
  149. v-if='hover'
  150. absolute
  151. color='teal'
  152. opacity='.8'
  153. )
  154. .body-2.mt-7 Coming Soon
  155. v-flex(xs4)
  156. v-hover
  157. template(v-slot:default='{ hover }')
  158. v-card.radius-7.grey.animated.fadeInUp.wait-p2s(
  159. hover
  160. light
  161. ripple
  162. )
  163. v-card-text.text-center(@click='')
  164. img(src='/svg/icon-sewing-patch.svg', alt='Code', style='width: 42px;')
  165. .body-2.mt-1.grey--text.text--darken-2 Embed
  166. .caption.grey--text.text--darken-1 Include external pages
  167. v-fade-transition
  168. v-overlay(
  169. v-if='hover'
  170. absolute
  171. color='teal'
  172. opacity='.8'
  173. )
  174. .body-2.mt-7 Coming Soon
  175. v-card.radius-7.mt-2(color='grey darken-3', dark)
  176. v-toolbar(dense, flat)
  177. v-spacer
  178. v-btn(text, @click='goBack')
  179. v-icon(left) mdi-undo-variant
  180. span Cancel
  181. v-spacer
  182. </template>
  183. <script>
  184. import _ from 'lodash'
  185. import { sync } from 'vuex-pathify'
  186. export default {
  187. props: {
  188. value: {
  189. type: Boolean,
  190. default: false
  191. }
  192. },
  193. data() {
  194. return { }
  195. },
  196. computed: {
  197. isShown: {
  198. get() { return this.value },
  199. set(val) { this.$emit('input', val) }
  200. },
  201. currentEditor: sync('editor/editor')
  202. },
  203. methods: {
  204. selectEditor(name) {
  205. this.currentEditor = `editor${_.startCase(name)}`
  206. this.isShown = false
  207. },
  208. goBack() {
  209. window.history.go(-2)
  210. }
  211. }
  212. }
  213. </script>
  214. <style lang='scss'>
  215. </style>