Newer
Older
pre-www / src / layout / archive-degrees.twig
{% if paths_base == null %}
    {% set paths_base = ".." %}
{% endif %}

{% set bodyClasses = "archive" %}

{% extends "./base.twig" %}

{% block breadcrumbs %}

    {% set breadcrumbs_block = 
        {
            "post_type": "taxonomy_archive",
            "taxonomy": "degrees",
            "current_term": current_term
        }
    %}
    {% include "../blocks/breadcrumbs.twig" with {"block": breadcrumbs_block } %}

{% endblock %}

{% block content %}

    {% for degree in post_type.degrees.items %}
        {% if current_term in degree.terms %}
            <div class="archive-degrees-degree">

                {% set degree_marquee = 
                    {
                        "key": "marquee-images",
                        "speed": "0.003",
                        "content": {
                            "images": degree.degree_images,
                        }
                    } 
                %}
                {% include "../blocks/marquee-images.twig" with {"block": degree_marquee } %}


                <div class="grid-container">
                    <div class="columns">
                        <div class="w-full lg:w-1/2 column">
                            {% set degree_title = {
                                "key": "title",
                                "tag": "h2",
                                "clickable": true,
                                "content": {
                                    "title": degree.title,
                                    "url": degree.url
                                }
                            } %}
                            {% include "../blocks/title.twig" with {"block": degree_title } %}
                        </div>
                        <div class="w-full lg:w-1/2 column">
                            {% set degree_excerpt = {
                                "key": "paragraph",
                                "content": degree.excerpt
                            } %}
                            {% include "../blocks/paragraph.twig" with {"block": degree_excerpt } %}
                        </div>
                    </div>
                </div>

                {% set degree_info_grid_list = 
                    {
                        "key": "grid-list",
                        "content": {
                            "items": [
                                degree.degree_info.content.items[0],
                                degree.degree_info.content.items[9],
                                degree.degree_info.content.items[2],
                                degree.degree_info.content.items[4]
                            ]
                        }
                    }
                %}
                {% include "../blocks/grid-list.twig" with {"block": degree_info_grid_list } %}

                {% set degree_cta = {
                    "key": "link",
                    "content": {
                        "name": "Vai alla pagina del corso",
                        "url": "#"
                    }
                } %}

                {% include "../blocks/link.twig" with {"block": degree_cta } %}

            </div>
        {% endif %}
    {% endfor %}


{% endblock %}