Files
pillar/src/templates/nodes/attachments/file_image.pug
Sybren A. Stüvel 3e7722a567 Expand image for {attachment slug link=self}
Clicking on the image will no longer open it directly, but expand it
instead.
2018-04-03 15:44:24 +02:00

12 lines
444 B
Plaintext

| {% if 'link' in tag_args and tag_args['link'] != 'none' %}
| {% if tag_args['link'] == 'self' %}
a.expand-image-links(href="{{ vars['l'].link }}")
img(src="{{ vars['l'].link }}", alt="{{ file.filename }}")
| {% else %}
a(href="{{ tag_args['link'] }}", target="_blank")
img(src="{{ vars['l'].link }}", alt="{{ file.filename }}")
| {% endif %}
| {% else %}
img(src="{{ vars['l'].link }}", alt="{{ file.filename }}")
| {% endif %}