{% capture label %} {% if include.label %}{{ include.label }}{% elsif include.item.name %}{{ include.item.name }}{% else %}{{ include.item.title }}{% endif %} {% endcapture %} {% if include.item.url contains 'http' %} {% assign url = include.item.url %} {% else %} {% assign url = include.item.url | relative_url %} {% endif %} {% capture avatarClass %} badge__avatar {% if include.avatarClass %}{{ include.avatarClass }}{% else %}avatar--sm{% endif %} {% endcapture %}
{% unless include.hideAvatar %} {%- if include.item.img -%} {% if site.mediaStorage %} {%- if include.imgSize != 'big' -%} {% capture img %}https://a.pirati.cz/crop/100x100/{{ site.mediaStorage }}/img/{{ include.item.img }}{% endcapture %} {%- else -%} {% capture img %}https://a.pirati.cz/crop/165x165/{{ site.mediaStorage }}/img/{{ include.item.img }}{% endcapture %} {%- endif -%} {%- else -%} {%- if include.imgSize != 'big' -%} {% capture img %}{% asset '{{ include.item.img }}' magick:resize='100x100^' magick:gravity='center' magick:crop='100x100+0+0' @path %}{% endcapture %} {%- else -%} {% capture img %}{% asset '{{ include.item.img }}' magick:resize='165x165^' magick:gravity='center' magick:crop='165x165+0+0' @path %}{% endcapture %} {%- endif -%} {%- endif -%} {% else %} {% capture img %}https://a.pirati.cz/common/img/people/unknown-pirate.svg{% endcapture %} {% endif %} {% include avatar.html src=img alt=label class=avatarClass url=url %} {% endunless %}

{{ label }}

{% unless include.showDescription == false %}

{% if include.description %} {{ include.description }} {% else %} {{ include.item.description }} {% endif %}

{% endunless %} {% unless include.showContactInfo == false %} {% if include.item.mob or include.item.mail %} {% if include.item.mob %} {% capture tel %}tel:{{ include.item.mob }}{% endcapture %} {% include contact-line.html icon="ico--phone" href=tel caption=include.item.mob class="contact-line--responsive badge__link" %} {% endif %} {% if include.item.mail %} {% capture mailto %}mailto:{{ include.item.mail }}{% endcapture %} {% include contact-line.html icon="ico--envelope" href=mailto caption=include.item.mail class="contact-line--responsive badge__link" %} {% endif %} {% endif %} {% endunless %}