diff --git a/maloja/pkg_global/conf.py b/maloja/pkg_global/conf.py
index a9be47b..f8c61f4 100644
--- a/maloja/pkg_global/conf.py
+++ b/maloja/pkg_global/conf.py
@@ -189,8 +189,7 @@ malojaconfig = Configuration(
"parse_remix_artists":(tp.Boolean(), "Parse Remix Artists", False)
},
"Web Interface":{
- "default_range_charts_artists":(tp.Choice({'alltime':'All Time','year':'Year','month':"Month",'week':'Week'}), "Default Range Artist Charts", "year"),
- "default_range_charts_tracks":(tp.Choice({'alltime':'All Time','year':'Year','month':"Month",'week':'Week'}), "Default Range Track Charts", "year"),
+ "default_range_startpage":(tp.Choice({'alltime':'All Time','year':'Year','month':"Month",'week':'Week'}), "Default Range for Startpage Stats", "year"),
"default_step_pulse":(tp.Choice({'year':'Year','month':"Month",'week':'Week','day':'Day'}), "Default Pulse Step", "month"),
"charts_display_tiles":(tp.Boolean(), "Display Chart Tiles", False),
"album_showcase":(tp.Boolean(), "Display Album Showcase", True, "Display a graphical album showcase for artist overview pages instead of a chart list"),
diff --git a/maloja/web/jinja/partials/info_album.jinja b/maloja/web/jinja/partials/info_album.jinja
new file mode 100644
index 0000000..95a9ca9
--- /dev/null
+++ b/maloja/web/jinja/partials/info_album.jinja
@@ -0,0 +1,45 @@
+{% import 'snippets/links.jinja' as links %}
+{% import 'partials/awards_album.jinja' as awards %}
+
+{% set album = filterkeys.album %}
+{% set info = dbc.album_info({'album':album}) %}
+
+{% set encodedalbum = mlj_uri.uriencode({'album':album}) %}
+
+
+
+
+
+ {% if adminmode %}
+
+ {% else %}
+
+
+ {% endif %}
+ |
+
+ {{ links.links(album.artists) }}
+ {{ info.album.albumtitle | e }}
+ {# awards.certs(album) #}
+ #{{ info.position }}
+
+
+
+ {{ info['scrobbles'] }} Scrobbles
+
+
+
+
+
+
+ {{ awards.medals(info) }}
+ {{ awards.topweeks(info) }}
+
+
+ |
+
+
diff --git a/maloja/web/jinja/partials/info_artist.jinja b/maloja/web/jinja/partials/info_artist.jinja
new file mode 100644
index 0000000..f3308a9
--- /dev/null
+++ b/maloja/web/jinja/partials/info_artist.jinja
@@ -0,0 +1,59 @@
+{% import 'snippets/links.jinja' as links %}
+{% import 'partials/awards_artist.jinja' as awards %}
+
+
+{% set artist = filterkeys.artist %}
+{% set info = db.artist_info(artist=artist) %}
+
+{% set credited = info.get('replace') %}
+{% set included = info.get('associated') %}
+
+{% if credited is not none %}
+ {% set competes = false %}
+{% else %}
+ {% set credited = artist %}
+ {% set competes = true %}
+{% endif %}
+
+
+
+
+
+ {% if adminmode %}
+
+ {% else %}
+
+
+ {% endif %}
+ |
+
+ {{ info.artist | e }}
+ {% if competes and info['scrobbles']>0 %}#{{ info.position }}{% endif %}
+
+ {% if competes and included %}
+ associated: {{ links.links(included) }}
+ {% elif not competes %}
+ Competing under {{ links.link(credited) }} (#{{ info.position }})
+ {% endif %}
+
+
+ {{ info['scrobbles'] }} Scrobbles
+
+
+
+
+
+ {% if competes %}
+ {{ awards.medals(info) }}
+ {{ awards.topweeks(info) }}
+ {% endif %}
+ {{ awards.certs(artist) }}
+
+
+ |
+
+
diff --git a/maloja/web/jinja/partials/info_track.jinja b/maloja/web/jinja/partials/info_track.jinja
new file mode 100644
index 0000000..f46e342
--- /dev/null
+++ b/maloja/web/jinja/partials/info_track.jinja
@@ -0,0 +1,48 @@
+{% import 'snippets/links.jinja' as links %}
+
+{% set track = filterkeys.track %}
+{% set info = dbc.track_info({'track':track}) %}
+
+{% import 'partials/awards_track.jinja' as awards %}
+
+
+
+
+
+ {% if adminmode %}
+
+ {% else %}
+
+
+ {% endif %}
+ |
+
+ {{ links.links(track.artists) }}
+ {{ info.track.title | e }}
+ {{ awards.certs(track) }}
+ #{{ info.position }}
+
+ {% if info.track.album %}
+ from {{ links.link(info.track.album) }}
+ {% endif %}
+
+
+ {% if adminmode %}{% endif %}
+ {{ info['scrobbles'] }} Scrobbles
+
+
+
+
+
+
+ {{ awards.medals(info) }}
+ {{ awards.topweeks(info) }}
+
+
+ |
+
+
diff --git a/maloja/web/jinja/snippets/links.jinja b/maloja/web/jinja/snippets/links.jinja
index 3b5c29d..f90a535 100644
--- a/maloja/web/jinja/snippets/links.jinja
+++ b/maloja/web/jinja/snippets/links.jinja
@@ -1,5 +1,5 @@
{% macro link(entity) -%}
- {% if entity is mapping and 'title' in entity or 'albumtitle' in entity %}
+ {% if entity is mapping and ('title' in entity or 'albumtitle' in entity) %}
{% set name = entity.title or entity.albumtitle %}
{% else %}
{% set name = entity %}
diff --git a/maloja/web/jinja/start.jinja b/maloja/web/jinja/start.jinja
index f8240da..eb22b37 100644
--- a/maloja/web/jinja/start.jinja
+++ b/maloja/web/jinja/start.jinja
@@ -3,109 +3,44 @@
{% block scripts %}
-
-
+
+
+
+
{% endblock %}
{% block content -%}
-
-
-
-
- {% for r in xcurrent -%}
-
- {{ r.localisation }}
-
- {{ "|" if not loop.last }}
- {%- endfor %}
-
-
+
- {% for r in xcurrent -%}
-
- {%- with limitkeys = {"timerange":r.range} -%}
- {% include 'partials/charts_artists_tiles.jinja' %}
- {%- endwith -%}
-
- {%- endfor %}
+ {% for module in ['charts_artists','charts_tracks','charts_albums','pulse','lastscrobbles','featured'] %}
+
+
+
+ {% include 'startpage_modules/' + module + '.jinja' %}
+
+
+ {% endfor %}
+
-
-
-
- {% for r in xcurrent -%}
-
- {{ r.localisation }}
-
- {{ "|" if not loop.last }}
- {%- endfor %}
-
-
-
-
- {% for r in xcurrent -%}
-
- {%- with limitkeys = {"timerange":r.range} -%}
- {% include 'partials/charts_tracks_tiles.jinja' %}
- {%- endwith -%}
-
- {%- endfor %}
-
-
-
-
-
-
-
- {% for range in xcurrent %}
-
{{ range.localisation }}
-
{{ dbc.get_scrobbles_num({'timerange':range.range}) }}
- {% endfor %}
-
-
-
-
-
- {%- with amountkeys = {"perpage":12,"page":0}, shortTimeDesc=True -%}
- {% include 'partials/scrobbles.jinja' %}
- {%- endwith -%}
-
-
-
-
-
-
-
-
-
-
-
- {% for range in xranges -%}
-
- {{ range.localisation }}
-
- {{ "|" if not loop.last }}
- {%- endfor %}
-
-
- {% for range in xranges -%}
-
- {%- with limitkeys={"since":range.firstrange},delimitkeys={"step":range.identifier} -%}
- {% include 'partials/pulse.jinja' %}
- {%- endwith -%}
-
- {%- endfor %}
-
-
-
{%- endblock %}
diff --git a/maloja/web/jinja/startpage_modules/charts_albums.jinja b/maloja/web/jinja/startpage_modules/charts_albums.jinja
new file mode 100644
index 0000000..671fe10
--- /dev/null
+++ b/maloja/web/jinja/startpage_modules/charts_albums.jinja
@@ -0,0 +1,19 @@
+
+
+{% for r in xcurrent -%}
+
+ {{ r.localisation }}
+
+ {{ "|" if not loop.last }}
+{%- endfor %}
+
+
+
+
+{% for r in xcurrent -%}
+
+ {%- with limitkeys = {"timerange":r.range} -%}
+ {% include 'partials/charts_albums_tiles.jinja' %}
+ {%- endwith -%}
+
+{%- endfor %}
diff --git a/maloja/web/jinja/startpage_modules/charts_artists.jinja b/maloja/web/jinja/startpage_modules/charts_artists.jinja
new file mode 100644
index 0000000..0c78c89
--- /dev/null
+++ b/maloja/web/jinja/startpage_modules/charts_artists.jinja
@@ -0,0 +1,19 @@
+
+
+{% for r in xcurrent -%}
+
+ {{ r.localisation }}
+
+ {{ "|" if not loop.last }}
+{%- endfor %}
+
+
+
+
+{% for r in xcurrent -%}
+
+ {%- with limitkeys = {"timerange":r.range} -%}
+ {% include 'partials/charts_artists_tiles.jinja' %}
+ {%- endwith -%}
+
+{%- endfor %}
diff --git a/maloja/web/jinja/startpage_modules/charts_tracks.jinja b/maloja/web/jinja/startpage_modules/charts_tracks.jinja
new file mode 100644
index 0000000..4ae6e4c
--- /dev/null
+++ b/maloja/web/jinja/startpage_modules/charts_tracks.jinja
@@ -0,0 +1,19 @@
+
+
+{% for r in xcurrent -%}
+
+ {{ r.localisation }}
+
+ {{ "|" if not loop.last }}
+{%- endfor %}
+
+
+
+
+{% for r in xcurrent -%}
+
+ {%- with limitkeys = {"timerange":r.range} -%}
+ {% include 'partials/charts_tracks_tiles.jinja' %}
+ {%- endwith -%}
+
+{%- endfor %}
diff --git a/maloja/web/jinja/startpage_modules/featured.jinja b/maloja/web/jinja/startpage_modules/featured.jinja
new file mode 100644
index 0000000..1c96ea2
--- /dev/null
+++ b/maloja/web/jinja/startpage_modules/featured.jinja
@@ -0,0 +1,58 @@
+Featured
+
+
+{% set entitytypes = [
+ {'identifier':'artist','localisation':"Artist", 'template':"info_artist.jinja", 'filterkeys':{"artist":"Blackpink"} },
+ {'identifier':'track','localisation':"Track", 'template':"info_track.jinja", 'filterkeys':{"track": {"artists": ["Red Velvet"], "title": "Russian Roulette"}} },
+ {'identifier':'album','localisation':"Album", 'template':"info_album.jinja", 'filterkeys':{"album": {"artists": ["TWICE"], "albumtitle": "The Story Begins"}} }
+] %}
+
+
+{% for t in entitytypes -%}
+
+ {{ t.localisation }}
+
+ {{ "|" if not loop.last }}
+{%- endfor %}
+
+
+
+
+{% for t in entitytypes -%}
+
+ {%- with filterkeys = t.filterkeys -%}
+ {% include 'partials/' + t.template %}
+ {%- endwith -%}
+
+{%- endfor %}
+
+
+
+
+
diff --git a/maloja/web/jinja/startpage_modules/lastscrobbles.jinja b/maloja/web/jinja/startpage_modules/lastscrobbles.jinja
new file mode 100644
index 0000000..ae0da70
--- /dev/null
+++ b/maloja/web/jinja/startpage_modules/lastscrobbles.jinja
@@ -0,0 +1,15 @@
+
+
+{% for range in xcurrent %}
+ {{ range.localisation }}
+ {{ dbc.get_scrobbles_num({'timerange':range.range}) }}
+{% endfor %}
+
+
+
+
+
+ {%- with amountkeys = {"perpage":12,"page":0}, shortTimeDesc=True -%}
+ {% include 'partials/scrobbles.jinja' %}
+ {%- endwith -%}
+
diff --git a/maloja/web/jinja/startpage_modules/pulse.jinja b/maloja/web/jinja/startpage_modules/pulse.jinja
new file mode 100644
index 0000000..5efdc00
--- /dev/null
+++ b/maloja/web/jinja/startpage_modules/pulse.jinja
@@ -0,0 +1,17 @@
+
+
+{% for range in xranges -%}
+
+ {{ range.localisation }}
+
+ {{ "|" if not loop.last }}
+{%- endfor %}
+
+
+{% for range in xranges -%}
+
+ {%- with limitkeys={"since":range.firstrange},delimitkeys={"step":range.identifier} -%}
+ {% include 'partials/pulse.jinja' %}
+ {%- endwith -%}
+
+{%- endfor %}
diff --git a/maloja/web/static/css/maloja.css b/maloja/web/static/css/maloja.css
index 3c838db..95c17c1 100644
--- a/maloja/web/static/css/maloja.css
+++ b/maloja/web/static/css/maloja.css
@@ -802,10 +802,12 @@ table.misc td {
div.tiles {
display: grid;
- grid-template-columns: repeat(18, 50px);
- grid-template-rows: repeat(6, 50px);
+ grid-template-columns: repeat(18, calc(100% / 18));
+ grid-template-rows: repeat(6, calc(100% / 6));
grid-auto-flow: row dense;
+ aspect-ratio: 3 / 1;
+
}
div.tiles div {
@@ -982,35 +984,3 @@ span.stat_module_pulse, span.stat_module_topartists, span.stat_module_toptracks
display: inline-block;
vertical-align: top;
}
-
-/*
-**
-**
-** SIDE LIST ON START PAGE
-**
-**
-*/
-
-
-@media (min-width: 1600px) {
-div.sidelist {
- position:absolute;
- right:0px;
- top:0px;
- width:40%;
- height:100%;
- --current-bg-color: var(--base-color-light); /* drag this information through inheritances */
- background-color: var(--current-bg-color);
- padding-left:30px;
- padding-right:30px;
-}
-}
-
-div.sidelist table {
- width:100%;
- table-layout:fixed;
-}
-
-div.sidelist table.list td.time {
- width:17%;
-}
diff --git a/maloja/web/static/css/startpage.css b/maloja/web/static/css/startpage.css
new file mode 100644
index 0000000..2d3fe9b
--- /dev/null
+++ b/maloja/web/static/css/startpage.css
@@ -0,0 +1,49 @@
+div#startpage {
+ display: grid;
+ justify-content: center;
+
+ display: fixed;
+ grid-column-gap: 25px;
+ grid-row-gap: 25px;
+}
+
+
+@media (min-width: 2201px) {
+ div#startpage {
+ grid-template-columns: 30vw 30vw 30vw;
+ grid-template-rows: 45vh 45vh;
+
+ grid-template-areas:
+ "charts_artists charts_tracks charts_albums"
+ "lastscrobbles featured pulse";
+ }
+}
+
+@media (min-width: 1401px) and (max-width: 2200px) {
+ div#startpage {
+ grid-template-columns: 45vw 45vw;
+ grid-template-rows: 45vh 45vh 45vh;
+
+ grid-template-areas:
+ "charts_artists lastscrobbles"
+ "charts_tracks pulse"
+ "charts_albums featured";
+ }
+}
+
+@media (max-width: 1400px) {
+ div#startpage {
+ grid-template-columns: 90vw;
+
+ grid-template-areas:
+ "charts_artists"
+ "charts_tracks"
+ "charts_albums"
+ "lastscrobbles"
+ "pulse";
+ }
+
+ #start_page_module_featured {
+ display: none;
+ }
+}
diff --git a/maloja/web/static/js/rangeselect.js b/maloja/web/static/js/rangeselect.js
index f42d789..2561a69 100644
--- a/maloja/web/static/js/rangeselect.js
+++ b/maloja/web/static/js/rangeselect.js
@@ -2,7 +2,7 @@ localStorage = window.localStorage;
function showRange(identifier,unit) {
// Make all modules disappear
- modules = document.getElementsByClassName("stat_module_" + identifier);
+ var modules = document.getElementsByClassName("stat_module_" + identifier);
for (var i=0;i