Mercurial
annotate mrjunejune/src/tools/markdown_to_html/index.html @ 169:295ac2e5ec00
[MrJuneJune] Created separate target for generating html from md.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 19 Jan 2026 17:33:18 -0800 |
| parents | be91a73d801a |
| children | 8c74204fd362 |
| rev | line source |
|---|---|
|
76
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
1 <!DOCTYPE html> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
2 <html lang="en"> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
3 <head> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
4 <meta charset="UTF-8"> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
6 <title>Markdown to HTML Converter</title> |
|
80
d55157451947
[MrJuneJune] Updating my homepage.
June Park <parkjune1995@gmail.com>
parents:
79
diff
changeset
|
7 {{/parts/base_head.html}} |
|
76
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
8 <link rel="stylesheet" href="markdown_to_html/index.css" /> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
9 </head> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
10 <body> |
| 78 | 11 {{/parts/header.html}} |
|
76
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
12 <div class="header"> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
13 <h1>Markdown to HTML Converter</h1> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
14 </div> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
15 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
16 <div class="container"> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
17 <div class="panel"> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
18 <div class="label">Markdown Input</div> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
19 <textarea id="input" placeholder="Type your markdown here..."># Welcome to Markdown Converter |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
20 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
21 ## Features |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
22 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
23 This converter supports: |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
24 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
25 - **Bold text** and *italic text* |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
26 - [Links](https://example.com) |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
27 - `inline code` |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
28 - ~~strikethrough~~ |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
29 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
30 ### Lists |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
31 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
32 1. Ordered lists |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
33 2. Like this one |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
34 3. With numbers |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
35 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
36 - Unordered lists |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
37 - Use dashes |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
38 - Or asterisks |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
39 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
40 ### Code Blocks |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
41 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
42 ``` |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
43 function example() { |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
44 return "Hello World"; |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
45 } |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
46 ``` |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
47 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
48 ### Blockquotes |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
49 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
50 > This is a blockquote |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
51 > It can span multiple lines |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
52 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
53 --- |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
54 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
55 ### Images |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
56 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
57  |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
58 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
59 **Try editing this text!**</textarea> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
60 </div> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
61 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
62 <div class="panel"> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
63 <div class="title"> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
64 <div class="label">HTML Output</div> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
65 <button id="copy"> Copy </button> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
66 </div> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
67 <div id="output"></div> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
68 </div> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
69 </div> |
|
93
be91a73d801a
[MrJuneJune] Updated my website.
June Park <parkjune1995@gmail.com>
parents:
84
diff
changeset
|
70 {{/parts/footer.html}} |
|
76
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
71 <script src="/markdown_to_html.js"></script> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
72 <script> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
73 function convert() { |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
74 output.innerHTML = ''; |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
75 const markdown = input.value; |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
76 renderMarkdown(output, markdown); |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
77 } |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
78 input.addEventListener('input', convert); |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
79 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
80 convert(); |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
81 |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
82 copy.addEventListener('click', () => { |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
83 const htmlBlob = new Blob([output.innerHTML], { type: 'text/html'}); |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
84 const textBlob = new Blob([output.innerText], { type: 'text/plain'}); |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
85 const data = [new ClipboardItem({ |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
86 'text/html': htmlBlob, |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
87 'text/plain': textBlob |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
88 })]; |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
89 navigator.clipboard.write(data).then(() => { |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
90 copy.textContent = "Copied!"; |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
91 setTimeout(() => { |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
92 copy.textContent = "Copy"; |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
93 copy.classList.remove('success'); |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
94 }, 1000); |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
95 }).catch(err => { |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
96 console.error('Failed to copy: ', err); |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
97 }); |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
98 }); |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
99 </script> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
100 </body> |
|
35b1abc37969
Updating my website to use seobeo library.
June Park <parkjune1995@gmail.com>
parents:
diff
changeset
|
101 </html> |