{% load i18n %}
{% load static %}

{% load unicms_contexts %}

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


<div class="card-wrapper card-space">
    <div class="card card-bg no-after">
        <div class="card-body">
            <div class="row">
                <div class="col-12 col-lg-4">
                    {% if url %}
                    <a href="{{ url }}">
                    {% endif %}
                        <img src="{{ publication.image_url }}"
                             title="{{ publication.image_title }}"
                             alt="{{ publication.image_description }}"
                             class="w-100"
                             loading="lazy">
                    {% if url %}
                    </a>
                    {% endif %}
                </div>
                <div class="col-12 col-lg-8 ps-lg-5 mt-lg-3 mt-3 mt-lg-0">

                    {% include "includes/edit_page_publication.html" with item=page_publication %}

                    {% if url %}
                    <a class="no-color" href="{{ url }}">
                    {% endif %}
                        <h4 class="card-title">
                            {{ publication.title }}
                        </h4>
                    {% if url %}
                    </a>
                    {% endif %}

                    {% block card_content %}
                    {% if publication.content %}
                    <p class="card-text">
                        {{ publication.content|safe }}
                    </p>
                    {% endif %}
                    {% endblock card_content %}

                    {% if url %}
                    {% include "includes/social_share.html" with share_title=item.publication.title share_url=request.get_host|add:url %}
                    {% endif %}
                </div>
            </div>
        </div>
    </div>
</div>

