50 lines
1.1 KiB
Twig
50 lines
1.1 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Hello MainController!{% endblock %}
|
|
|
|
{% block body %}
|
|
<h1>{{ app.user.username }}'s fap history</h1>
|
|
|
|
<form
|
|
hx-post="{{ path('app_fap') }}"
|
|
hx-target="#fap-statistics-container"
|
|
hx-swap="outerHTML"
|
|
>
|
|
<button
|
|
class="btn btn-success"
|
|
type="submit"
|
|
>Fap</button>
|
|
</form>
|
|
|
|
<hr>
|
|
|
|
{% block fap_statistics_container %}
|
|
<div class="d-flex flex-column gap-3" id="fap-statistics-container">
|
|
<div>
|
|
<b>total:</b> {{ app.user.entries|length }}
|
|
</div>
|
|
<div class="d-flex flex-column">
|
|
{% for entry in app.user.entries %}
|
|
<div>
|
|
{{ entry.dateAt|date('Y-m-d H:i:s') }}
|
|
<a
|
|
hx-delete="{{ path('app_fap_delete', { id: entry.id }) }}"
|
|
hx-target="#fap-statistics-container"
|
|
hx-swap="outerHTML"
|
|
hx-confirm="Are you sure you wanna delete your hard-worked-for masturbation log entry?"
|
|
>
|
|
(delete)
|
|
</a>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
<hr>
|
|
|
|
<div class="d-flex flex-row gap-3">
|
|
<a href="{{ path("app_logout") }}">logout</a>
|
|
</div>
|
|
{% endblock body %}
|