add lightbox

This commit is contained in:
kevin
2021-02-18 21:45:17 +01:00
parent 36898dadc9
commit ad2e87902f
22 changed files with 1350 additions and 20 deletions
@@ -0,0 +1,31 @@
{#
/**
* @file
* Default theme implementation of an image.
*
* Available variables:
* - attributes: HTML attributes for the img tag.
* - style_name: (optional) The name of the image style applied.
*
* @see template_preprocess_image()
*
* @ingroup themeable
*/
#}
{% if style_name == "lightbox" %}
{#
<img{{ attributes }} />
#}
{# <pre>
{{ dump(attributes) }}
</pre> #}
<a href="{{attributes.src}}" data-lightbox="lightbox" data-title="{{attributes.title}}">
<img src="{{attributes.src}}" alt="">
</a>
{# <a href="{{attributes.src}}" data-lightbox="lightbox">image</a> #}
{% else %}
<img{{ attributes }} />
{% endif %}