{% extends 'project/content.html' %}
{% load i18n thumbnail cms_tags %}

{% block title %}{{ object.title }}{% endblock %}

{% block content_intro %}
    <div class="content__intro reveal_container reveal_self reveal reveal_animation{% if object.image %} image{% endif %}">
        <div class="content__intro__content reveal reveal_animation">
            <h1>{{ object.title }}</h1>
            <a href="{% url 'portal:overview' %}" class="button">
                <span class="button__icon">{% include 'project/assets/arrow-left-long.svg' %}</span>
                <span class="button__text">{% trans 'Zurück zur Übersicht' %}</span>
            </a>
        </div>
        {% if object.image %}
            {% thumbnail object.image 1600x800 box=object.cropping crop detail as thumb %}
            <div class="content__intro__image scroll reveal reveal_animation" data-ease-multiplier="-2"
                 style="background-image: url({{ thumb.url }})"></div>
        {% endif %}
    </div>
{% endblock %}

{% block navigation_title %}{{ object.title }}{% endblock %}

{% block content_main %}
    {% render_placeholder object.placeholder language LANGUAGE_CODE %}

    <form action="{{ request.path }}" method="post" class="information__form reveal_self reveal reveal_animation">
        {% csrf_token %}

        <div class="form__submit">
            <a href="{% url 'portal:overview' %}" class="button button--ghost">
                <span class="button__icon">{% include 'project/assets/arrow-left-long.svg' %}</span>
                <span class="button__text">{% trans 'Zurück zur Übersicht' %}</span>
            </a>
            {% if not information and not request.user in object.informed_users.all %}
                <button class="button">
                    <span class="button__icon">{% include 'project/assets/tick.svg' %}</span>
                    <span class="button__text">{% trans 'Als gelesen markieren' %}</span>
                </button>
            {% endif %}
        </div>
    </form>
{% endblock %}