Select Git revision
compact_candidate_snippet.html
-
Alexa Valentová authoredAlexa Valentová authored
compact_candidate_snippet.html 2.03 KiB
{% load static wagtailimages_tags %}
<a href="{{ person_page.url }}" class="candidate-table-row">
<div class="candidate-table-row__position head-allcaps-heavy-2xs text-right">
<span {% if forloop.counter < 10 %}class="pl-1 pr-1"{% endif %}>
{{ forloop.counter }}
</span>
</div>
<div class="avatar avatar--sm candidate-table-row__avatar">
{% if person_page.profile_photo %}
{# Match sizing of person_badge_snippet.html to keep the image version count low #}
{% image person_page.profile_photo fill-160x160 as profile_img %}
<img src="{{ profile_img.url }}" alt="{{ person_page.title }}"/>
{% else %}
<img src="{% static "shared/img/unknown_pirate_160x160.jpg" %}" alt="{{ person_page.title }}"/>
{% endif %}
</div>
<div class="candidate-table-row__name head-heavy-2xs font-bold">
{{ person_page.title }}
</div>
<div class="candidate-table-row__bio font-condensed">
{% if person_page.age %}
{{ person_page.age }} let{% if person_page.job or person_page.city %},{% endif %}
{% endif %}
{% if person_page.job %}
{{ person_page.job }}{% if person_page.city %},{% endif %}
{% endif %}
{% if person_page.city %}{{ person_page.city }}{% endif %}
</div>
<div class="candidate-table-row__affiliation">
<div class="flex items-center">
{% if person_page.is_pirate %}
<div class="avatar w-6 mr-2">
<img src="{% static "shared/img/logo_black.svg" %}" alt="Pirátská strana">
</div>
<span class="font-bold font-condensed">Pirátská strana</span>
{% endif %}
{% if not person_page.is_pirate and person_page.other_party %}
{% if person_page.other_party_logo %}
{% image person_page.other_party_logo width-48 as logo_img %}
<div class="avatar w-6 mr-2">
<img src="{{ logo_img.url }}" alt="{{ person_page.other_party }}">
</div>
{% endif %}
<span class="font-bold font-condensed">{{ person_page.other_party }}</span>
{% endif %}
</div>
</div>
</a>