{% extends "templates/layout.twig" %}

{% block pageHead %}
    {% if featuredVideo %}
        {% set thumb_quality = mobile ? 'hqdefault' : 'maxresdefault' %}
        <link rel="preconnect" href="https://i.ytimg.com">
        <link rel="preload" as="image" href="https://i.ytimg.com/vi/{{featuredVideo|raw}}/{{thumb_quality|raw}}.jpg" fetchpriority="high">
    {% else %}
        <link rel="preload" as="image" href="{{featuredImage.sizes.hero.url|raw}}" fetchpriority="high" type="image/webp">
    {% endif %}
    <meta name="author" content="{{author.first_name|raw}} {{author.last_name|raw}}">

    <title>{{ seo_title|default(post.data.titolo)|raw }}</title>
    <meta name="description" content="{{ seo_description|default(post.data.descrizione)|raw }}">
{% endblock %}

{% block page %}


    {% block data %}
    <span data-container='{
            "type" : "{{type}}",
            "infinite" : "false",
            "title": "{{post.title|escape('js') }}", "container" : ".articles-container" , "content" : "article"
        , "appendToRequest" : "?is_ajax_request" , "contents" : [ {% for related in relateds %}
        {"title":"{{related.title|escape('js')}}", "url" :"{{related.link}}"}{% if not loop.last %},{% endif %} {% endfor %}
        ], "taxonomies" : { {% for taxonomy, data in taxonomies %} "{{ taxonomy }}" : [ {% for term in data.terms
        %} "{{ term.label|escape('js') }}" {% if not loop.last %},{% endif %} {% endfor %} ] {% if not loop.last %},{% endif
        %} {% endfor %} } }'></span>
    {% endblock %}

    <div class="articles-container">
        <article id="{{post.id}}" class="lg:px-0">

            <div class="post-content-single relative flex-wrap">
  

                {% if mobile %}
                    {% include "templates/components/single/article-head-mobile.twig" %}
                {% else %}
                    {% include "templates/components/single/article-head.twig" %}
                {% endif %}

           
                <div class="lg:grid lg:gap-4 lg:grid-cols-[auto_300px] relative">
                    <div>
                   
                        {% include "templates/components/single/share-buttons-desktop.twig" %}
                        {% include "templates/components/single/article-content.twig" %}
                        {% include "templates/components/single/selected-offer-box.twig" %}
                    
                        {% if mobile %}
                        <div class="mb-6 px-6">
                            {% include "templates/components/single/share-buttons-mobile.twig" %}
                        </div>
                        {% endif %}
                   


                      
             
                    </div>
                    {% include 'templates/components/single/sidebar.twig' %}
                </div>
                {% include "templates/components/single/related-footer.twig" %}
     
            </div>
        
            {% include "templates/components/single/related-bottom.twig" %}

            <span id="comments_target" class="pt-16 -mt-16"></span>
            {% include "templates/components/single/comments.twig" %}

  
        </article>
    </div>

    {% include "templates/components/common/load_fancybox.twig" %}

    {% block pageFooter %}
        {% include "templates/components/common/newsletter_modal.twig" %}
    {% endblock %}

{% endblock %}
