editor-modal-editorselect.vue 8.7 KB

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