Added pyhp page for artist charts

This commit is contained in:
Krateng 2019-12-19 15:30:13 +01:00
parent d68393f91d
commit 582c4c8814
3 changed files with 46 additions and 1 deletions

View File

@ -199,11 +199,12 @@ def static_html(name):
environ["malojatime"] = malojatime
environ["utilities"] = utilities
environ["urihandler"] = urihandler
#environ["info"] = info
environ["settings"] = settings.get_settings
# external
environ["urllib"] = urllib
# request
environ["filterkeys"], environ["limitkeys"], environ["delimitkeys"], environ["amountkeys"] = uri_to_internal(keys)
environ["_urikeys"] = keys #temporary!
#response.set_header("Content-Type","application/xhtml+xml")
res = pyhpfile(pthjoin(WEBFOLDER,name + ".pyhp"),environ)

View File

@ -537,6 +537,8 @@ table.list td.bar div {
background-color:@TEXT_COLOR;
height:20px; /* can only do this absolute apparently */
position:relative;
display:inline-block;
margin-bottom:-3px;
}
table.list tr:hover td.bar div {
background-color:@FOCUS_COLOR;

View File

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Maloja - Artist Charts</title>
<script src="/datechange.js" async></script>
<pyhp include="common/header.html" />
</head>
<pyhp>
# this is temporary! all modules need to be converted into partials at some point
html_charts, rep = htmlmodules.module_artistcharts(**amountkeys,**limitkeys)
</pyhp>
<body>
<table class="top_info">
<tr>
<td class="image">
<div style="background-image:url('{utilities.getArtistImage(rep) if rep is not None else 0}')"></div>
</td>
<td class="text">
<h1>Artist Charts</h1><a href="/top_artists"><span>View #1 Artists</span></a><br/>
<span><pyhp echo="limitkeys['timerange'].desc(prefix=True)" /></span>
<br/><br/>
<pyhp echo="htmlmodules.module_filterselection(_urikeys)" />
</td>
</tr>
</table>
<span class="stat_module_topartists">
<pyhp if="settings('CHARTS_DISPLAY_TILES')">
<pyhp echo="htmlmodules.module_artistcharts_tiles(timerange=limitkeys['timerange'])" />
</pyhp>
</span>
<pyhp echo="html_charts" />
</body>
</html>