diff options
| -rw-r--r-- | templates/base.html | 5 | ||||
| -rw-r--r-- | templates/index.html | 34 |
2 files changed, 0 insertions, 39 deletions
diff --git a/templates/base.html b/templates/base.html index c588e4f..0b26cbf 100644 --- a/templates/base.html +++ b/templates/base.html | |||
| @@ -129,9 +129,6 @@ | |||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | pre { margin-block-start: 1em; margin-block-end: 1em; } | 131 | pre { margin-block-start: 1em; margin-block-end: 1em; } |
| 132 | |||
| 133 | section.quick-jump { display: grid; gap: 1em; margin-top: 1em; grid-template-columns: 1fr 1fr; } | ||
| 134 | section.quick-jump input { font-family: sans-serif; } | ||
| 135 | 132 | ||
| 136 | .promobox { | 133 | .promobox { |
| 137 | margin-top: 1em; | 134 | margin-top: 1em; |
| @@ -171,8 +168,6 @@ | |||
| 171 | } | 168 | } |
| 172 | 169 | ||
| 173 | .hide-on-mobile { display: none; } | 170 | .hide-on-mobile { display: none; } |
| 174 | |||
| 175 | section.quick-jump { display: none; } | ||
| 176 | } | 171 | } |
| 177 | </style> | 172 | </style> |
| 178 | <script defer src="https://app.tinyanalytics.io/pixel/isfRNEahfHiS2Ttp"></script> | 173 | <script defer src="https://app.tinyanalytics.io/pixel/isfRNEahfHiS2Ttp"></script> |
diff --git a/templates/index.html b/templates/index.html index 49b670d..f5821fc 100644 --- a/templates/index.html +++ b/templates/index.html | |||
| @@ -11,40 +11,6 @@ | |||
| 11 | bytes (trigraphs). | 11 | bytes (trigraphs). |
| 12 | </a> | 12 | </a> |
| 13 | 13 | ||
| 14 | <section class="quick-jump"> | ||
| 15 | <input list="qj-posts" placeholder="Look for posts"> | ||
| 16 | <datalist id="qj-posts"> | ||
| 17 | {{ range .Pages }} | ||
| 18 | {{ if and (eq .Type "post") (not .Draft) }} | ||
| 19 | <option data-url="{{ .RelPermalink }}">{{ .Title }}</option> | ||
| 20 | {{ end }} | ||
| 21 | {{ end }} | ||
| 22 | </datalist> | ||
| 23 | <input list="qj-notes" placeholder="Look for notes"> | ||
| 24 | <datalist id="qj-notes"> | ||
| 25 | {{ range .Pages }} | ||
| 26 | {{ if and (eq .Type "note") (not .Draft) }} | ||
| 27 | <option data-url="{{ .RelPermalink }}">{{ .Title }}</option> | ||
| 28 | {{ end }} | ||
| 29 | {{ end }} | ||
| 30 | </datalist> | ||
| 31 | </section> | ||
| 32 | |||
| 33 | <script> | ||
| 34 | document.querySelectorAll("section.quick-jump input[list]").forEach(s => { | ||
| 35 | s.addEventListener("change", e => { | ||
| 36 | const input = e.target; | ||
| 37 | const datalist = e.target.list; | ||
| 38 | for (var j = 0; j < datalist.options.length; j++) { | ||
| 39 | if (input.value == datalist.options[j].value) { | ||
| 40 | console.log(input.value, datalist.options[j].dataset.url); | ||
| 41 | window.location.href = `/${datalist.options[j].dataset.url}`; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | }); | ||
| 45 | }); | ||
| 46 | </script> | ||
| 47 | |||
| 48 | <section> | 14 | <section> |
| 49 | <h2>More long form, ramblings etc</h2> | 15 | <h2>More long form, ramblings etc</h2> |
| 50 | <ul itemscope itemtype="https://schema.org/SiteNavigationElement" role="list" aria-label="More long form, ramblings etc"> | 16 | <ul itemscope itemtype="https://schema.org/SiteNavigationElement" role="list" aria-label="More long form, ramblings etc"> |
