Move galleries to collection, generate map and slideshow on build, stop using loopdir plugin, update templates accordingly

This commit is contained in:
2016-01-22 19:27:34 +00:00
parent 0d0edee3a7
commit ad219ff8cc
18 changed files with 236 additions and 213 deletions

View File

@@ -1,5 +1,9 @@
<div style="width: {{ include.width }}px;" class="caption">
{% if include.link %}
<a href="{{ include.link }}"><img src="{{ include.image }}" /></a>
{% else %}
<img src="{{ include.image }}" />
{% endif %}
{% if include.text %}
{{ include.text | markdownify | hyphenate }}
{% endif %}

View File

@@ -0,0 +1,11 @@
<div class="list-gallery">
{% for p in site.pages %}
{% if p.layout == 'gallery-photo' and p.gallery == gallery %}
<span itemprop="image" itemscope itemtype="http://schema.org/Photograph">
<a href="/{{ site.baseurl }}/{{ p.url }}" itemprop="url">
<img alt="Photo: {{ p.title }}" height="200" src="{{ site.asset_prefix }}/gallery/{{ gallery }}/{{ p.name | remove:'.md' }}~200x200.jpg" title="{{ p.title }}" width="200" />
</a>
</span>
{% endif %}
{% endfor %}
</div>

View File

@@ -1,4 +1,7 @@
{% capture path %}gallery/{{ include.gallery }}{% endcapture %}
<div style="line-height:0; padding:4px 0 0 1px;">
{% loopdir path:path match:"*.md" sort:"ordering" %}<a href="/{{ site.baseurl }}/{{ item.fullname }}.html" style="display: inline-block; margin: 3px; text-decoration: none;"><img alt="Photo: {{ item.title }}" height="48" src="{{ site.asset_prefix }}/{{ item.fullname }}~96x96.jpg" title="{{ item.title }}" width="48" style="padding: 1px;" /></a>{% endloopdir %}
{% for p in site.pages %}
{% if p.layout == 'gallery-photo' and p.gallery == include.gallery %}
<a href="/{{ site.baseurl }}/{{ p.url }}" style="display: inline-block; margin: 3px; text-decoration: none;"><img alt="Photo: {{ p.title }}" height="48" src="{{ site.asset_prefix }}/gallery/{{ include.gallery }}/{{ p.name | remove:'.md' }}~96x96.jpg" title="{{ p.title }}" width="48" style="padding: 1px;" /></a>
{% endif %}
{% endfor %}
</div>

View File

@@ -1,4 +0,0 @@
<div class="list-gallery">
{% capture path %}gallery/{{ include.gallery }}{% endcapture %}
{% loopdir path:path match:"*.md" sort:"ordering" %}<span itemprop="image" itemscope itemtype="http://schema.org/Photograph"><a href="/{{ site.baseurl }}/{{ item.fullname }}.html" itemprop="url"><img alt="Photo: {{ item.title }}" height="200" src="{{ site.asset_prefix }}/{{ item.fullname }}~200x200.jpg" title="{{ item.title }}" width="200" /></a></span>{% endloopdir %}
</div>

View File

@@ -1,2 +0,0 @@
{% capture path %}gallery/{{ include.gallery }}{% endcapture %}
{% loopdir path:path match:"*.md" sort:"ordering" %}<span itemprop="image" itemscope itemtype="http://schema.org/Photograph"><a href="/{{ item.fullname }}.html" itemprop="url"><img alt="Photo: {{ item.title }}" src="{{ site.asset_prefix }}/{{ item.fullname }}~640w.jpg" title="{{ item.title }}" width="640" /></a></span>{% endloopdir %}

View File

@@ -1,6 +1,8 @@
{% capture image %}/asset/gallery/{{ include.album }}/{{ include.photo }}~640w.jpg{% endcapture %}
{% capture image %}/asset/gallery/{{ include.gallery }}/{{ include.photo }}~640w.jpg{% endcapture %}
{% capture link %}/{{ site.baseurl }}/gallery/{{ include.gallery }}/{{ include.photo }}.html{% endcapture %}
{% include caption.html
width='600'
image=image
text=include.text
link=link
%}