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.

356 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') 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. .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 chevron_right
  107. v-flex(xs6)
  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') info
  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 chevron_right
  125. v-flex(xs6)
  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 chevron_right
  136. v-flex(xs6)
  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 chevron_right
  147. v-flex(xs6)
  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 chevron_right
  160. v-flex(xs6)
  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 chevron_right
  173. v-flex(xs6)
  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 chevron_right
  189. v-flex(xs6)
  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 chevron_right
  215. v-flex(xs6)
  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') keyboard
  224. .body-2.teal--text Keyboard Shortcuts
  225. v-list.editor-markdown-help-kbd(two-line, dense)
  226. v-list-tile
  227. v-list-tile-content.body-2 Bold
  228. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd B]
  229. v-divider
  230. v-list-tile
  231. v-list-tile-content.body-2 Italic
  232. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd I]
  233. v-divider
  234. v-list-tile
  235. v-list-tile-content.body-2 Increase Header Level
  236. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd {{altKey}}] + #[kbd Right]
  237. v-divider
  238. v-list-tile
  239. v-list-tile-content.body-2 Decrease Header Level
  240. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd {{altKey}}] + #[kbd Left]
  241. v-divider
  242. v-list-tile
  243. v-list-tile-content.body-2 Save
  244. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd S]
  245. v-divider
  246. v-list-tile
  247. v-list-tile-content.body-2 Undo
  248. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd Z]
  249. v-divider
  250. v-list-tile
  251. v-list-tile-content.body-2 Redo
  252. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd Y]
  253. v-divider
  254. v-list-tile
  255. v-list-tile-content
  256. v-list-tile-title.body-2 Distraction Free Mode
  257. v-list-tile-sub-title Press <kbd>Esc</kbd> to exit.
  258. v-list-tile-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') mouse
  263. .body-2.teal--text Multi-Selection
  264. v-list.editor-markdown-help-kbd(two-line, dense)
  265. v-list-tile
  266. v-list-tile-content.body-2 Multiple Cursors
  267. v-list-tile-action #[kbd {{ctrlKey}}] + Left Click
  268. v-divider
  269. v-list-tile
  270. v-list-tile-content.body-2 Select Region
  271. v-list-tile-action #[kbd {{ctrlKey}}] + #[kbd {{altKey}}] + Left Click
  272. v-divider
  273. v-list-tile
  274. v-list-tile-content.body-2 Deselect
  275. v-list-tile-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;
  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. }
  302. &-result {
  303. background-color: mc('blue-grey', '50') !important;
  304. border-radius: 7px;
  305. font-size: 14px;
  306. code {
  307. display: inline-block;
  308. background-color: mc('pink', '50');
  309. box-shadow: none;
  310. font-size: inherit;
  311. }
  312. .contents {
  313. padding-bottom: 16px;
  314. }
  315. .prismjs {
  316. margin: 0;
  317. }
  318. }
  319. &-kbd {
  320. .v-list__tile__action {
  321. flex-direction: row;
  322. align-items: center;
  323. kbd {
  324. margin: 0 5px;
  325. display: inline-block;
  326. border: 1px solid #ccc;
  327. border-radius: 4px;
  328. padding: 0.1em 0.5em;
  329. margin: 0 0.2em;
  330. box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
  331. background-color: #f7f7f7;
  332. color: mc('grey', '700');
  333. font-size: 12px;
  334. }
  335. }
  336. }
  337. &-ref {
  338. .v-list__tile__action {
  339. flex-direction: row;
  340. align-items: center;
  341. }
  342. }
  343. }
  344. </style>