summaryrefslogtreecommitdiffstats
path: root/templates/note.html.template
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2026-09-08 08:56:40 -0700
committerRose Hogenson <rosehogenson@posteo.net>2026-09-08 08:58:21 -0700
commit735512086436dba4969107695ba7b93f09efce2e (patch)
tree7bf014884a5d655d4477def39c9f794c9037b4fa /templates/note.html.template
parentUse /tmp/hole as the hole directory for local runs (diff)
downloadroseh.moe-735512086436dba4969107695ba7b93f09efce2e.tar.zst
Simplify the HTML templates by omitting end tags
Diffstat (limited to 'templates/note.html.template')
-rw-r--r--templates/note.html.template54
1 files changed, 25 insertions, 29 deletions
diff --git a/templates/note.html.template b/templates/note.html.template
index ff72bdf..0d4673d 100644
--- a/templates/note.html.template
+++ b/templates/note.html.template
@@ -1,31 +1,27 @@
-{{define "head" -}}
- <script src="/static/htmx.min.js"></script>
- <title>Notepad</title>
+<script src="/static/htmx.min.js"></script>
+<title>Notepad</title>
- <meta name="viewport" content="interactive-widget=resizes-content"> <!-- https://stackoverflow.com/q/76026292 -->
-{{- end}}
+<meta name="viewport" content="interactive-widget=resizes-content"> <!-- https://stackoverflow.com/q/76026292 -->
-{{define "body" -}}
- <form id="form" method="post">
- <div class="save-indicator-container">
- {{block "saveIndicator" ""}}<span id="save-indicator">{{.}}</span>{{end}}
- </div>
- <div class="content-container">
- <textarea
- name="content"
- hx-post="/notepad"
- hx-on:input="
- const indicator = htmx.find('#save-indicator');
- htmx.addClass(indicator, 'htmx-indicator');
- indicator.innerHTML = 'Saving...';
- "
- hx-trigger="input delay:1s"
- hx-indicator="#save-indicator"
- hx-target="#save-indicator"
- hx-swap="outerHTML"
- autofocus>
- {{- .Content -}}
- </textarea>
- </div>
- </form>
-{{- end}}
+<form id="form" method="post">
+ <div class="save-indicator-container">
+ {{block "saveIndicator" ""}}<span id="save-indicator">{{.}}</span>{{end}}
+ </div>
+ <div class="content-container">
+ <textarea
+ name="content"
+ hx-post="/notepad"
+ hx-on:input="
+ const indicator = htmx.find('#save-indicator');
+ htmx.addClass(indicator, 'htmx-indicator');
+ indicator.innerHTML = 'Saving...';
+ "
+ hx-trigger="input delay:1s"
+ hx-indicator="#save-indicator"
+ hx-target="#save-indicator"
+ hx-swap="outerHTML"
+ autofocus>
+ {{- .Content -}}
+ </textarea>
+ </div>
+</form>