help.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <template lang='pug'>
  2. v-card.editor-markdown-help.animated.fadeInLeft(flat, tile)
  3. v-container.pa-3(grid-list-lg, fluid)
  4. v-layout(row, wrap)
  5. v-flex(xs12, lg6, xl4)
  6. v-card.radius-7.animated.fadeInUp(light)
  7. v-card-text
  8. .d-flex
  9. v-toolbar.radius-7(color='teal lighten-5', dense, flat, height='44')
  10. v-icon.mr-3(color='teal') info
  11. .body-2.teal--text Markdown Reference
  12. .body-2.mt-3 Bold
  13. v-layout(row)
  14. v-flex(xs6)
  15. v-card.editor-markdown-help-source(flat)
  16. v-card-text
  17. div **Lorem ipsum**
  18. v-icon chevron_right
  19. v-flex(xs6)
  20. v-card.editor-markdown-help-result(flat)
  21. v-card-text
  22. .caption: strong Lorem ipsum
  23. .body-2.mt-3 Italic
  24. v-layout(row)
  25. v-flex(xs6)
  26. v-card.editor-markdown-help-source(flat)
  27. v-card-text
  28. div *Lorem ipsum*
  29. v-icon chevron_right
  30. v-flex(xs6)
  31. v-card.editor-markdown-help-result(flat)
  32. v-card-text
  33. .caption: em Lorem ipsum
  34. .body-2.mt-3 Strikethrough
  35. v-layout(row)
  36. v-flex(xs6)
  37. v-card.editor-markdown-help-source(flat)
  38. v-card-text
  39. div ~~Lorem ipsum~~
  40. v-icon chevron_right
  41. v-flex(xs6)
  42. v-card.editor-markdown-help-result(flat)
  43. v-card-text
  44. .caption(style='text-decoration: line-through;') Lorem ipsum
  45. .body-2.mt-3 Headers
  46. v-layout(row)
  47. v-flex(xs6)
  48. v-card.editor-markdown-help-source(flat)
  49. v-card-text
  50. div # Header 1
  51. div ## Header 2
  52. div ### Header 3
  53. div #### Header 4
  54. div ##### Header 5
  55. div ###### Header 6
  56. v-icon chevron_right
  57. v-flex(xs6)
  58. v-card.editor-markdown-help-result(flat)
  59. v-card-text
  60. div(style='font-weight: 700; font-size: 24px;') Header 1
  61. div(style='font-weight: 700; font-size: 22px;') Header 2
  62. div(style='font-weight: 700; font-size: 20px;') Header 3
  63. div(style='font-weight: 700; font-size: 18px;') Header 4
  64. div(style='font-weight: 700; font-size: 16px;') Header 5
  65. div(style='font-weight: 700; font-size: 14px;') Header 6
  66. .body-2.mt-3 Unordered Lists
  67. .caption.grey--text.text--darken-1: em You can also use the asterisk symbol instead of the dash.
  68. v-layout(row)
  69. v-flex(xs6)
  70. v-card.editor-markdown-help-source(flat)
  71. v-card-text
  72. div - Unordered List Item 1
  73. div - Unordered List Item 2
  74. div - Unordered List Item 3
  75. v-icon chevron_right
  76. v-flex(xs6)
  77. v-card.editor-markdown-help-result(flat)
  78. v-card-text
  79. ul
  80. li Unordered List Item 1
  81. li Unordered List Item 2
  82. li Unordered List Item 3
  83. .body-2.mt-3 Ordered Lists
  84. .caption.grey--text.text--darken-1: em Even though we prefix all lines with #[strong 1.], the output will be correctly numbered automatically.
  85. v-layout(row)
  86. v-flex(xs6)
  87. v-card.editor-markdown-help-source(flat)
  88. v-card-text
  89. div 1. Ordered List Item 1
  90. div 1. Ordered List Item 2
  91. div 1. Ordered List Item 3
  92. v-icon chevron_right
  93. v-flex(xs6)
  94. v-card.editor-markdown-help-result(flat)
  95. v-card-text
  96. ol
  97. li Unordered List Item 1
  98. li Unordered List Item 2
  99. li Unordered List Item 3
  100. v-flex(xs12, lg6, xl4)
  101. v-card.radius-7.animated.fadeInUp.wait-p1s(light)
  102. v-card-text
  103. .d-flex
  104. v-toolbar.radius-7(color='teal lighten-5', dense, flat, height='44')
  105. v-icon.mr-3(color='teal') info
  106. .body-2.teal--text Markdown Reference (continued)
  107. .body-2.mt-3 Superscript
  108. v-layout(row)
  109. v-flex(xs6)
  110. v-card.editor-markdown-help-source(flat)
  111. v-card-text
  112. div Lorem ^ipsum^
  113. v-icon chevron_right
  114. v-flex(xs6)
  115. v-card.editor-markdown-help-result(flat)
  116. v-card-text
  117. .caption Lorem #[sup ipsum]
  118. .body-2.mt-3 Subscript
  119. v-layout(row)
  120. v-flex(xs6)
  121. v-card.editor-markdown-help-source(flat)
  122. v-card-text
  123. div Lorem ~ipsum~
  124. v-icon chevron_right
  125. v-flex(xs6)
  126. v-card.editor-markdown-help-result(flat)
  127. v-card-text
  128. .caption: em Lorem #[sub ipsum]
  129. .body-2.mt-3 Horizontal Line
  130. v-layout(row)
  131. v-flex(xs6)
  132. v-card.editor-markdown-help-source(flat)
  133. v-card-text
  134. div Lorem ipsum
  135. div ---
  136. div Dolor sit amet
  137. v-icon chevron_right
  138. v-flex(xs6)
  139. v-card.editor-markdown-help-result(flat)
  140. v-card-text
  141. .caption Lorem ipsum
  142. v-divider.my-2
  143. .caption Dolor sit amet
  144. .body-2.mt-3 Inline Code
  145. v-layout(row)
  146. v-flex(xs6)
  147. v-card.editor-markdown-help-source(flat)
  148. v-card-text
  149. div Lorem `ipsum dolor sit` amet
  150. v-icon chevron_right
  151. v-flex(xs6)
  152. v-card.editor-markdown-help-result(flat)
  153. v-card-text
  154. .caption Lorem #[code ipsum dolor sit] amet
  155. .body-2.mt-3 Code Blocks
  156. .caption.grey--text.text--darken-1: em In the example below, #[strong js] defines the syntax highlighting language to use. It can be omitted.
  157. v-layout(row)
  158. v-flex(xs6)
  159. v-card.editor-markdown-help-source(flat)
  160. v-card-text
  161. div ```js
  162. div function main () {
  163. div.pl-3 echo 'Lorem ipsum'
  164. div }
  165. div ```
  166. v-icon chevron_right
  167. v-flex(xs6)
  168. v-card.editor-markdown-help-result(flat)
  169. v-card-text.contents
  170. pre.prismjs.line-numbers.language-js
  171. code.language-js
  172. span.token.keyword function
  173. span.token.function main
  174. span.token.punctuation (
  175. span.token.punctuation )
  176. span.token.punctuation {#[br]
  177. | echo
  178. span.token.string 'Lorem ipsum'#[br]
  179. span.token.punctuation }
  180. span.line-numbers-rows(aria-hidden='true')
  181. span
  182. span
  183. span
  184. .body-2.mt-3 Blockquotes
  185. v-layout(row)
  186. v-flex(xs6)
  187. v-card.editor-markdown-help-source(flat)
  188. v-card-text
  189. div &gt; Lorem ipsum
  190. div &gt; dolor sit amet
  191. div &gt; consectetur adipiscing elit
  192. v-icon chevron_right
  193. v-flex(xs6)
  194. v-card.editor-markdown-help-result(flat)
  195. v-card-text
  196. blockquote(style='border: 1px solid #263238; border-radius: .5rem; padding: 1rem 24px;') Lorem ipsum#[br]dolor sit amet#[br]consectetur adipiscing elit
  197. v-flex(xs12, xl4)
  198. v-card.radius-7.animated.fadeInUp.wait-p2s(light)
  199. v-card-text
  200. v-toolbar.radius-7(color='teal lighten-5', dense, flat)
  201. v-icon.mr-3(color='teal') keyboard
  202. .body-2.teal--text Keyboard Shortcuts
  203. v-list.editor-markdown-help-kbd(two-line, dense)
  204. v-list-tile
  205. v-list-tile-content.body-2 Bold
  206. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd B]
  207. v-divider
  208. v-list-tile
  209. v-list-tile-content.body-2 Italic
  210. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd I]
  211. v-divider
  212. v-list-tile
  213. v-list-tile-content.body-2 Increase Header Level
  214. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd {{altKey}}] + #[kbd Right]
  215. v-divider
  216. v-list-tile
  217. v-list-tile-content.body-2 Decrease Header Level
  218. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd {{altKey}}] + #[kbd Left]
  219. v-divider
  220. v-list-tile
  221. v-list-tile-content.body-2 Save
  222. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd S]
  223. v-divider
  224. v-list-tile
  225. v-list-tile-content.body-2 Undo
  226. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd Z]
  227. v-divider
  228. v-list-tile
  229. v-list-tile-content.body-2 Redo
  230. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd Y]
  231. v-divider
  232. v-list-tile
  233. v-list-tile-content
  234. v-list-tile-title.body-2 Distraction Free Mode
  235. v-list-tile-sub-title Press <kbd>Esc</kbd> to exit.
  236. v-list-tile-action #[kbd F11]
  237. v-card.radius-7.animated.fadeInUp.wait-p3s.mt-3(light)
  238. v-card-text
  239. v-toolbar.radius-7(color='teal lighten-5', dense, flat)
  240. v-icon.mr-3(color='teal') mouse
  241. .body-2.teal--text Multi-Selection
  242. v-list.editor-markdown-help-kbd(two-line, dense)
  243. v-list-tile
  244. v-list-tile-content.body-2 Multiple Cursors
  245. v-list-tile-action #[kbd {{ctrlKey}}] + Left Click
  246. v-divider
  247. v-list-tile
  248. v-list-tile-content.body-2 Select Region
  249. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd {{altKey}}] + Left Click
  250. v-divider
  251. v-list-tile
  252. v-list-tile-content.body-2 Deselect
  253. v-list-tile-action #[kbd Esc]
  254. </template>
  255. <script>
  256. export default {
  257. computed: {
  258. ctrlKey() { return /Mac/.test(navigator.platform) ? 'Cmd' : 'Ctrl' },
  259. altKey() { return /Mac/.test(navigator.platform) ? 'Option' : 'Alt' }
  260. }
  261. }
  262. </script>
  263. <style lang='scss'>
  264. .editor-markdown-help {
  265. position: fixed;
  266. top: 112px;
  267. left: 64px;
  268. z-index: 10;
  269. width: calc(100vw - 64px - 17px);
  270. height: calc(100vh - 112px - 24px);
  271. background-color: rgba(darken(mc('grey', '900'), 3%), .9) !important;
  272. overflow: auto;
  273. &-source {
  274. background-color: mc('blue-grey', '900') !important;
  275. border-radius: 7px;
  276. font-family: 'Roboto Mono', monospace;
  277. font-size: 14px;
  278. color: #FFF !important;
  279. }
  280. &-result {
  281. background-color: mc('blue-grey', '50') !important;
  282. border-radius: 7px;
  283. font-size: 14px;
  284. code {
  285. display: inline-block;
  286. background-color: mc('pink', '50');
  287. box-shadow: none;
  288. font-size: inherit;
  289. }
  290. .contents {
  291. padding-bottom: 16px;
  292. }
  293. .prismjs {
  294. margin: 0;
  295. }
  296. }
  297. &-kbd {
  298. .v-list__tile__action {
  299. flex-direction: row;
  300. align-items: center;
  301. kbd {
  302. margin: 0 5px;
  303. display: inline-block;
  304. border: 1px solid #ccc;
  305. border-radius: 4px;
  306. padding: 0.1em 0.5em;
  307. margin: 0 0.2em;
  308. box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
  309. background-color: #f7f7f7;
  310. color: mc('grey', '700');
  311. font-size: 12px;
  312. }
  313. }
  314. }
  315. &-ref {
  316. .v-list__tile__action {
  317. flex-direction: row;
  318. align-items: center;
  319. }
  320. }
  321. }
  322. </style>