1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Unified filter desciptions

This commit is contained in:
krateng 2023-03-28 21:00:39 +02:00
parent 4a0bd4b97e
commit add7991604
7 changed files with 14 additions and 9 deletions

View File

@ -2,6 +2,7 @@
{% block title %}Maloja - Album Charts{% endblock %}
{% import 'snippets/links.jinja' as links %}
{% import 'snippets/filterdescription.jinja' as filterdesc %}
{% block scripts %}
<script src="/datechange.js" async></script>
@ -26,8 +27,7 @@
</td>
<td class="text">
<h1>Album Charts</h1><a href="/top_albums"><span>View #1 Albums</span></a><br/>
{% if filterkeys.get('artist') is not none %}by {{ links.link(filterkeys.get('artist')) }}{% endif %}
<span>{{ limitkeys.timerange.desc(prefix=True) }}</span>
{{ filterdesc.desc(filterkeys,limitkeys) }}
<br/><br/>
{% with delimitkeys = {} %}
{% include 'snippets/timeselection.jinja' %}

View File

@ -1,6 +1,8 @@
{% extends "abstracts/base.jinja" %}
{% block title %}Maloja - Artist Charts{% endblock %}
{% import 'snippets/filterdescription.jinja' as filterdesc %}
{% block scripts %}
<script src="/datechange.js" async></script>
{% endblock %}
@ -25,7 +27,7 @@
</td>
<td class="text">
<h1>Artist Charts</h1><a href="/top_artists"><span>View #1 Artists</span></a><br/>
<span>{{ limitkeys.timerange.desc(prefix=True) }}</span>
{{ filterdesc.desc(filterkeys,limitkeys) }}
<br/><br/>
{% with delimitkeys = {} %}
{% include 'snippets/timeselection.jinja' %}

View File

@ -2,6 +2,7 @@
{% block title %}Maloja - Track Charts{% endblock %}
{% import 'snippets/links.jinja' as links %}
{% import 'snippets/filterdescription.jinja' as filterdesc %}
{% block scripts %}
<script src="/datechange.js" async></script>
@ -26,8 +27,7 @@
</td>
<td class="text">
<h1>Track Charts</h1><a href="/top_tracks"><span>View #1 Tracks</span></a><br/>
{% if filterkeys.get('artist') is not none %}by {{ links.link(filterkeys.get('artist')) }}{% endif %}
<span>{{ limitkeys.timerange.desc(prefix=True) }}</span>
{{ filterdesc.desc(filterkeys,limitkeys) }}
<br/><br/>
{% with delimitkeys = {} %}
{% include 'snippets/timeselection.jinja' %}

View File

@ -1,5 +1,5 @@
{% macro link(entity) -%}
{% if entity is mapping and 'artists' 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 %}

View File

@ -1,6 +1,7 @@
{% extends "abstracts/base.jinja" %}
{% block title %}Maloja - #1 Albums{% endblock %}
{% import 'snippets/filterdescription.jinja' as filterdesc %}
<!-- find representative -->
@ -17,7 +18,7 @@
</td>
<td class="text">
<h1>#1 Albums</h1><br/>
<span>{{ limitkeys.timerange.desc(prefix=True) }}</span>
{{ filterdesc.desc(filterkeys,limitkeys) }}
<br/><br/>
{% include 'snippets/timeselection.jinja' %}

View File

@ -1,6 +1,7 @@
{% extends "abstracts/base.jinja" %}
{% block title %}Maloja - #1 Artists{% endblock %}
{% import 'snippets/filterdescription.jinja' as filterdesc %}
<!-- find representative -->
@ -17,7 +18,7 @@
</td>
<td class="text">
<h1>#1 Artists</h1><br/>
<span>{{ limitkeys.timerange.desc(prefix=True) }}</span>
{{ filterdesc.desc(filterkeys,limitkeys) }}
<br/><br/>
{% include 'snippets/timeselection.jinja' %}

View File

@ -1,6 +1,7 @@
{% extends "abstracts/base.jinja" %}
{% block title %}Maloja - #1 Tracks{% endblock %}
{% import 'snippets/filterdescription.jinja' as filterdesc %}
<!-- find representative -->
@ -17,7 +18,7 @@
</td>
<td class="text">
<h1>#1 Tracks</h1><br/>
<span>{{ limitkeys.timerange.desc(prefix=True) }}</span>
{{ filterdesc.desc(filterkeys,limitkeys) }}
<br/><br/>
{% include 'snippets/timeselection.jinja' %}