diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2026-08-15 08:38:43 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2026-08-15 08:38:43 -0700 |
| commit | b522360a74a7d32fec85e8ae4ac4ba9a279b7a4c (patch) | |
| tree | 1b3960d0d9ff035dfa815b4b3d3258558d34cf9b /templates/note.html.template | |
| parent | f6356df0131adb8098ff1fd5e8578707aa1af06b (diff) | |
| download | roseh.moe-b522360a74a7d32fec85e8ae4ac4ba9a279b7a4c.tar.zst | |
Fix html formatting
...finally
Diffstat (limited to 'templates/note.html.template')
| -rw-r--r-- | templates/note.html.template | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/templates/note.html.template b/templates/note.html.template index 19da416..3c7049c 100644 --- a/templates/note.html.template +++ b/templates/note.html.template @@ -1,31 +1,33 @@ -{{define "head"}} - <script src="/static/htmx.min.js"></script> - <title>Notepad</title> +{{define "head" -}} + <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 --> +{{- 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> +{{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}} |
