From 938947d06c2ce81847e650928889e3eda1e9fdf5 Mon Sep 17 00:00:00 2001 From: krateng Date: Mon, 25 Apr 2022 17:47:35 +0200 Subject: [PATCH] Added indicator for empty tile stats, fix GH-134 --- maloja/web/jinja/icons/nodata.jinja | 7 +++++++ maloja/web/jinja/partials/charts_artists_tiles.jinja | 7 ++++++- maloja/web/jinja/partials/charts_tracks_tiles.jinja | 6 +++++- maloja/web/static/css/maloja.css | 4 ++++ 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 maloja/web/jinja/icons/nodata.jinja diff --git a/maloja/web/jinja/icons/nodata.jinja b/maloja/web/jinja/icons/nodata.jinja new file mode 100644 index 0000000..dde0cbb --- /dev/null +++ b/maloja/web/jinja/icons/nodata.jinja @@ -0,0 +1,7 @@ + + + + + +
No scrobbles yet! + diff --git a/maloja/web/jinja/partials/charts_artists_tiles.jinja b/maloja/web/jinja/partials/charts_artists_tiles.jinja index 78599ab..28efeda 100644 --- a/maloja/web/jinja/partials/charts_artists_tiles.jinja +++ b/maloja/web/jinja/partials/charts_artists_tiles.jinja @@ -9,8 +9,12 @@ {% set charts_cycler = cycler(*charts_14) %} + {% for segment in range(3) %} + {% if charts_14[0] is none and loop.first %} + {% include 'icons/nodata.jinja' %} + {% else %} + + {% endif %} {% endfor %}
{% set segmentsize = segment+1 %} @@ -35,6 +39,7 @@ {%- endfor -%}
-
diff --git a/maloja/web/jinja/partials/charts_tracks_tiles.jinja b/maloja/web/jinja/partials/charts_tracks_tiles.jinja index 6d597e7..90780bd 100644 --- a/maloja/web/jinja/partials/charts_tracks_tiles.jinja +++ b/maloja/web/jinja/partials/charts_tracks_tiles.jinja @@ -11,6 +11,9 @@ {% for segment in range(3) %} + {% if charts_14[0] is none and loop.first %} + {% include 'icons/nodata.jinja' %} + {% else %} + + {% endif %} {% endfor %}
{% set segmentsize = segment+1 %} @@ -35,6 +38,7 @@ {%- endfor %}
-
diff --git a/maloja/web/static/css/maloja.css b/maloja/web/static/css/maloja.css index 77733d1..5235998 100644 --- a/maloja/web/static/css/maloja.css +++ b/maloja/web/static/css/maloja.css @@ -58,6 +58,10 @@ div.header h1 { settings icon **/ +svg { + fill: var(--text-color); +} + div#icon_bar { position:fixed; right:30px;