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.

352 lines
14 KiB

  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') mdi-information-variant
  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 mdi-chevron-right
  19. v-flex
  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 mdi-chevron-right
  30. v-flex
  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 mdi-chevron-right
  41. v-flex
  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 mdi-chevron-right
  57. v-flex
  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 mdi-chevron-right
  76. v-flex
  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 mdi-chevron-right
  93. v-flex
  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. .body-2.mt-3 Images
  101. v-layout(row)
  102. v-flex(xs6)
  103. v-card.editor-markdown-help-source(flat)
  104. v-card-text
  105. div ![Caption Text](/path/to/image.jpg)
  106. v-icon mdi-chevron-right
  107. v-flex
  108. v-card.editor-markdown-help-result(flat)
  109. v-card-text
  110. img(src='https://via.placeholder.com/150x50.png')
  111. v-flex(xs12, lg6, xl4)
  112. v-card.radius-7.animated.fadeInUp.wait-p1s(light)
  113. v-card-text
  114. .d-flex
  115. v-toolbar.radius-7(color='teal lighten-5', dense, flat, height='44')
  116. v-icon.mr-3(color='teal') mdi-information-variant
  117. .body-2.teal--text Markdown Reference (continued)
  118. .body-2.mt-3 Links
  119. v-layout(row)
  120. v-flex(xs6)
  121. v-card.editor-markdown-help-source(flat)
  122. v-card-text
  123. div [Link Text](https://wiki.js.org)
  124. v-icon mdi-chevron-right
  125. v-flex
  126. v-card.editor-markdown-help-result(flat)
  127. v-card-text
  128. .caption: a(href='https://wiki.js.org', target='_blank') Link Text
  129. .body-2.mt-3 Superscript
  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. v-icon mdi-chevron-right
  136. v-flex
  137. v-card.editor-markdown-help-result(flat)
  138. v-card-text
  139. .caption Lorem #[sup ipsum]
  140. .body-2.mt-3 Subscript
  141. v-layout(row)
  142. v-flex(xs6)
  143. v-card.editor-markdown-help-source(flat)
  144. v-card-text
  145. div Lorem ~ipsum~
  146. v-icon mdi-chevron-right
  147. v-flex
  148. v-card.editor-markdown-help-result(flat)
  149. v-card-text
  150. .caption: em Lorem #[sub ipsum]
  151. .body-2.mt-3 Horizontal Line
  152. v-layout(row)
  153. v-flex(xs6)
  154. v-card.editor-markdown-help-source(flat)
  155. v-card-text
  156. div Lorem ipsum
  157. div ---
  158. div Dolor sit amet
  159. v-icon mdi-chevron-right
  160. v-flex
  161. v-card.editor-markdown-help-result(flat)
  162. v-card-text
  163. .caption Lorem ipsum
  164. v-divider.my-2
  165. .caption Dolor sit amet
  166. .body-2.mt-3 Inline Code
  167. v-layout(row)
  168. v-flex(xs6)
  169. v-card.editor-markdown-help-source(flat)
  170. v-card-text
  171. div Lorem `ipsum dolor sit` amet
  172. v-icon mdi-chevron-right
  173. v-flex
  174. v-card.editor-markdown-help-result(flat)
  175. v-card-text
  176. .caption Lorem #[code ipsum dolor sit] amet
  177. .body-2.mt-3 Code Blocks
  178. .caption.grey--text.text--darken-1: em In the example below, #[strong js] defines the syntax highlighting language to use. It can be omitted.
  179. v-layout(row)
  180. v-flex(xs6)
  181. v-card.editor-markdown-help-source(flat)
  182. v-card-text
  183. div ```js
  184. div function main () {
  185. div.pl-3 echo 'Lorem ipsum'
  186. div }
  187. div ```
  188. v-icon mdi-chevron-right
  189. v-flex
  190. v-card.editor-markdown-help-result(flat)
  191. v-card-text.contents
  192. pre.prismjs.line-numbers.language-js
  193. code.language-js
  194. span.token.keyword function
  195. span.token.function main
  196. span.token.punctuation (
  197. span.token.punctuation )
  198. span.token.punctuation {#[br]
  199. | echo
  200. span.token.string 'Lorem ipsum'#[br]
  201. span.token.punctuation }
  202. span.line-numbers-rows(aria-hidden='true')
  203. span
  204. span
  205. span
  206. .body-2.mt-3 Blockquotes
  207. v-layout(row)
  208. v-flex(xs6)
  209. v-card.editor-markdown-help-source(flat)
  210. v-card-text
  211. div &gt; Lorem ipsum
  212. div &gt; dolor sit amet
  213. div &gt; consectetur adipiscing elit
  214. v-icon mdi-chevron-right
  215. v-flex
  216. v-card.editor-markdown-help-result(flat)
  217. v-card-text
  218. blockquote(style='border: 1px solid #263238; border-radius: .5rem; padding: 1rem 24px;') Lorem ipsum#[br]dolor sit amet#[br]consectetur adipiscing elit
  219. v-flex(xs12, xl4)
  220. v-card.radius-7.animated.fadeInUp.wait-p2s(light)
  221. v-card-text
  222. v-toolbar.radius-7(color='teal lighten-5', dense, flat)
  223. v-icon.mr-3(color='teal') mdi-keyboard
  224. .body-2.teal--text Keyboard Shortcuts
  225. v-list.editor-markdown-help-kbd(two-line, dense)
  226. v-list-item
  227. v-list-item-content.body-2 Bold
  228. v-list-item-action #[kbd {{ctrlKey}}] + #[kbd B]
  229. v-divider
  230. v-list-item
  231. v-list-item-content.body-2 Italic
  232. v-list-item-action #[kbd {{ctrlKey}}] + #[kbd I]
  233. v-divider
  234. v-list-item
  235. v-list-item-content.body-2 Increase Header Level
  236. v-list-item-action #[kbd {{ctrlKey}}] + #[kbd {{altKey}}] + #[kbd Right]
  237. v-divider
  238. v-list-item
  239. v-list-item-content.body-2 Decrease Header Level
  240. v-list-item-action #[kbd {{ctrlKey}}] + #[kbd {{altKey}}] + #[kbd Left]
  241. v-divider
  242. v-list-item
  243. v-list-item-content.body-2 Save
  244. v-list-item-action #[kbd {{ctrlKey}}] + #[kbd S]
  245. v-divider
  246. v-list-item
  247. v-list-item-content.body-2 Undo
  248. v-list-item-action #[kbd {{ctrlKey}}] + #[kbd Z]
  249. v-divider
  250. v-list-item
  251. v-list-item-content.body-2 Redo
  252. v-list-item-action #[kbd {{ctrlKey}}] + #[kbd Y]
  253. v-divider
  254. v-list-item
  255. v-list-item-content
  256. v-list-item-title.body-2 Distraction Free Mode
  257. v-list-item-subtitle Press <kbd>Esc</kbd> to exit.
  258. v-list-item-action #[kbd F11]
  259. v-card.radius-7.animated.fadeInUp.wait-p3s.mt-3(light)
  260. v-card-text
  261. v-toolbar.radius-7(color='teal lighten-5', dense, flat)
  262. v-icon.mr-3(color='teal') mdi-mouse
  263. .body-2.teal--text Multi-Selection
  264. v-list.editor-markdown-help-kbd(two-line, dense)
  265. v-list-item
  266. v-list-item-content.body-2 Multiple Cursors
  267. v-list-item-action #[kbd {{ctrlKey}}] + Left Click
  268. v-divider
  269. v-list-item
  270. v-list-item-content.body-2 Select Region
  271. v-list-item-action #[kbd {{ctrlKey}}] + #[kbd {{altKey}}] + Left Click
  272. v-divider
  273. v-list-item
  274. v-list-item-content.body-2 Deselect
  275. v-list-item-action #[kbd Esc]
  276. </template>
  277. <script>
  278. export default {
  279. computed: {
  280. ctrlKey() { return /Mac/.test(navigator.platform) ? 'Cmd' : 'Ctrl' },
  281. altKey() { return /Mac/.test(navigator.platform) ? 'Option' : 'Alt' }
  282. }
  283. }
  284. </script>
  285. <style lang='scss'>
  286. .editor-markdown-help {
  287. position: fixed !important;
  288. top: 112px;
  289. left: 64px;
  290. z-index: 10;
  291. width: calc(100vw - 64px - 17px);
  292. height: calc(100vh - 112px - 24px);
  293. background-color: rgba(darken(mc('grey', '900'), 3%), .9) !important;
  294. overflow: auto;
  295. &-source {
  296. background-color: mc('blue-grey', '900') !important;
  297. border-radius: 7px;
  298. font-family: 'Roboto Mono', monospace;
  299. font-size: 14px;
  300. color: #FFF !important;
  301. .v-card__text {
  302. color: #FFF !important;
  303. }
  304. }
  305. &-result {
  306. background-color: mc('blue-grey', '50') !important;
  307. border-radius: 7px;
  308. font-size: 14px;
  309. code {
  310. display: inline-block;
  311. background-color: mc('pink', '50');
  312. box-shadow: none;
  313. font-size: inherit;
  314. }
  315. .contents {
  316. padding-bottom: 16px;
  317. }
  318. .prismjs {
  319. margin: 0;
  320. }
  321. }
  322. &-kbd {
  323. .v-list-item__action {
  324. flex-direction: row;
  325. align-items: center;
  326. kbd {
  327. display: inline-block;
  328. border: 1px solid #ccc;
  329. border-radius: 4px;
  330. padding: 0.1em 0.5em;
  331. margin: 0 0.2em;
  332. box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
  333. background-color: #f7f7f7;
  334. color: mc('grey', '700');
  335. font-size: 12px;
  336. }
  337. }
  338. }
  339. }
  340. </style>