aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-05-25 20:35:56 +0200
committerDaniel Schadt <kingdread@gmx.de>2023-05-25 20:59:28 +0200
commitcd60935d777aee984224844badc7f260caa3bb46 (patch)
tree53fbf2394d1f5073968d280613c1913d00e22aa2
parent2dd26937465eb359552c77fe82b25c4fc7cfe2f3 (diff)
downloadfietsboek-cd60935d777aee984224844badc7f260caa3bb46.tar.gz
fietsboek-cd60935d777aee984224844badc7f260caa3bb46.tar.bz2
fietsboek-cd60935d777aee984224844badc7f260caa3bb46.zip
move "sort" button on home page up
This looks better than having the header line and the sort button below each other.
-rw-r--r--fietsboek/templates/home.jinja216
-rw-r--r--tests/integration/test_smoke.py2
2 files changed, 11 insertions, 7 deletions
diff --git a/fietsboek/templates/home.jinja2 b/fietsboek/templates/home.jinja2
index e89c9bd..53eefc7 100644
--- a/fietsboek/templates/home.jinja2
+++ b/fietsboek/templates/home.jinja2
@@ -2,7 +2,16 @@
{% block content %}
<div class="container">
- <h1>{{ _("page.home.title") }}</h1>
+ <div class="clearfix">
+ <h1 class="float-start">{{ _("page.home.title") }}</h1>
+ {% if summary %}
+ <div class="float-end mb-2 mt-2">
+ <button type="button" class="btn btn-outline-dark" id="changeHomeSorting">
+ {% if sorted_ascending %}<i class="bi bi-sort-down"></i>{% else %}<i class="bi bi-sort-up"></i>{% endif %}
+ </button>
+ </div>
+ {% endif %}
+ </div>
{% if unfinished_uploads %}
<div class="alert alert-warning">
{{ _("page.home.unfinished_uploads") }}
@@ -14,11 +23,6 @@
</div>
{% endif %}
{% if summary %}
- <div class="d-flex justify-content-end mb-2">
- <button type="button" class="btn btn-outline-dark" id="changeHomeSorting">
- {% if sorted_ascending %}<i class="bi bi-sort-down"></i>{% else %}<i class="bi bi-sort-up"></i>{% endif %}
- </button>
- </div>
<div class="list-group list-group-root">
{% for year in summary %}
<a class="list-group-item list-group-item-primary">
diff --git a/tests/integration/test_smoke.py b/tests/integration/test_smoke.py
index 5176e88..cead68d 100644
--- a/tests/integration/test_smoke.py
+++ b/tests/integration/test_smoke.py
@@ -1,7 +1,7 @@
def test_home(testapp):
res = testapp.get("/")
assert res.status_code == 200
- assert b'<h1>Home</h1>' in res.body
+ assert b'<h1 class="float-start">Home</h1>' in res.body
def test_maintenance(testapp, data_manager):