diff options
author | Daniel Schadt <kingdread@gmx.de> | 2024-04-17 21:36:18 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2024-04-17 21:36:18 +0200 |
commit | 8c9a4066472d56e2adf1708e46c8668bc38ec1dd (patch) | |
tree | 1380bad225db6de2e93341f5ce8edc01bafd7182 | |
parent | 75ea1e5240a6ea190f1dfc56c656a389f33ec6aa (diff) | |
download | fietsboek-8c9a4066472d56e2adf1708e46c8668bc38ec1dd.tar.gz fietsboek-8c9a4066472d56e2adf1708e46c8668bc38ec1dd.tar.bz2 fietsboek-8c9a4066472d56e2adf1708e46c8668bc38ec1dd.zip |
add number of images and comments to home page
-rw-r--r-- | asset-sources/theme.scss | 6 | ||||
-rw-r--r-- | fietsboek/static/theme.css | 6 | ||||
-rw-r--r-- | fietsboek/static/theme.css.map | 2 | ||||
-rw-r--r-- | fietsboek/templates/home.jinja2 | 18 |
4 files changed, 30 insertions, 2 deletions
diff --git a/asset-sources/theme.scss b/asset-sources/theme.scss index 20708f3..1fe0deb 100644 --- a/asset-sources/theme.scss +++ b/asset-sources/theme.scss @@ -151,6 +151,12 @@ strong { cursor: pointer; } +.count-field { + width: 50px; + display: inline-block; + text-align: right; +} + /* Ensure a consistent width of the cells in the browse view. */ .browse-summary th, .browse-summary td { width: 25%; diff --git a/fietsboek/static/theme.css b/fietsboek/static/theme.css index 8a77608..7656bc2 100644 --- a/fietsboek/static/theme.css +++ b/fietsboek/static/theme.css @@ -144,6 +144,12 @@ strong { cursor: pointer; } +.count-field { + width: 50px; + display: inline-block; + text-align: right; +} + /* Ensure a consistent width of the cells in the browse view. */ .browse-summary th, .browse-summary td { width: 25%; diff --git a/fietsboek/static/theme.css.map b/fietsboek/static/theme.css.map index fb7eb58..f2286e4 100644 --- a/fietsboek/static/theme.css.map +++ b/fietsboek/static/theme.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../../asset-sources/theme.scss"],"names":[],"mappings":"AAAA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EAqCE;EACA;EACA;EACA;EACA;EACA;;AAzCA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAWJ;EACI;;;AAGJ;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;AACA;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE","file":"theme.css"}
\ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../../asset-sources/theme.scss"],"names":[],"mappings":"AAAA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EAqCE;EACA;EACA;EACA;EACA;EACA;;AAzCA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAWJ;EACI;;;AAGJ;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;AACA;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE","file":"theme.css"}
\ No newline at end of file diff --git a/fietsboek/templates/home.jinja2 b/fietsboek/templates/home.jinja2 index d3725ca..78e4d0c 100644 --- a/fietsboek/templates/home.jinja2 +++ b/fietsboek/templates/home.jinja2 @@ -48,10 +48,26 @@ <i class="bi bi-star-fill favourite-star-ni"></i> {% endif %} <span class="float-end"> + {% if track.images %} + <span class="count-field"> + {{ track.images | length }} <i class="bi bi-image"></i> + </span> + {% else %} + <span class="count-field"></span> + {% endif %} + {% if track.comments %} + <span class="count-field"> + {{ track.comments | length }} <i class="bi bi-chat-left-text-fill"></i> + </span> + {% else %} + <span class="count-field"></span> + {% endif %} {% if track.tagged_people %} - <span data-bs-toggle="tooltip" data-bs-container="body" data-bs-html="true" title="{{ track.html_tooltip_tagged_people() }}"> + <span class="count-field" data-bs-toggle="tooltip" data-bs-container="body" data-bs-html="true" title="{{ track.html_tooltip_tagged_people() }}"> {{ track.tagged_people | length + 1 }} <i class="bi bi-people-fill"></i> </span> + {% else %} + <span class="count-field"></span> {% endif %} {{ (track.length / 1000) | round(2) | format_decimal }} km </span> |