You are here

views-view-jssor.html.twig in Jssor Slider 8

Default theme implementation to display a view of jssor slider.

Available variables:

  • slider_id: Unique slider ID. Unfortunately Jssor Slider require an ID.
  • title: The title of this group of rows. May be empty.
  • rows: A list of the view's row items.
    • attributes: The row's HTML attributes.
    • content: The row's content.
  • arrowskin: Arrow skin
  • bulletskin: Bullet skin.
  • bulletnavigator: Enable or not the bullet navigator.
  • arrownavigator: Enable or not the arrow navigator.

See also

template_preprocess_jssor()

File

templates/views-view-jssor.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a view of jssor slider.
  5. *
  6. * Available variables:
  7. * - slider_id: Unique slider ID. Unfortunately Jssor Slider require an ID.
  8. * - title: The title of this group of rows. May be empty.
  9. * - rows: A list of the view's row items.
  10. * - attributes: The row's HTML attributes.
  11. * - content: The row's content.
  12. * - arrowskin: Arrow skin
  13. * - bulletskin: Bullet skin.
  14. * - bulletnavigator: Enable or not the bullet navigator.
  15. * - arrownavigator: Enable or not the arrow navigator.
  16. *
  17. * @see template_preprocess_jssor()
  18. *
  19. * @ingroup themeable
  20. */
  21. #}
  22. {% if title %}
  23. <h3>{{ title }}</h3>
  24. {% endif %}
  25. <div id="{{ slider_id }}" style="position: relative; margin: 0 auto; top: 0; left: 0; width: 1300px; height: 600px; overflow: hidden;">
  26. <!-- Slides Container -->
  27. <div data-u="slides" style="cursor: move; position: absolute; left: 0; top: 0; width: 1300px; height: 600px; overflow: hidden;">
  28. {% for row in rows %}
  29. <div>
  30. {{ row.content }}
  31. </div>
  32. {% endfor %}
  33. </div>
  34. <!-- Bullet navigator -->
  35. {% if bulletnavigator %}
  36. <div u="navigator" class="jssorb{{ bulletskin }}" style="position: absolute; bottom: 16px; right: 6px;">
  37. <div u="prototype" style="position: absolute; width: 16px; height: 16px;"></div>
  38. </div>
  39. {% endif %}
  40. <!-- Arrows navigator -->
  41. {% if arrownavigator %}
  42. <span data-u="arrowleft" class="jssora{{ arrowskin }}l"></span>
  43. <span data-u="arrowright" class="jssora{{ arrowskin }}r"></span>
  44. {% endif %}
  45. </div>