Artist and track pyhp pages now fully equivalent to non-pyhp versions

This commit is contained in:
Krateng 2019-11-21 05:39:04 +01:00
parent 6372d2d8f2
commit ab7ca8f192
2 changed files with 20 additions and 0 deletions

View File

@ -57,10 +57,24 @@
<span><pyhp echo="includestring" /></span>
<p class="stats"><a href="/scrobbles?{encodedartist}"><pyhp echo="info['scrobbles']" /> Scrobbles</a></p>
<!-- MEDALS -->
<pyhp for="year" in="info['medals']['gold']"><a title="Best Artist in {year}" class="hidelink medal shiny gold" href='/charts_artists?max=50&amp;in={str(year)}'><span><pyhp echo="year" /></span></a></pyhp>
<pyhp for="year" in="info['medals']['silver']"><a title="Second best Artist in {year}" class="hidelink medal shiny silver" href='/charts_artists?max=50&amp;in={str(year)}'><span><pyhp echo="year" /></span></a></pyhp>
<pyhp for="year" in="info['medals']['bronze']"><a title="Third best Artist in {year}" class="hidelink medal shiny bronze" href='/charts_artists?max=50&amp;in={str(year)}'><span><pyhp echo="year" /></span></a></pyhp>
<!-- TOPWEEKS -->
<span><pyhp if="info.get('topweeks') not in [0,None]">
<a title="{str(info['topweeks'])} weeks on #1" href="/performance?{encodedartist}">
<img class="star" src="/media/star.png" /><pyhp echo="info['topweeks']" />
</a>
</pyhp></span>
<!-- CERTS -->
<pyhp for="track" in="db.get_tracks(artist=artist)"><pyhp if="db.trackInfo(track).get('certification') is not None"><a href='{htmlgenerators.link_address(track)}'><img class="certrecord_small"
src="/media/record_{db.trackInfo(track)['certification']}.png"
title="{track['title']} has reached {db.trackInfo(track)['certification'].capitalize()} status"
/></a></pyhp></pyhp>
</td>
</tr>

View File

@ -37,6 +37,12 @@
<pyhp for="year" in="info['medals']['gold']"><a title="Best Artist in {year}" class="hidelink medal shiny gold" href='/charts_artists?max=50&amp;in={str(year)}'><span><pyhp echo="year" /></span></a></pyhp>
<pyhp for="year" in="info['medals']['silver']"><a title="Second best Artist in {year}" class="hidelink medal shiny silver" href='/charts_artists?max=50&amp;in={str(year)}'><span><pyhp echo="year" /></span></a></pyhp>
<pyhp for="year" in="info['medals']['bronze']"><a title="Third best Artist in {year}" class="hidelink medal shiny bronze" href='/charts_artists?max=50&amp;in={str(year)}'><span><pyhp echo="year" /></span></a></pyhp>
<span><pyhp if="info.get('topweeks') not in [0,None]">
<a title="{str(info['topweeks'])} weeks on #1" href="/performance?{encodedtrack}">
<img class="star" src="/media/star.png" /><pyhp echo="info['topweeks']" />
</a>
</pyhp></span>
</td>
</tr>
</table>