X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fslick%2Ftemplates%2Fslick.html.twig;fp=web%2Fmodules%2Fcontrib%2Fslick%2Ftemplates%2Fslick.html.twig;h=107d2dca643b9e5a4601a405a42cfde219dbfe1a;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/modules/contrib/slick/templates/slick.html.twig b/web/modules/contrib/slick/templates/slick.html.twig new file mode 100644 index 000000000..107d2dca6 --- /dev/null +++ b/web/modules/contrib/slick/templates/slick.html.twig @@ -0,0 +1,83 @@ +{# +/** + * @file + * Default theme implementation for the Slick carousel template. + * + * This template holds 3 displays: main, thumbnail and overlay slicks in one. + * Arrows are enforced, but toggled by JS accordingly. This allows responsive + * object to enable and disable it as needed without losing context. + * + * Available variables: + * - items: The array of items containing main image/video/audio, optional + * image/video/audio overlay and captions, and optional thumbnail + * texts/images. + * - settings: A cherry-picked settings that mostly defines the slide HTML or + * layout, and none of JS settings/options which are defined at data-slick. + * - attributes: The array of attributes to hold the main container classes, id. + * - content_attributes: The array of attributes to hold optional RTL, id and + * data-slick containing JSON object aka JS settings the Slick expects to + * override default options. We don't store these JS settings in the normal + * , but inline within data-slick attribute instead. + * + * Debug: + * @see https://www.drupal.org/node/1906780 + * @see https://www.drupal.org/node/1903374 + * Use Kint: {{ kint(variable) }} + * Dump all available variables and their contents: {{ dump() }} + * Dump only the available variable keys: {{ dump(_context|keys) }} + */ +#} +{% + set classes = [ + 'slick', + settings.unslick ? 'unslick', + display == 'main' and settings.blazy ? 'blazy', + settings.vertical ? 'slick--vertical', + settings.attributes.class ? settings.attributes.class|join(' '), + settings.skin ? 'slick--skin--' ~ settings.skin|clean_class, + 'boxed' in settings.skin ? 'slick--skin--boxed', + 'split' in settings.skin ? 'slick--skin--split', + settings.optionset ? 'slick--optionset--' ~ settings.optionset|clean_class, + arrow_down_attributes is defined ? 'slick--has-arrow-down', + settings.asNavFor ? 'slick--' ~ display|clean_class, + settings.slidesToShow > 1 ? 'slick--multiple-view', + settings.count <= settings.slidesToShow ? 'slick--less', + display == 'main' and settings.media_switch ? 'slick--' ~ settings.media_switch|clean_class, + display == 'thumbnail' and settings.thumbnail_caption ? 'slick--has-caption' + ] +%} +{% + set arrow_classes = [ + 'slick__arrow', + settings.vertical ? 'slick__arrow--v', + settings.skin_arrows ? 'slick__arrow--' ~ settings.skin_arrows|clean_class + ] +%} + + + {% if not settings.unslick %} + + {% endif %} + + {% block slick_content %} + {% for item in items %} + {{ item }} + {% endfor %} + {% endblock %} + + {% if not settings.unslick %} + + {% block slick_arrow %} + + {{ settings.prevArrow|striptags(' + {% endif %} + {{ settings.nextArrow|striptags('