{% load static %}

{% load unicms_contexts %}

{% call obj=publication method='url' webpath=webpath as url %}

<div class="row">
    <div class="col">
        <div class="card-wrapper card-space">
            <div class="card card-bg no-after">
                {% if url %}
                <a style="" href="{{ url }}">
                {% endif %}
                    <img src="{{ publication.image_url }}"
                         title="{{ publication.title }}"
                         alt="{{ publication.title }}"
                         style="width:100%">
                {% if url %}
                </a>
                {% endif %}
                <div class="card-body">
                    <h5 class="card-title">
                        {% if url %}
                        <a style="text-decoration: none; color: #17324d;"
                           href="{{ url }}">
                        {% endif %}
                            {{ publication.title }}
                        {% if url %}
                        </a>
                        {% endif %}
                    </h5>
                    <p class="card-text">
                        {{ publication.subheading|truncatechars:66 }}
                    </p>
                    <a href="#">
                        <svg class="icon" alt="{% trans 'Share' %} {{ publication.title }}">
                            <use xlink:href="{% static 'svg/sprite.svg' %}#it-share"></use>
                        </svg>
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>

