Subject rendering

This isn't the best solution and might not even be worth doing as the subject template doesn't do anything and means i have to call the API in multiple paces
This commit is contained in:
Jack Punter
2024-04-22 00:21:36 +01:00
parent 20a5bb0db2
commit 45d25d8990
3 changed files with 43 additions and 6 deletions

View File

@@ -22,7 +22,8 @@
<div class="column">
<div style="display: flex; justify-content: space-between;">
<span class="input_label">Subject:</span>
<input name="subject" type="text" id="subject">
<input name="subject" type="text" id="subject" hx-post="/subject_preview"
hx-trigger="keyup changed delay:1000ms" hx-target="#subject-preview">
</div><br>
<textarea name="email_input" id="typebox" rows="32" cols="64" style="resize: none;"
hx-trigger="keyup changed delay:1000ms" hx-post="/mail-content" hx-target="#email-preview"
@@ -30,7 +31,7 @@
</div>
<div class="column">
<div id="subject-preview">Subject preview here</div><br>
<div id="subject-preview">&nbsp;</div><br>
<div id="email-preview"></div>
</div>
</div>
@@ -40,7 +41,7 @@
<h1>Current Mailing List Subscribers</h1>
</div>
<div class="column">
<button hx-get="/mailing_list" hx-target="#mailing_list"> Refresh Mailing List</button>
<button hx-get="/mailing_list" hx-target="#mailing_list">Refresh Mailing List</button>
</div>
</div>
<div class="card" hx-trigger="load" hx-get="/mailing_list" id="mailing_list"></div>