Alter photo gallery with direct linking to slideshow

This commit is contained in:
2017-01-17 15:37:00 +00:00
parent 531469c9fe
commit 0b2b339793
7 changed files with 41 additions and 16 deletions

View File

@@ -45,7 +45,12 @@ layout: default
<div class="list-gallery">
{% for photo in page.photos %}
<span itemprop="image" itemscope itemtype="http://schema.org/Photograph">
<a href="/{{ site.baseurl }}/{{ photo.url }}" itemprop="url">
{% if false != page.slideshow %}
{% capture url %}slideshow.html#{{ photo.name }}{% endcapture %}
{% else %}
{% capture url %}/{{ site.baseurl }}/{{ photo.url }}{% endcapture %}
{% endif %}
<a href="{{ url }}" itemprop="url">
<img alt="Photo: {{ photo.title }}" height="200" src="{{ site.asset_prefix }}/gallery/{{ page.gallery }}/{{ photo.name }}~200x200.jpg" title="{{ photo.title }}" width="200" />
</a>
</span>