You are here

jssor.html.twig in Jssor Slider 7

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.

File

templates/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 }}" class="slider_container" style="position: relative; margin: 0 auto;top: 0px; left: 0px; width: 1300px; height: 800px; overflow: hidden;">
  26. <!-- Slides Container -->
  27. <div u="slides" style="cursor: move; position: absolute; overflow: hidden; left: 0px; top: 0px; width: 1300px; height: 800px;">
  28. {% for row in rows %}
  29. <div{{ row.attributes }}>
  30. {{ row.content }}
  31. </div>
  32. {% endfor %}
  33. </div>
  34. {% if bulletnavigator %}
  35. <!-- bullet navigator container -->
  36. <div u="navigator" class="jssorb{{ bulletskin }}" style="position: absolute; bottom: 16px; right: 6px;">
  37. <!-- bullet navigator item prototype -->
  38. <div u="prototype" style="position: absolute; width: 16px; height: 16px;"></div>
  39. </div>
  40. {% endif %}
  41. {% if arrownavigator %}
  42. <!-- Arrow Left -->
  43. <span u="arrowleft" class="jssora{{ arrowskin }}l" style="top: 100px; left: 8px;"></span>
  44. <!-- Arrow Right -->
  45. <span u="arrowright" class="jssora{{ arrowskin }}r" style="top: 100px; right: 8px"></span>
  46. {% endif %}
  47. </div>