You are here

juicebox-embed-markup.html.twig in Juicebox HTML5 Responsive Image Galleries 8.2

Same filename and directory in other branches
  1. 8.3 templates/juicebox-embed-markup.html.twig

Default theme implementation to display the embed code for a Juicebox gallery.

Available variables:

  • gallery_id: The unique identifier for this gallery.
  • gallery_images: Image data for all the images in the gallery.
  • gallery_options: Options to be passed to the Juicebox javascript library for this gallery.
  • attributes: Any overall attributes for the parent wrapper.
  • title_suffix: Title suffix data as typically provided by contextual links.

File

templates/juicebox-embed-markup.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display the embed code for a Juicebox
  5. * gallery.
  6. *
  7. * Available variables:
  8. * - gallery_id: The unique identifier for this gallery.
  9. * - gallery_images: Image data for all the images in the gallery.
  10. * - gallery_options: Options to be passed to the Juicebox javascript library
  11. * for this gallery.
  12. * - attributes: Any overall attributes for the parent wrapper.
  13. * - title_suffix: Title suffix data as typically provided by contextual links.
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. <div{{ attributes }}>
  19. {{ title_suffix }}
  20. <div id="{{ gallery_id }}" class="juicebox-container">
  21. <noscript>
  22. <!-- Image gallery content for non-javascript devices -->
  23. {% if gallery_options.gallerytitle is defined %}
  24. <h1 class="jb-name">{{ gallery_options.gallerytitle}}</h1>
  25. {% endif %}
  26. {% if gallery_options.gallerydescription is defined %}
  27. <p class="jb-description">{{ gallery_options.gallerydescription}}</p>
  28. {% endif %}
  29. {% for image in gallery_images %}
  30. <p class="jb-image">
  31. {{ image.image_plain }}<br/>
  32. <span class="jb-title">{{ image.title }}</span><br/>
  33. <span class="jb-caption">{{ image.caption }}</span>
  34. </p>
  35. {% endfor %}
  36. </noscript>
  37. </div>
  38. </div>