Newer
Older
pre-www / src / layout / partials / tease.twig
{% if post.size == "lg" %}
    <a href="{{post.url}}" class="tease tease--lg">
        <div class="tease__main">
            <p class="tease-main-title">{{post.title}}</p>
        </div>
        <div class="tease__img">
            {% if post.featured_image %}
                {% include "./picture.twig" with {"image": post.featured_image } %}
            {% endif %}
        </div>
        <div class="tease__excerpt">
            <p>{{post.excerpt}}</p>
        </div>
    </a>
{% else %}
    <a href="{{post.url}}" class="tease" data-tease-cover>
        <div class="tease__img">
        {% if post.featured_image %}
            {% include "./picture.twig" with {"image": post.featured_image } %}
        {% endif %}
        </div>
        
        <div class="tease__main">
            <div class="tease-main-header">
                {% for term in post.terms|slice(0,1) %}
                    {% set parent_post_term = term[0] %}
                    {% set post_term = term[1] %}
                    <span>{{taxonomies[~type~].terms[~parent_post_term~].items[~post_term~].name}}</span>
                {% endfor %}
                {% if post.date %}
                    <span>{{post.date|date('d.m.Y')}}</span>
                {% endif %}
            </div>
            <p class="tease-main-title">{{post.title}}</p>
            {% if post.description %}
                <p>{{post.description}}</p>
            {% endif %}
        </div>
    </a>
{% endif %}