diff --git a/website/artist.html b/website/artist.html
index dcfc666..9f392d5 100644
--- a/website/artist.html
+++ b/website/artist.html
@@ -4,6 +4,7 @@
Maloja - KEY_ARTISTNAME
+
@@ -32,11 +33,34 @@
- KEY_PULSE
+
+
+ 7 days
+ | 12 weeks
+ | 12 months
+ | 10 years
+
+
+
+ KEY_PULSE_MONTHS
+ KEY_PULSE_DAYS
+ KEY_PULSE_YEARS
+ KEY_PULSE_WEEKS
|
+
- KEY_PERFORMANCE
+ 7 days
+ | 12 weeks
+ | 12 months
+ | 10 years
+
+
+
+ KEY_PERFORMANCE_MONTHS
+ KEY_PERFORMANCE_DAYS
+ KEY_PERFORMANCE_YEARS
+ KEY_PERFORMANCE_WEEKS
|
diff --git a/website/artist.py b/website/artist.py
index d271eed..f5b1726 100644
--- a/website/artist.py
+++ b/website/artist.py
@@ -1,5 +1,6 @@
import urllib
import database
+from malojatime import today,thisweek,thismonth,thisyear
def instructions(keys):
@@ -46,24 +47,46 @@ def instructions(keys):
html_scrobbles, _, _ = module_scrobblelist(artist=artist,max_=10,earlystop=True)
+ # pulse and rankings
html_pulse = module_pulse(**filterkeys,step="year",stepn=1,trail=1)
+ html_pulse_days = module_pulse(**filterkeys,max_=7,since=today().next(-6),step="day",trail=1)
+ html_pulse_weeks = module_pulse(**filterkeys,max_=12,since=thisweek().next(-11),step="week",trail=1)
+ html_pulse_months = module_pulse(**filterkeys,max_=12,since=thismonth().next(-11),step="month",trail=1)
+ html_pulse_years = module_pulse(**filterkeys,max_=10,since=thisyear().next(-9),step="year",trail=1)
+
html_performance = module_performance(artist=credited,step="year",stepn=1,trail=1)
+ html_performance_days = module_performance(**filterkeys,max_=7,since=today().next(-6),step="day",trail=1)
+ html_performance_weeks = module_performance(**filterkeys,max_=12,since=thisweek().next(-11),step="week",trail=1)
+ html_performance_months = module_performance(**filterkeys,max_=12,since=thismonth().next(-11),step="month",trail=1)
+ html_performance_years = module_performance(**filterkeys,max_=10,since=thisyear().next(-9),step="year",trail=1)
replace = {
+ # info
"KEY_ARTISTNAME":keys["artist"],
"KEY_ENC_ARTISTNAME":urllib.parse.quote(keys["artist"]),
"KEY_ENC_CREDITEDARTISTNAME":urllib.parse.quote(credited),
"KEY_IMAGEURL":imgurl,
"KEY_DESCRIPTION":"",
- "KEY_MEDALS":html_medals,
- "KEY_TRACKLIST":html_tracks,
- "KEY_PULSE":html_pulse,
- "KEY_PERFORMANCE":html_performance,
"KEY_SCROBBLES":scrobbles,
+ "KEY_POSITION":pos,
+ "KEY_ASSOCIATED":includestr,
+ "KEY_MEDALS":html_medals,
+ # tracks
+ "KEY_TRACKLIST":html_tracks,
+ # pulse
+ "KEY_PULSE_MONTHS":html_pulse_months,
+ "KEY_PULSE_YEARS":html_pulse_years,
+ "KEY_PULSE_DAYS":html_pulse_days,
+ "KEY_PULSE_WEEKS":html_pulse_weeks,
+ # performance
+ "KEY_PERFORMANCE_MONTHS":html_performance_months,
+ "KEY_PERFORMANCE_YEARS":html_performance_years,
+ "KEY_PERFORMANCE_DAYS":html_performance_days,
+ "KEY_PERFORMANCE_WEEKS":html_performance_weeks,
+ # scrobbles
"KEY_SCROBBLELIST":html_scrobbles,
"KEY_SCROBBLELINK":compose_querystring(keys),
- "KEY_POSITION":pos,
- "KEY_ASSOCIATED":includestr
+
}
return (replace,pushresources)
diff --git a/website/css/maloja.css b/website/css/maloja.css
index e9514bd..34da272 100644
--- a/website/css/maloja.css
+++ b/website/css/maloja.css
@@ -393,6 +393,7 @@ table.list tr td {
overflow:hidden;
text-overflow:ellipsis;
padding-right:15px;
+ line-height: 140%;
}
@@ -648,6 +649,18 @@ table.tiles_3x3 td {
+/*
+**
+**
+** Pulse / performance thingies
+**
+**
+*/
+
+span.stat_module_pulse {
+ display: inline-block;
+ vertical-align: top;
+}
/*
**
diff --git a/website/javascript/rangeselect.js b/website/javascript/rangeselect.js
new file mode 100644
index 0000000..237e260
--- /dev/null
+++ b/website/javascript/rangeselect.js
@@ -0,0 +1,28 @@
+function showRange(identifier,unit) {
+ // Make all modules disappear
+ modules = document.getElementsByClassName("stat_module_" + identifier)
+ for (var i=0;i
Maloja
-
-
-
-
+
@@ -39,17 +20,17 @@
- This Week
- | This Month
- | This Year
- | All Time
+ This Week
+ | This Month
+ | This Year
+ | All Time
- KEY_TOPARTISTS_WEEK
- KEY_TOPARTISTS_MONTH
- KEY_TOPARTISTS_YEAR
- KEY_TOPARTISTS_TOTAL
+ KEY_TOPARTISTS_WEEK
+ KEY_TOPARTISTS_MONTH
+ KEY_TOPARTISTS_YEAR
+ KEY_TOPARTISTS_TOTAL
@@ -57,17 +38,17 @@
- This Week
- | This Month
- | This Year
- | All Time
+ This Week
+ | This Month
+ | This Year
+ | All Time
- KEY_TOPTRACKS_WEEK
- KEY_TOPTRACKS_MONTH
- KEY_TOPTRACKS_YEAR
- KEY_TOPTRACKS_TOTAL
+ KEY_TOPTRACKS_WEEK
+ KEY_TOPTRACKS_MONTH
+ KEY_TOPTRACKS_YEAR
+ KEY_TOPTRACKS_TOTAL
@@ -97,27 +78,27 @@
Years
-->
- 7 days
- | 12 weeks
- | 12 months
- | 10 years
+ 7 days
+ | 12 weeks
+ | 12 months
+ | 10 years
- KEY_PULSE_MONTHS
- KEY_PULSE_DAYS
- KEY_PULSE_YEARS
- KEY_PULSE_WEEKS
+ KEY_PULSE_MONTHS
+ KEY_PULSE_DAYS
+ KEY_PULSE_YEARS
+ KEY_PULSE_WEEKS