Newer
Older
pre-www / src / layout / single-event.twig
@EcosistemaWebIuav EcosistemaWebIuav on 23 Feb 2 KB fix: css blocks, layout, grid 4k
{% if paths_base == null %}
    {% set paths_base = '../..' %}
{% endif %}

{% set type = "events" %}

{% extends "base.twig" %}

{% set bodyClasses = 'single single-event' %}

{% set post = post_type.events.items[currentPost] %}

{% block breadcrumbs %}

    {% set breadcrumbs_block = 
        {
            "post_type": type,
            "show_terms": false,
            "current_id": currentPost 
        }
    %}
    {% include '../blocks/breadcrumbs.twig' with {'block': breadcrumbs_block } %}

{% endblock %}

{% block content %}

    <div class="grid-container event-image">
        {% include "../layout/partials/picture.twig" with {"image": post.featured_image } %}
    </div>
    
    <div class="grid-container event-content">
        <div class="columns">
            <div class="w-full lg:w-1/2 column">
                <div class="event-col-sticky">
                    {% set event_info = {
                        "key": "grid-list",
                        "content": {
                            "items": [
                                {
                                    "label": "Data",
                                    "text": post.date.start|date('d.m')
                                },
                                {
                                    "label": "Orario",
                                    "text": post.date.start|date('h:m')
                                },
                                {
                                    "label": "Categoria",
                                    "text": post.terms[0][1][0]
                                },
                            ]
                        }

                    } %}
                    {% include "../blocks/grid-list.twig" with {"block": event_info } %}
                </div>
            </div>
            <div class="w-full lg:w-1/2 column">
                <p class="event-subtitle">{{post.subtitle}}</p>
                {{post.content}}
            </div>
        </div>
    </div>

    {% for block in post.blocks %}
        {% include '../blocks/'~block.key~'.twig' with {'block': block } %}
    {% endfor %}

{% endblock %}