This repository has been archived by the owner on Nov 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
52 lines (49 loc) · 1.89 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
layout: page-unwrapped
title: "An Untitled Photoblog"
masthead: /photo/original/2017-01-14-TBB/DSC_2125.jpg
nowrap: 1
---
<div class="index">
{% for post in paginator.posts %}
<article>
<a href="{{ post.url | prepend: site.baseurl }}">
<div class="meta">
<span class="date">{{ post.date | date: "%b %-d, %Y" }}</span>
{% if post.location %}<span class="location">{{ post.location }}</span>{% endif %}
<h2>{{ post.title }}</h2>
</div>
<section class="gallery">
{% assign gallery = post.path | split: '/' | last | split: '.' | first %}
{% comment %}
@TODO: So apparently the "where" filter doesn't work on custom data
arrays, though I could write a plugin to do it. Instead, we loop over
the whole post photo array and pull out the hero when we find it. Sadface.
{% endcomment %}
{% for photo in site.data.index[gallery].contents %}
{% if photo.hero %}
<img src="/photo/medium/{{ gallery }}/{{ photo.filename }}" alt="{{ post.title | xml_escape }}" />
<div class="shadow">
<div style='background-image: url("/photo/medium/{{ gallery }}/{{ photo.filename }}");' class="shadow-image"></div>
</div>
{% endif %}
{% endfor %}
</section>
</a>
</article>
{% endfor %}
<!-- Pagination links -->
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path }}" class="previous"><</a>
{% else %}
<span class="previous"><</span>
{% endif %}
<span class="page_number ">{{ paginator.page }} of {{ paginator.total_pages }}</span>
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}" class="next">></a>
{% else %}
<span class="next ">></span>
{% endif %}
</div>
</div>