65 lines
1.5 KiB
Twig
65 lines
1.5 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Brain Dump{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="container">
|
|
<h1>Brain Dump</h1>
|
|
|
|
<form
|
|
method="post"
|
|
action="{{ path('app_braindump_dump') }}"
|
|
hx-post="{{ path('app_braindump_dump') }}"
|
|
hx-target="#tasks-result"
|
|
hx-swap="innerHTML"
|
|
hx-indicator="#thinking"
|
|
hx-disabled-elt="this"
|
|
>
|
|
|
|
<input
|
|
type="hidden"
|
|
name="_token"
|
|
value="{{ csrf_token('braindump_dump') }}"
|
|
>
|
|
|
|
<div>
|
|
<label for="brain_dump">
|
|
What's on your mind?
|
|
</label>
|
|
|
|
<textarea
|
|
id="brain_dump"
|
|
name="brain_dump"
|
|
rows="8"
|
|
placeholder="Dump everything that's on your mind..."
|
|
required
|
|
></textarea>
|
|
</div>
|
|
|
|
<button type="submit">
|
|
<span class="material-symbols-outlined">robot_2</span>
|
|
Suggest tasks
|
|
</button>
|
|
|
|
</form>
|
|
<span
|
|
id="thinking"
|
|
class="htmx-indicator"
|
|
aria-live="polite"
|
|
>
|
|
<span class="material-symbols-outlined spinner">progress_activity</span>
|
|
Thinking…
|
|
</span> <span
|
|
id="request-failed"
|
|
class="request-failed"
|
|
aria-live="assertive"
|
|
hidden
|
|
>
|
|
<span class="material-symbols-outlined">error</span>
|
|
Something went wrong
|
|
</span>
|
|
<div id="tasks-result" class="task-result">
|
|
{# HTMX will put the proposed tasks here #}
|
|
</div>
|
|
</div>
|
|
{% endblock %} |