degov-8.x-2.0/modules/degov_media_gallery/templates/media--gallery--usage.html.twig

modules/degov_media_gallery/templates/media--gallery--usage.html.twig
{#
/**
 * @file
 * Default theme implementation to present a media entity.
 *
 * Available variables:
 * - name: Name of the media.
 * - content: Media content.
 *
 * @see template_preprocess_media()
 *
 * @ingroup themeable
 */
#}
{%
set media_classes = [
  'media',
  'media-gallery',
  'clearfix',
]
%}
<article{{ attributes.addClass(media_classes) }}>
  {{ content.contextual_links }}
  <!-- Root element of PhotoSwipe. Must have class pswp. -->
  <div class="pswp pswp__media-gallery" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe.
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

      <!-- Container that holds slides.
          PhotoSwipe keeps only 3 of them in the DOM to save memory.
          Don't modify these 3 pswp__item elements, data is added later on. -->
      <div class="pswp__container">
        <div class="pswp__item"></div>
        <div class="pswp__item"></div>
        <div class="pswp__item"></div>
      </div>

      <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
      <div class="pswp__ui pswp__ui--hidden">

        <div class="pswp__top-bar">

          <!--  Controls are self-explanatory. Order can be changed. -->

          <div class="pswp__counter"></div>

          <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

          <button class="pswp__button pswp__button--share" title="Share"></button>

          <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

          <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

          <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
          <!-- element will get class pswp__preloader--active when preloader is running -->
          <div class="pswp__preloader">
            <div class="pswp__preloader__icn">
              <div class="pswp__preloader__cut">
                <div class="pswp__preloader__donut"></div>
              </div>
            </div>
          </div>
        </div>

        <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
          <div class="pswp__share-tooltip"></div>
        </div>

        <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
        </button>

        <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
        </button>

        <div class="pswp__caption">
          <div class="pswp__caption__center"></div>
        </div>

      </div>

    </div>

  </div>
  <div class="media-gallery__images">
    <div class="slideshow__slides">
    {% for key, slideshow_slide in content.field_gallery_images|field_value %}
      {{ slideshow_slide }}
    {% endfor %}

    </div>
    <div class="slick-controls slick-controls__gallery">
      <button class="slick__pause slick__pause--gallery">{{ 'Pause'|t }}</button>
      <button class="slick__play slick__play--gallery">{{ 'Play'|t }}</button>
      <button aria-hidden="true" class="slick__lightroom media-gallery-js-open-lightroom"><i class="fa fa-expand"></i> {{ 'Open image in a lightroom'|t }}</button>
      <span class="slick__counter">
        <span class="slick__counter__current">1</span>
        <span>{{ 'of'|t }}</span>
        <span class="slick__counter__total">{{ content.totalImages }}</span>
      </span>
    </div>
  </div>
  {% if content.field_title|field_value or content.field_gallery_sub_title|field_value or content.field_gallery_text|field_value %}
      <div class="media-gallery__info">
          <div class="media-gallery__tag">
              {{ 'Galerie'|t }}
          </div>
          <h2 class="media-gallery__title"{{ content.field_title|quickedit_attr }}>{{ content.field_title|field_value }}</h2>
          <div class="media-gallery__text"{{ content.field_gallery_text|quickedit_attr }}>{{ content.field_gallery_text|field_value }}</div>
      </div>
  {% endif %}
  {% if content.usage %}
    <div class="media-gallery__usage">
      <h2>{{ 'Usage'|trans }}</h2>
      {{  content.usage }}
    </div>
  {% endif %}
</article>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc