forked from barryclark/jekyll-now
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing
include gallery
feature from PR barryclark#88
- Loading branch information
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{% assign images = include.images | split:" " %} | ||
{% assign caption = include.caption %} | ||
{% assign cols = include.cols %} | ||
|
||
{% case cols %} | ||
{% when 1 %} | ||
{% assign class = "" %} | ||
{% when 2 %} | ||
{% assign class = "half" %} | ||
{% when 3 %} | ||
{% assign class = "third" %} | ||
{% else %} | ||
{% assign class = "" %} | ||
{% endcase %} | ||
|
||
<figure {% if class != "" %}class="{{ class }}"{% endif %}> | ||
{% for image in images %} | ||
<a href="{{ image }}"><img src="{{ image }}" alt=""></a> | ||
{% endfor %} | ||
<figcaption>{{ caption }}</figcaption> | ||
</figure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters