Add gallery index

This commit is contained in:
Danny Berger
2014-12-18 09:57:56 -07:00
parent 00652967d8
commit d88bb5e0eb
6 changed files with 37 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ module Jekyll
end
item['name'] = File.basename(pathname, @attributes['match'].sub('*', ''))
item['fullname'] = path + '/' + item['name']
item['fullname'] = pathname.gsub(/\.[^\.]+$/, '')
item['path'] = pathname
items.push item

View File

@@ -1,6 +1,9 @@
---
layout: gallery-list
title: Albuquerque Balloon Fiesta
date: '2014-10-09'
date_end: '2014-10-13'
highlight_photo: 'f114579-img-1074'
---
{% include gallery_list.html gallery='2014-albuquerque-balloon-fiesta' %}

View File

@@ -1,6 +1,9 @@
---
layout: gallery-list
title : Barcelona Trip
date: '2014-11-16'
date_end: '2014-11-25'
highlight_photo: '106c907-museu-nacional-dart-de-catalunya'
---
<div itemprop="description">

View File

@@ -1,6 +1,8 @@
---
layout: gallery-list
title: Colorado Aspens
date: '2014-09-27'
highlight_photo: '2dbeedb-aspens-invading'
---
{% include gallery_list.html gallery='2014-colorado-aspens' %}

View File

@@ -1,6 +1,9 @@
---
layout: gallery-list
title : London &amp; Iceland Trip
title: London &amp; Iceland Trip
date: '2014-03-04'
date_end: '2014-03-15'
highlight_photo: 'df5150c-a-classic-view'
---
<div itemprop="description">

24
gallery/index.html Normal file
View File

@@ -0,0 +1,24 @@
---
title: 'Galleries'
layout: default
---
<section>
{% loopdir path:"gallery" match:"*/index.html" sort:"-date" %}
<div style="display:inline-block;height:274px;margin:8px 10px 0 0;text-align:center;width:200px;">
<a href="/{{ item.path|replace:'/index.html','/' }}" style="text-decoration:none;">
<img alt="{{ item.title }}" height="200" src="{{ site.asset_prefix }}/{{ item.path|replace:'/index.html','/' }}/{{ item.highlight_photo }}~200x200.jpg" title="{{ item.title }}" width="200" style="border-radius:4px;" />
<span style="text-decoration:underline;">{{ item.title }}</span>
{% if item.date %}<br />
<small>
{% if item.date_end %}
{{ item.date|date:"%B %-d" }} &ndash; {{ item.date_end|date:"%-d" }}, {{ item.date|date:"%Y" }}
{% else %}
{{ item.date|date:"%B %-d, %Y" }}
{% endif %}
</small>
{% endif %}
</a>
</div>
{% endloopdir %}
</section>