| 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</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 | <header class="header"> |
| 21 | <a href="/" class="logo">jotts</a> |
| 22 | <nav class="links"> |
| 23 | <a href="/notes/new">new</a> |
| 24 | </nav> |
| 25 | </header> |
| 26 | <main> |
| 27 | {{if not .Notes}}<p class="empty">no notes yet</p>{{end}} |
| 28 | <div class="note-list"> |
| 29 | {{range .Notes}} |
| 30 | <a href="/notes/{{.ShortID}}" class="note-item"> |
| 31 | <span class="note-title">{{.Title}}</span> |
| 32 | <time class="note-date" datetime="{{.UpdatedAt}}Z">{{.UpdatedAt}}</time> |
| 33 | </a> |
| 34 | {{end}} |
| 35 | </div> |
| 36 | </main> |
| 37 | <script> |
| 38 | document.querySelectorAll("time.note-date").forEach(el => { |
| 39 | const d = new Date(el.getAttribute("datetime")); |
| 40 | if (!isNaN(d)) { el.textContent = d.toLocaleString(); } |
| 41 | }); |
| 42 | </script> |
| 43 | </body> |
| 44 | </html> |