-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (61 loc) · 2.28 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
layout: default
title: '#MyAAPIVote 2018'
menutitle: Home
weight: 1
---
<div class="featured-post">
{% for post in site.tags.featured limit:1 %}
<div id="featured-text">
<p class="blurb">
{{ post.content }}
</p>
</div>
{% endfor %}
</div>
<div class="home">
<h2>Why We Vote</h2>
<ul class="post-list">
{% for post in paginator.posts %}
{% if post.category == "ourstories" %}
<li class="post-preview">
{% if post.featured-image %}
<a href="{{ post.url | prepend: site.baseurl }}"><img src="{{ post.featured-image }}" class="featured" alt="{{ post.featured-alt-text }}"></a>
{% else %}
<img src="{{ site.baseurl }}/static/images/featured/default.png" class="featured" alt="18MR logo, default featured image">
{% endif %}
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
<p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}{% if post.author %} • By {{ post.author }}{% endif %}{% if post.meta %} • {{ post.meta }}{% endif %}</p>
<p class="blurb">
{{ post.blurb | truncatewords: 125, '...' }} <a href="{{ post.url | prepend: site.baseurl }}">Read More</a>
</p>
</li>
{% else %}
{% endif %}
{% endfor %}
</ul>
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page %}
<span class="page-link"><a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">« Prev</a></span>
{% else %}
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span id="the-page">{{ page }}</span>
{% elsif page == 1 %}
<span><a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a></span>
{% else %}
<span><a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a></span>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<span class="pag-link"><a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next »</a></span>
{% else %}
{% endif %}
</div>
{% endif %}
<p>If you want to share the story of why you vote, <a href="{{ site.baseurl }}/yourturn/">get in touch here</a>!</p>
</div>