templates/widget/periodical_last.html.twig line 1

Open in your IDE?
  1. <section class="std-section issues-last">
        <div class="container">
            <div class="issues-last__heading">
                {% if title %}
                    <h2 class="h3">{{ title }}</h2>
                {% endif %}
                {% if link %}
                    <a class="issues-last__more" href="{{ link }}">{{ link_name }}</a>
                {% endif %}
                <div class="issues-last__controls">
                    <button class="arrow arrow-prev swiper-button-disabled">
                        <svg>
                            <use href="/assets/front/img/icons/control-arrow.svg#arrow" xlink:href="/assets/front/img/icons/control-arrow.svg#arrow"></use>
                        </svg>
                    </button>
                    <button class="arrow arrow-next">
                        <svg>
                            <use href="/assets/front/img/icons/control-arrow.svg#arrow" xlink:href="/assets/front/img/icons/control-arrow.svg#arrow"></use>
                        </svg>
                    </button>
                </div>
            </div>
            <div class="issues-last__slider">
                <div class="swiper-wrapper">
                    {% for periodical in periodical_list %}
                        <div class="issues-last__slide swiper-slide">
                            <div class="issues-item">
                                {% if periodical.picture %}
                                    <div class="issues-item__item-image">
                                        <img src="{{ asset('assets/front/img/empty214x246.svg') }}"
                                             data-src="{{ periodical.picture.url }}" alt="{{ periodical.name|escape }}">
                                    </div>
                                {% endif %}
                                <h2 class="issues-item__item-title">{{ periodical.name }}</h2>
                                {% if periodical.period %}
                                    <time>{{ periodical.period }}</time>
                                {% endif %}
                                <span class="issues-item__item-description">{{ periodical.description }}</span>
                                {% if periodical.file %}
                                    <div class="issues-item__item-link">
                                        <a href="{{ periodical.file.url }}" download>
                                            <span>Скачать</span>
                                            <svg>
                                                <use href="/assets/front/img/sprites/icons.svg#download"
                                                     xlink:href="/assets/front/img/sprites/icons.svg#download"></use>
                                            </svg>
                                        </a>
                                    </div>
                                {% endif %}
                            </div>
                        </div>
                    {% endfor %}
                </div>
                <div class="issues-last__pagination"></div>
            </div>
            {% if link %}
                <a class="issues-last__more" href="{{ link }}">{{ link_name }}</a>
            {% endif %}
        </div>
        <script data-defer=".issues-last">
            var requireOnDefer = function() {
                function callback() {
                    require(['assets/front/js/application/issues-last']);
                    window.removeEventListener('.issues-last', callback);
                }
                window.addEventListener('.issues-last', callback);
            }
            requireOnDefer();
            require([
                'css!assets/front/css/application/issues-last',
                'css!assets/front/css/application/issues-item'
            ]);
        </script>
    </section>