forked from hanami/hanami.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blog.html.erb
51 lines (47 loc) · 1.47 KB
/
blog.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
---
title: Blog
pageable: true
---
<div class="container container-blog">
<div class="block block-inverse text-center">
<div class="block-foreground">
<h1 class="block-title">Blog</h1>
</div>
<div class="block-background">
<img src="/images/blog-header.jpg">
</div>
</div>
<% page_articles.each do |article| %>
<div class="row">
<div class="col-xs-12 col-md-10 col-md-offset-1">
<h2><%= link_to article_title(article), article %></h2>
<h4>Posted by <strong class="author"><%= article_author(article) %></strong> on <em><%= article_date(article) %></em></h4>
<p class="summary"><%= article_summary(article) %></p>
<%= link_to 'Read more...', article %>
<hr>
</div>
</div>
<% end %>
<% if paginate %>
<div class="col-xs-12 col-md-10 col-md-offset-1">
<ul class="pager">
<% prev_title = "← Previous" %>
<% next_title = "Next →" %>
<li class="<%= prev_page.nil? && 'disabled' %>">
<% if prev_page %>
<a href="<%= prev_page.url %>"><%= prev_title %></a>
<% else %>
<span><%= prev_title %></span>
<% end %>
</li>
<li class="<%= next_page.nil? && 'disabled' %>">
<% if next_page %>
<a href="<%= next_page.url %>"><%= next_title %></a>
<% else %>
<span><%= next_title %></span>
<% end %>
</li>
</ul>
</div>
<% end%>
</div>