add gallery feature (wip)
This commit is contained in:
8
_includes/gallery.html
Normal file
8
_includes/gallery.html
Normal file
@ -0,0 +1,8 @@
|
||||
{% assign images = (include.images | split: "|") %}
|
||||
{% assign thumbnails = (include.thumbnails | split: "|") %}
|
||||
|
||||
<div class="gallery">
|
||||
{% for image in images %}
|
||||
<a href="{{ include.dir }}/{{ image }}"><img src="{{ include.dir }}/{{ image }}" /></a>
|
||||
{% endfor %}
|
||||
</div>
|
@ -11,9 +11,16 @@
|
||||
{% capture alt %}alt="{{ alt }}" title="{{ alt }}"{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% assign frame=include.frame | default: true %}
|
||||
{% assign frame=include.frame %}
|
||||
{% if frame == blank %}
|
||||
{% assign frame=true %}
|
||||
{% endif %}
|
||||
|
||||
<figure class="figure {% if include.caption %}caption{% endif %} {% if frame %}frame{% endif %}">
|
||||
<a target="_blank" href="{{ imagePath }}"><img {{ src }} {{ alt }} width="100%" /></a>
|
||||
{% if include.width != blank %}
|
||||
{% capture width %}style="width:{{ include.width }}"{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
<figure {{width}} class="figure {% if include.caption %}caption{% endif %} {% if frame %}frame{% endif %}">
|
||||
<a target="_blank" href="{{ imagePath }}"><img {{ src }} {{ alt }} /></a>
|
||||
{% if caption != blank %}<figcaption>{{ caption }}</figcaption>{% endif %}
|
||||
</figure>
|
Reference in New Issue
Block a user