flask_template_codex/app/templates/tasks/list.html
2026-08-08 05:37:41 +02:00

47 lines
1.6 KiB
HTML

{% extends "base.html" %}
{% from "tasks/_task_card.html" import task_card %}
{% block title %}Tasks · Steady{% endblock %}
{% block content %}
<div class="page-heading">
<div>
<p class="eyebrow">Your complete workspace</p>
<h1>Tasks</h1>
</div>
<a class="button" href="{{ url_for('tasks.create') }}">Add task</a>
</div>
<nav class="filters" aria-label="Filter tasks by status">
<a {% if not selected_status %}aria-current="page"{% endif %} href="{{ url_for('tasks.index') }}">All</a>
{% for value, label in status_labels.items() %}
<a {% if selected_status == value %}aria-current="page"{% endif %}
href="{{ url_for('tasks.index', status=value) }}">{{ label }}</a>
{% endfor %}
</nav>
<div class="task-list">
{% for task in tasks %}
{{ task_card(task) }}
{% else %}
<div class="empty-state">
<h2>Nothing here right now</h2>
<p>Try another filter or capture one small task.</p>
</div>
{% endfor %}
</div>
{% if pagination.pages > 1 %}
<nav class="pagination" aria-label="Task pages">
{% if pagination.has_prev %}
<a class="button button--quiet" rel="prev"
href="{{ url_for('tasks.index', status=selected_status, page=pagination.page - 1) }}">Previous</a>
{% endif %}
<span aria-current="page">Page {{ pagination.page }} of {{ pagination.pages }}</span>
{% if pagination.has_next %}
<a class="button button--quiet" rel="next"
href="{{ url_for('tasks.index', status=selected_status, page=pagination.page + 1) }}">Next</a>
{% endif %}
</nav>
{% endif %}
{% endblock %}