templates/areas/hero/newsdetail.html.twig line 1

Open in your IDE?
  1. {% block content %}
    
        {# large #}
        {% set thumbS = '800x300' %}
        {% set thumbM = '1200x450' %}
        {% set thumbL = '2000x600' %}
        {% set thumbXL = '2000x550' %}
    
        {% set heroClass = 'section-hero' %}
    
        {% if hero is defined %}
            <section class="{{ heroClass }}">
    
                <div class="slick slick-slider-single-fade-autoplay">
    
                        {% set srcS  = hero.thumbnail(thumbS).getPath() %}
                        {% set srcM  = hero.thumbnail(thumbM).getPath() %}
                        {% set srcL  = hero.thumbnail(thumbL).getPath() %}
                        {% set srcXL = hero.thumbnail(thumbXL).getPath() %}
    
                        <div class="hero-slide">
                            <div class="image-container">
                                <img
                                    src={{ hero }}
                                    data-interchange="[{{ srcS }}, small], [{{ srcM }}, medium], [{{ srcL }}, large], [{{ srcXL }}, xlarge]"
                                    alt="{{ title|e }}"
                                    class="hero-wrapper"
                                >
                            </div>
                        </div>
                </div>
    
                {% if title %}
                    <div class="caption">
                        <div class="nav-wrap">
                            <div class="grid-x">
                                <div class="cell">
                                    <div class="panel">
    
                                        <p class="show-for-xmedium">
                                            {{ title|nl2br }}
                                        </p>
    
                                        <p class="hide-for-xmedium">
                                            {{ title }}
                                        </p>
    
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                {% endif %}
    
            </section>
        {% endif %}
    
    {% endblock %}