Bare bones backend. Frontend just starting.

This commit is contained in:
Ryan Pandya
2023-05-02 11:29:10 -07:00
parent ed30556bd3
commit aed2080b53
24 changed files with 982 additions and 101 deletions
+15
View File
@@ -0,0 +1,15 @@
<div id="color-chooser">
{% for color in [
"black", "red", "cyan", "blue", "green",
"purple", "yellow", "darkred", "orange",
"pink", "lime"] %}
<div
class="color-choice color-{{color}}"
hx-post="/change-color"
hx-vals='{"activity_id": "{{activity.activity_id}}", "color": "{{color}}"}'
hx-target="body"
>
{{ color.capitalize() }}
</div>
{% endfor %}
</div>
+14
View File
@@ -0,0 +1,14 @@
<td class="activity-{{hour.activity.code}}">
<input
id="update-hour-{{hour.hour_id}}"
class="update-entry-form"
type="text"
value="{{hour.activity.code}}"
hx-trigger="change"
hx-post="/update-entry"
>
</input>
</td>
<script language="javascript">
document.querySelector("#update-hour-{{hour.hour_id}}").focus()
</script>