templates/Webcam/detail.html.twig line 1

Open in your IDE?
  1. {% extends "Layout/default.html.twig" %}
  2. {% block content %}
  3.     {{ include('Navigation/breadcrumb.html.twig') }}
  4.     {{ include('Includes/main-title-block-editable.html.twig', {
  5.         styleModifier: 'container-sm text-center'
  6.     }) }}
  7.     {{ include('Includes/areablock.html.twig') }}
  8.     <div class="container container-sm content-block">
  9.         <div class="row vertical-gutter--4 justify-content-center">
  10.             {% for webcam in webcams %}
  11.                 {% if webcam.webcamType in ['Panomax', 'Panocloud', 'iFrame'] %}
  12.                     {% set url = webcam.iFrameUrl %}
  13.                 {% else %}
  14.                     {% set url = "https://webtv.feratel.com/webtv/?design=v5" ~ ( not webcam.feratelRemovePGParam ? "&pg=63EC2CEF-349C-4921-B13D-6C0600312A71" : '') ~ "&cam=" ~ webcam.fid %}
  15.                 {% endif %}
  16.                 <div class="col-md-{{ webcam.webcamType in ['Panomax', 'Panocloud'] ? '12' : '6'}} vertical-gutter__item">
  17.                     <section class="lightbox-teaser cursor-pointer teaser-animation js-lightbox" data-lightbox-video="false"> {#{{ isLightbox ? 'js-lightbox' : ''}}#}
  18. {#                        {% if webcam.webcamType == 'Panomax' %}#}
  19.                             <div class="js-lightbox__item" data-sub-html='' data-iframe="true" data-src="{{ url }}">
  20.                                 {% set previewImage = webcam.image_override ?: webcam.image %}
  21.                                 {% if webcam.webcamType in ['Panomax', 'Panocloud'] %}
  22.                                     {{ _self.content("15by4 embed-responsive-20by11-xs", "lightbox-teaser-lg", webcam.region.name, webcam.name, previewImage) }}
  23.                                 {% else %}
  24.                                     {{ _self.content("20by11", "lightbox-teaser", webcam.region.name, webcam.name, previewImage) }}
  25.                                 {% endif %}
  26.                             </div>
  27. {#                        {% else %}#}
  28. {#                            <a href="{{ url }}" target="_blank">#}
  29. {#                                {{ _self.content("20by11", "lightbox-teaser", webcam.region.name, webcam.name) }}#}
  30. {#                            </a>#}
  31. {#                        {% endif %}#}
  32.                     </section>
  33.                     {% macro content(aspectRatio, thumbnail, subtitle, title, image) %}
  34.                         <div class="embed-responsive embed-responsive-{{ aspectRatio }}">
  35.                             {{ image.thumbnail(thumbnail).html({
  36.                                 imgAttributes: {
  37.                                     class: 'embed-responsive-item js-lazy-img teaser-animation__img'
  38.                                 },
  39.                                 lowQualityPlaceholder: true
  40.                             })|raw }}
  41.                         </div>
  42.                         <button type="button" class="btn btn-white icon-btn icon-btn--lg icon-btn--centered"><span class="icon icon-webcams icon-btn__icon" aria-label="open lightbox" title="open lightbox"></span></button>
  43.                         <div class="lightbox-teaser__content">
  44.                             {{ subtitle }}
  45.                             <h3 class="mt-1 mb-0 lightbox-teaser__content__title">{{ title }}</h3>
  46.                         </div>
  47.                     {% endmacro %}
  48.                 </div>
  49.             {% endfor %}
  50.         </div>
  51.     </div>
  52.     {{ include('Includes/areablock.html.twig', {'areaName': 'bottomContent'}) }}
  53. {% endblock %}
  54.     {% block javascripts %}
  55.         {% if not app.request.get('onlyInlineCss') %}
  56.         {{ include('Layout/includes/encore.html.twig', {
  57.             'staticDebugMode': staticDebugMode,
  58.             'file': 'js/webcams'
  59.         }) }}
  60.         {% endif %}
  61.     {% endblock %}