Improve generation of gallery lists with listing of mentioning posts, start to apply

This commit is contained in:
2016-01-19 22:45:02 +00:00
parent a7f1170458
commit 0d0edee3a7
25 changed files with 94 additions and 162 deletions

View File

@@ -17,10 +17,13 @@ headers: [187b6ae, 54773b7, eae28bd]
# pagination
paginate: 15
# translations
all_posts: 'Alle # posts →'
read_more: '» Verder lezen...'
previous_page: '← Vorige pagina'
next_page: 'Volgende pagina →'
mentioned_in: 'Komt voor in:'
# other
gems: [jekyll-paginate]

View File

@@ -1,6 +1,8 @@
---
layout: default
---
{% assign url = page.url | split:'/' %}
{% assign gallery = url[2] %}
<section itemscope itemtype="http://schema.org/ImageGallery">
<header>
<div class="timeline"></div>
@@ -9,7 +11,32 @@ layout: default
</h1>
</header>
<section class="post-content">
{{ content }}
<p>{{ content }}</p>
{% if false != page.slideshow %}
<a href="slideshow.html">[ slideshow ]</a>
{% endif %}
{% if false != page.slideshow and false != page.map %}
&nbsp;|&nbsp;
{% endif %}
{% if false != page.map %}
<a href="map.html">[ map ]</a>
{% endif %}
{% include gallery_list.html gallery=gallery %}
{% capture list %}
{% for post in site.posts %}
{% if post.content contains gallery %}
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endif %}
{% endfor %}
{% endcapture %}
{% if list %}
<p>{{ site.mentioned_in }}</p>
<ul>
{{ list }}
</ul>
{% endif %}
</section>
{% if false != page.comments %}
{% include disqus.html %}

View File

@@ -332,12 +332,17 @@ $oConsole
// Write gallery index
$oOutput->write('<comment>index</comment>');
$aLinks = [];
if ($bSlideshow) {
$aLinks[] = '<a href="slideshow.html">[ slideshow ]</a>';
$aMatter = [
'layout' => 'gallery-list',
'title' => empty($aGallery['title']) ? '' : $aGallery['title'],
'highlight_photo' => empty($sHighlight) ? $aPhotos[0]['id'] : $sHighlight,
'date' => $oDate->format('Y-m-d')
];
if (!$bSlideshow) {
$aMatter['slideshow'] = false;
}
if ($bMap) {
$aLinks[] = '<a href="map.html">[ map ]</a>';
if (!$bMap) {
$aMatter['map'] = false;
}
$aMatter = [
'layout' => 'gallery-list',
@@ -349,15 +354,7 @@ $oConsole
$aMatter['end_date'] = $oEndDate->format('Y-m-d');
}
$sContents = sprintf(
<<<EOF
<div itemprop="description">
<p>%s</p>
%s
</div>
{%% include gallery_list.html gallery='%s' %%}
EOF
, (empty($aGallery['description']) ? '' : $aGallery['description']), implode('&nbsp;|&nbsp;', $aLinks), $sGallery);
$sContents = empty($aGallery['description']) ? '' : $aGallery['description'];
file_put_contents(
$sRenderPath . '/index.html',
'---' . "\n" . yamlDump($aMatter) . '---' . "\n" . $sContents

View File

@@ -3,9 +3,4 @@ layout: gallery-list
title: Dundee
highlight_photo: 236a633
date: 2013-11-24
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>&nbsp;|&nbsp;<a href="map.html">[ map ]</a>
</div>
{% include gallery_list.html gallery='2013-dundee' %}
---

View File

@@ -4,9 +4,4 @@ title: Edinburgh
highlight_photo: 8018b99
date: 2013-09-17
end_date: 2013-12-07
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>&nbsp;|&nbsp;<a href="map.html">[ map ]</a>
</div>
{% include gallery_list.html gallery='2013-edinburgh' %}
---

View File

@@ -1,11 +1,7 @@
---
layout: gallery-list
title: christmas-holidays-2014-beach
title: 'Christmas Holidays: beach'
highlight_photo: 1c46802
date: 2015-01-02
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-christmas-holidays-beach' %}
map: false
---

View File

@@ -1,11 +1,6 @@
---
layout: gallery-list
title: christmas-holidays-2014-dwingelderveld
title: 'Christmas Holidays: Dwingelderveld'
highlight_photo: cedffdd
date: 2014-12-31
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>&nbsp;|&nbsp;<a href="map.html">[ map ]</a>
</div>
{% include gallery_list.html gallery='2015-christmas-holidays-dwingelderveld' %}
---

View File

@@ -1,12 +1,8 @@
---
layout: gallery-list
title:
title: Christmas Holidays
highlight_photo: 0093145
date: 2015-12-25
end_date: 2016-01-01
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-christmas-holidays' %}
map: false
---

View File

@@ -1,12 +1,7 @@
---
layout: gallery-list
title: spain-2015-barcelona-stores
title: 'Spain: Barcelona stores'
highlight_photo: 3b2ca50
date: 2015-07-03
end_date: 2015-07-04
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>&nbsp;|&nbsp;<a href="map.html">[ map ]</a>
</div>
{% include gallery_list.html gallery='2015-spain-barcelona-stores' %}
---

View File

@@ -1,12 +1,7 @@
---
layout: gallery-list
title: spain-2015-portrait
title: 'Spain: portret'
highlight_photo: 4a34012
date: 2015-06-27
end_date: 2015-07-02
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>&nbsp;|&nbsp;<a href="map.html">[ map ]</a>
</div>
{% include gallery_list.html gallery='2015-spain-portrait' %}
---

View File

@@ -1,12 +1,7 @@
---
layout: gallery-list
title: spain-2015-sitges
title: 'Spain: Sitges'
highlight_photo: 263f3b7
date: 2015-06-28
end_date: 2015-07-02
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>&nbsp;|&nbsp;<a href="map.html">[ map ]</a>
</div>
{% include gallery_list.html gallery='2015-spain-sitges' %}
---

View File

@@ -1,11 +1,6 @@
---
layout: gallery-list
title: spain-2015-tarragona
title: 'Spain: Tarragona'
highlight_photo: c2c8f99
date: 2015-06-27
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>&nbsp;|&nbsp;<a href="map.html">[ map ]</a>
</div>
{% include gallery_list.html gallery='2015-spain-tarragona' %}
---

View File

@@ -1,11 +1,7 @@
---
layout: gallery-list
title: summer-2015-aberdeen-tolbooth
title: 'Summer: Aberdeen tolbooth'
highlight_photo: a581ec2
date: 2015-07-18
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-summer-aberdeen-tolbooth' %}
map: false
---

View File

@@ -1,11 +1,7 @@
---
layout: gallery-list
title: summer-2015-aberdeen
title: 'Summer: Aberdeen'
highlight_photo: fa4baea
date: 2015-07-18
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-summer-aberdeen' %}
map: false
---

View File

@@ -1,11 +1,7 @@
---
layout: gallery-list
title: summer-2015-dunnottar-castle
title: 'Summer: Dunnottar castle'
highlight_photo: 368a126
date: 2015-07-18
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-summer-dunnottar-castle' %}
map: false
---

View File

@@ -1,12 +1,8 @@
---
layout: gallery-list
title: summer-holidays-2015
title: Summer Holidays
highlight_photo: ce3abd3
date: 2015-08-01
end_date: 2015-08-08
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-summer-holidays' %}
map: false
---

View File

@@ -1,11 +1,7 @@
---
layout: gallery-list
title: visit-sanne-2015-fife-anstruther
title: 'Visit Sanne: Anstruther'
highlight_photo: 933253f
date: 2015-08-23
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-visit-sanne-fife-anstruther' %}
map: false
---

View File

@@ -1,11 +1,7 @@
---
layout: gallery-list
title: visit-sanne-2015-fife-pittenweem
title: 'Visit Sanne: Pittenweem'
highlight_photo: 97b3176
date: 2015-08-23
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-visit-sanne-fife-pittenweem' %}
map: false
---

View File

@@ -1,11 +1,7 @@
---
layout: gallery-list
title: visit-sanne-2015-highlands-distillery
title: 'Visit Sanne: Dalwhinnie'
highlight_photo: 1702ed6
date: 2015-08-22
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-visit-sanne-highlands-distillery' %}
map: false
---

View File

@@ -1,11 +1,7 @@
---
layout: gallery-list
title: visit-sanne-2015-highlands-hike
title: 'Visit Sanne: highland hike'
highlight_photo: 7b382b1
date: 2015-08-22
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-visit-sanne-highlands-hike' %}
map: false
---

View File

@@ -3,9 +3,5 @@ layout: gallery-list
title: visit-sanne-2015-highlands-perth
highlight_photo: b4aeee4
date: 2015-08-22
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-visit-sanne-highlands-perth' %}
map: false
---

View File

@@ -1,12 +1,8 @@
---
layout: gallery-list
title: visit-sanne-2015
title: Visit Sanne
highlight_photo: 1016c64
date: 2015-08-21
end_date: 2015-08-23
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-visit-sanne' %}
map: false
---

View File

@@ -1,11 +1,7 @@
---
layout: gallery-list
title: whisky-poker
title: Whisky & Poker
highlight_photo: ca11f73
date: 2015-06-20
---
<div itemprop="description">
<p></p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2015-whisky-poker' %}
map: false
---

View File

@@ -5,8 +5,4 @@ highlight_photo: 3c7d11d
date: 2016-01-09
ignore: true
---
<div itemprop="description">
<p>Best even schrikken als de regen een indrukwekkende kring olie om je auto heen spoelt.</p>
<a href="slideshow.html">[ slideshow ]</a>
</div>
{% include gallery_list.html gallery='2016-peugeot-206-leak' %}
Best even schrikken als de regen een indrukwekkende kring olie om je auto heen spoelt.

View File

@@ -4,8 +4,4 @@ title: Seat Ibiza to Scrap
highlight_photo: 4fda888
date: 2016-01-19
---
<div itemprop="description">
<p>Mijn Seat zwaait mij (letterlijk) uit als deze achterop de dieplader richting de schroter wordt getild.</p>
<a href="slideshow.html">[ slideshow ]</a>&nbsp;|&nbsp;<a href="map.html">[ map ]</a>
</div>
{% include gallery_list.html gallery='2016-seat-ibiza-scrap' %}
Mijn Seat zwaait mij (letterlijk) uit als deze achterop de dieplader richting de schroter wordt getild.