From 3ee7cd515a4d14b086368478026f2a325ab12aec Mon Sep 17 00:00:00 2001 From: Krateng Date: Tue, 23 Apr 2019 18:08:37 +0200 Subject: [PATCH] Now showing performance on artist / track overview page --- website/artist.html | 14 ++++++++++++-- website/artist.py | 4 +++- website/css/maloja.css | 6 ++++++ website/track.html | 13 +++++++++++++ website/track.py | 6 ++++-- 5 files changed, 38 insertions(+), 5 deletions(-) diff --git a/website/artist.html b/website/artist.html index d75c0c8..4e40e92 100644 --- a/website/artist.html +++ b/website/artist.html @@ -28,9 +28,19 @@

Top Tracks

KEY_TRACKLIST + + + + + +
+

Pulse

+ KEY_PULSE +
+

Performance

+ KEY_PERFORMANCE +
-

Pulse

- KEY_PULSE

Last Scrobbles

KEY_SCROBBLELIST diff --git a/website/artist.py b/website/artist.py index c6aed45..e114c28 100644 --- a/website/artist.py +++ b/website/artist.py @@ -6,7 +6,7 @@ def instructions(keys): from utilities import getArtistImage from htmlgenerators import artistLink, artistLinks from urihandler import compose_querystring, uri_to_internal - from htmlmodules import module_pulse, module_trackcharts, module_scrobblelist + from htmlmodules import module_pulse, module_performance, module_trackcharts, module_scrobblelist filterkeys, _, _, _ = uri_to_internal(keys,forceArtist=True) artist = filterkeys.get("artist") @@ -45,6 +45,7 @@ def instructions(keys): html_scrobbles, _, _ = module_scrobblelist(artist=artist,max_=10,earlystop=True) html_pulse = module_pulse(**filterkeys,step="year",stepn=1,trail=1) + html_performance = module_performance(**filterkeys,step="year",stepn=1,trail=1) replace = { "KEY_ARTISTNAME":keys["artist"], @@ -54,6 +55,7 @@ def instructions(keys): "KEY_MEDALS":html_medals, "KEY_TRACKLIST":html_tracks, "KEY_PULSE":html_pulse, + "KEY_PERFORMANCE":html_performance, "KEY_SCROBBLES":scrobbles, "KEY_SCROBBLELIST":html_scrobbles, "KEY_SCROBBLELINK":compose_querystring(keys), diff --git a/website/css/maloja.css b/website/css/maloja.css index 7cd5c22..987d029 100644 --- a/website/css/maloja.css +++ b/website/css/maloja.css @@ -371,6 +371,12 @@ span.stat_selector_pulse,span.stat_selector_topartists,span.stat_selector_toptra ** */ +table.twopart { + width:100%; +} +table.twopart>tr>td { + width:50%; +} diff --git a/website/track.html b/website/track.html index 17685a7..29d20a4 100644 --- a/website/track.html +++ b/website/track.html @@ -27,6 +27,19 @@

Pulse

KEY_PULSE + + + + + +
+

Pulse

+ KEY_PULSE +
+

Pulse

+ KEY_PERFORMANCE +
+

Last Scrobbles

KEY_SCROBBLELIST diff --git a/website/track.py b/website/track.py index 18be6fd..aa602b3 100644 --- a/website/track.py +++ b/website/track.py @@ -6,7 +6,7 @@ def instructions(keys): from utilities import getArtistImage, getTrackImage from htmlgenerators import artistLinks from urihandler import compose_querystring, uri_to_internal - from htmlmodules import module_scrobblelist, module_pulse + from htmlmodules import module_scrobblelist, module_pulse, module_performance filterkeys, _, _, _ = uri_to_internal(keys,forceTrack=True) @@ -38,6 +38,7 @@ def instructions(keys): html_scrobbles, _, _ = module_scrobblelist(track=track,max_=10,earlystop=True) # we have the number already from the trackinfo html_pulse = module_pulse(track=track,step="year",stepn=1,trail=1) + html_performance = module_performance(track=track,step="year",stepn=1,trail=1) replace = { @@ -49,7 +50,8 @@ def instructions(keys): "KEY_SCROBBLELINK":compose_querystring(keys), "KEY_MEDALS":html_medals, "KEY_SCROBBLELIST":html_scrobbles, - "KEY_PULSE":html_pulse + "KEY_PULSE":html_pulse, + "KEY_PERFORMANCE":html_performance } return (replace,pushresources)