This repository has been archived on 2026-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
HELYX-OS-Personal/_includes/gallery
2016-01-20 14:39:48 -06:00

36 lines
No EOL
1.2 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% comment %}
*
* This include lets you easily embed a gallery into your post.
* To use the gallery include you...
*
* 1. ...need two images: a thumbnail and a big image.
* 2. Name the thumbnail gallery-image-thumb.jpg and...
* 3. ...name the big gallery-image.jpg
* 4. Define the big version in frontmatter,
*
* gallery:
* - image_url: gallery-image.jpg
*
* 5. Give your image a caption works without captions, too.
*
* gallery:
* - image_url: gallery-image.jpg
* caption: Starting Page with huge One Logo
*
* 6. Add the include whereever you want in your content like this:
*
* {% include gallery %}
*
* Check out the example page http://phlow.github.io/feeling-responsive/design/gallery/
*
{% endcomment %}
<div>
<ul class="clearing-thumbs small-block-grid-4" data-clearing>
{% for item in page.gallery %}
{% capture url %}{{ item.image_url }}{% endcapture %}
{% assign split_url = url | split: '.' %}
{% capture thumb_url %}{{split_url[0]}}-thumb.{{split_url[1]}}{% endcapture %}
<li><a href="{{ site.urlimg }}/{{ item.image_url }}"><img {% if item.caption %}data-caption="{{ item.caption }}"{% endif %} src="{{ site.urlimg }}/{{ thumb_url }}"></a></li>
{% endfor %}
</ul>
</div>