diff options
author | Lars Henrik Mai <lars.mai@kontinui.de> | 2014-04-08 13:58:00 +0200 |
---|---|---|
committer | Lars Henrik Mai <lars.mai@kontinui.de> | 2014-04-08 13:58:00 +0200 |
commit | b0da6603c012280a33202836bb1e9a2456fbd054 (patch) | |
tree | 960d807a49c79f210b7307e87ce43ddf8524038d /source/calendar.html.erb | |
parent | 3b2ecefb6b3f763762f191452e40c59fb7f58ec5 (diff) |
initialized blog extensions
Diffstat (limited to 'source/calendar.html.erb')
-rw-r--r-- | source/calendar.html.erb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/source/calendar.html.erb b/source/calendar.html.erb new file mode 100644 index 0000000..4cdfdf9 --- /dev/null +++ b/source/calendar.html.erb @@ -0,0 +1,33 @@ +--- +pageable: true +--- +<h1>Archive for + <% case page_type + when 'day' %> + <%= Date.new(year, month, day).strftime('%b %e %Y') %> + <% when 'month' %> + <%= Date.new(year, month, 1).strftime('%b %Y') %> + <% when 'year' %> + <%= year %> + <% end %> +</h1> + +<% if paginate && num_pages > 1 %> + <p>Page <%= page_number %> of <%= num_pages %></p> + + <% if prev_page %> + <p><%= link_to 'Previous page', prev_page %></p> + <% end %> +<% end %> + +<ul> + <% page_articles.each_with_index do |article, i| %> + <li><%= link_to article.title, article %> <span><%= article.date.strftime('%b %e') %></span></li> + <% end %> +</ul> + +<% if paginate %> + <% if next_page %> + <p><%= link_to 'Next page', next_page %></p> + <% end %> +<% end %> |