| 1 | <!doctype html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="UTF-8" /> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 6 | <title>Jotts — {{.Note.Title}}</title> |
| 7 | <link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png"> |
| 8 | <link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png"> |
| 9 | <link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png"> |
| 10 | <link rel="manifest" href="/static/site.webmanifest"> |
| 11 | <link rel="icon" href="/static/favicon.ico"> |
| 12 | <meta property="og:title" content="Jotts"> |
| 13 | <meta property="og:image" content="/static/og.png"> |
| 14 | <meta property="og:type" content="website"> |
| 15 | <meta name="theme-color" content="#121113" /> |
| 16 | <link rel="stylesheet" href="/assets/darkmatter.css"> |
| 17 | <link rel="stylesheet" href="/static/styles.css"> |
| 18 | </head> |
| 19 | <body> |
| 20 | <main> |
| 21 | <div class="note-header" style="margin-top:2rem;"> |
| 22 | <h1>{{.Note.Title}}</h1> |
| 23 | </div> |
| 24 | <template id="raw-md">{{.Note.Content}}</template> |
| 25 | <article class="markdown-body">{{.Rendered}}</article> |
| 26 | </main> |
| 27 | <script> |
| 28 | function copyMarkdown() { |
| 29 | const md = document.getElementById("raw-md").content.textContent; |
| 30 | const btn = document.getElementById("copy-md-btn"); |
| 31 | navigator.clipboard.writeText(md).then(() => { |
| 32 | btn.textContent = "copied!"; |
| 33 | setTimeout(() => { btn.textContent = "copy"; }, 1500); |
| 34 | }); |
| 35 | } |
| 36 | document.querySelectorAll("time.note-date").forEach(el => { |
| 37 | const d = new Date(el.getAttribute("datetime")); |
| 38 | if (!isNaN(d)) { el.textContent = d.toLocaleString(); } |
| 39 | }); |
| 40 | </script> |
| 41 | </body> |
| 42 | </html> |