init
This commit is contained in:
commit
d013ece0f3
363 changed files with 20823 additions and 0 deletions
19
templates/shortcodes/gallery.html
Normal file
19
templates/shortcodes/gallery.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{% set gallery_data = load_data(literal = body, format="json") %}
|
||||
|
||||
<div id="image-gallery">
|
||||
<ul class="gallery">
|
||||
{% for item in gallery_data %}
|
||||
{% set base_path = page.path | split(pat="/") | slice(end=-1) | join(sep="/") %}
|
||||
{% set image_path = base_path ~ "/" ~ item.file %}
|
||||
{% set image_url = get_url(path=image_path) %}
|
||||
<li class="gallery-item">
|
||||
<a href="{{ image_url }}" class="lightbox" target="_blank">
|
||||
<img src="{{ image_url }}" {% if item.alt %}alt="{{ item.alt }}"{% endif %}>
|
||||
</a>
|
||||
{% if item.title %}
|
||||
<p class="caption">{{ item.title }}</p>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue