--- layout: blank-article ---
{% assign candidates = site.candidatelists | where: "uid", page.candidateListUid | first %} {% assign programCategories = site.program | where: "campaignCategoryUid", page.campaignCategoryUid | sort:"order" %} {% capture headline %}{{ page.title }}{% if candidates.number %}» volte č. {{ candidates.number }} «{% endif %}{% endcapture %} {% capture headerContent %}
{{ content }}
{% endcapture %} {% if candidates.number %}
Volte č. {{ candidates.number }}!
{% endif %} {% include page-header.html headline=headline content=headerContent %}

Kandidátní listina

{% assign leaderCandidate = site.people | where: "uid", candidates.leader.uid | first %} {% include candidate-badge.html candidate=candidates.leader candidatePage=leaderCandidate rank=1 %} {% if candidates.head.size %} {% for candidate in candidates.head %} {% assign candidatePage = site.people | where: "uid", candidate.uid | first %} {% assign candidateRank = forloop.index | plus: 1 %} {% include candidate-badge.html candidate=candidate candidatePage=candidatePage leader=false rank=candidateRank %} {% endfor %} {% endif %} {% if candidates.tail.size > 0 %}
{% for candidate in candidates.tail %}

{% assign candidateRank = forloop.index | plus: 1 | plus: candidates.head.size %} {{ candidateRank }}. {% if candidate.uid %} {% assign candidatePage = site.people | where: "uid", candidate.uid | first %} {% include people/fullname.html person=candidatePage %}{% if candidate.age or candidate.profession or candidate.party %}, {% endif %} {% else %} {{ candidate.name }}{% if candidate.age or candidate.profession or candidate.party %}, {% endif %} {% endif %} {% if candidate.age %} {{ candidate.age }} let{% if candidate.profession or candidate.party %}, {% endif %} {% endif %} {% if candidate.profession %} {{ candidate.profession }}{% if candidate.party %}, {% endif %} {% endif %} {% if candidate.party %} {{ candidate.party }} {% endif %}

{% endfor %}
{% endif %}
{% if candidates.note %}

Pozn.: {{ candidates.note }}

{% endif %}

Program

{% for category in programCategories %} {% endfor %}