-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html.erb
54 lines (52 loc) · 2.39 KB
/
index.html.erb
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
---
pageable: true
per_page: 5
---
<% page_articles.each_with_index do |article, i| %>
<!-- Post -->
<article class="box post post-excerpt">
<header>
<!--
Note: Titles and subtitles will wrap automatically when necessary, so don't worry
if they get too long. You can also remove the <p> entirely if you don't
need a subtitle.
-->
<h2><a href="<%= article.url %>"><%= article.title %></a></h2>
<p><% if article.data.summary %><%=article.data.summary %><% end %></p>
</header>
<div class="info">
<!--
Note: The date should be formatted exactly as it's shown below. In particular, the
"least significant" characters of the month should be encapsulated in a <span>
element to denote what gets dropped in 1200px mode (eg. the "uary" in "January").
Oh, and if you don't need a date for a particular page or post you can simply delete
the entire "date" element.
-->
<span class="date"><span class="month"><%= article.date.strftime("%b") %></span> <span class="day"><%= article.date.day.ordinalize %></span><span class="year"><%= article.date.strftime("%Y") %></span></span>
<!--
Note: You can change the number of list items in "stats" to whatever you want.
-->
<!--
<ul class="stats">
<li><p>Read time: <%= reading_time article.body %></p></li>
<li><p> </p></li>
</ul>
-->
</div>
<% if article.data.feature_image %><img class="image featured" src="/images/<%= article.data.feature_image %>" alt="" /><% end %>
<p><% unless article.data.summary %><%= article.summary %><% end %><a href="<%= article.url %>">Continue Reading</a></p>
</article>
<% end %>
<div class="pagination">
<% if paginate && num_pages > 1 %>
<p>Page <%= page_number %> of <%= num_pages %></p>
<% if prev_page %>
<p><%= link_to( '<span class="button previous">Previous page</span>', prev_page) %>
<% end %>
<% end %>
<% if paginate %>
<% if next_page %>
<%= link_to( '<span class="button next">Next page</span>', next_page) %></p>
<% end %>
<% end %>
</div>