{% extends cms_template() %}
{% block title %}Vyhľadávnie |
{{parent()}}
{% endblock %}
{% macro getLink(item) %}{{
item.type is same as "event" ? "/udalosti/"~ item.slug : item.type is same as "article" ? "/clanky/"~ item.slug : "/"~ item.slug
}}{% endmacro %}
{% macro getNamedType(item) %}{{
item.type is same as "event" ? "Udalosť" : item.type is same as "article" ? "Článok" : "Stránka"
}}{% endmacro %}
{% macro getIcon(item) %}
{% if item.icon %}
{% set splitted = item.icon | split('.') %}
<div style="flex-basis: 10%; width:90px; height:60px; margin:10px; margin-left:0;text-align:center;">
<img style="width: auto; height: auto; max-width:100%; max-height:100%;" src="{{ splitted | slice(0, -1) | join('.') ~ '_thumb_100x100.' ~ ( splitted | slice(-1) | join('.') ) }}" alt="{{ item.title }}">
</div>
{% endif %}
{% endmacro %}
{% block body %}
<div>
<h1 class="govuk-heading-xl">Výsledky vyhľadávania</h1>
<div>
<p>
{% if items | length > 1 %}
Pre zadaný výraz <strong>{{ search_slug }}</strong> boli nájdené tieto výsledky:
{% elseif items | length is same as 1 %}
Pre zadaný výraz <strong>{{ search_slug }}</strong> bol nájdený tento výsledok:
{% else %}
Pre zadaný výraz <strong>{{ search_slug }}</strong> neboli nájdené žiadne výsledky.
{% endif %}
</p>
</div>
<div data-module="idsk-crossroad" class="">
<div class="idsk-crossroad idsk-crossroad-1">
{% for item in items %}
<div class="idsk-crossroad__item ">
<div style="display:flex;">
{{ _self.getIcon(item) }}
<div>
<a href="{{ _self.getLink(item) }}" class="govuk-link idsk-crossroad-title" title="{{ item.title }}" aria-hidden="false">{{ item.title }}
</a>
<p class="idsk-crossroad-subtitle" aria-hidden="false">{{ _self.getNamedType(item) }}</p>
</div>
</div>
<hr class="idsk-crossroad-line" aria-hidden="true"/>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="govuk-clearfix"></div>
{% endblock %}