Add tuicss library

This commit is contained in:
2025-12-12 11:55:37 +01:00
parent e5bbdcab42
commit 4bbc7975b3
7 changed files with 293 additions and 431 deletions

View File

@@ -1,26 +1,31 @@
{{define "diary_form.html"}}
<div class="diary-form">
<h3>Journal Entry - {{.Date.Format "January 2, 2006"}}</h3>
<form
hx-post="/diary/{{formatDate .Date}}"
hx-target="this"
hx-swap="outerHTML">
<textarea
name="text"
rows="8"
placeholder="Write your thoughts...">{{if .Entry}}{{.Entry.Text}}{{end}}</textarea>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save</button>
{{if .Entry}}
<button
type="button"
class="btn btn-danger"
hx-delete="/diary/{{formatDate .Date}}"
hx-confirm="Delete this diary entry?">
Delete
</button>
{{end}}
</div>
</form>
<div class="tui-window tui-no-shadow">
<fieldset class="tui-fieldset">
<legend class="center">Journal Entry - {{.Date.Format "January 2, 2006"}}</legend>
<form
hx-post="/diary/{{formatDate .Date}}"
hx-target="this"
hx-swap="outerHTML">
<textarea
name="text"
class="tui-input full-width"
rows="8"
placeholder="Write your thoughts...">{{if .Entry}}{{.Entry.Text}}{{end}}</textarea>
<div class="form-actions">
<button type="submit" class="tui-button green-168 white-text">Save</button>
{{if .Entry}}
<button
type="button"
class="tui-button red-168 white-text"
hx-delete="/diary/{{formatDate .Date}}"
hx-confirm="Delete this diary entry?">
Delete
</button>
{{end}}
</div>
</form>
</fieldset>
</div>
</div>
{{end}}