Permalink
Browse files

Reorder the months, show a month for every year, even if we won't lin…

…k to it (future months, missed one). Better link title for months.
  • Loading branch information...
1 parent 46c5ace commit aa9a257f6e16695d0b559cdd4543dbeb68a46469 @waferbaby committed Aug 22, 2013
Showing with 9 additions and 3 deletions.
  1. +9 −3 pages/interviews/index.erb
@@ -7,10 +7,16 @@ title: Interviews
<ul class="years">
<% @site.archives.each do |year, data| %>
<li>
- <a href="/interviews/<%= year %>/" title="View all interviews from <%= year %>."><strong><%= year %></strong></a>
+ <a href="/interviews/<%= year %>/" title="View all interviews in <%= year %>."><strong><%= year %></strong></a>
<ul class="months">
- <% data[:months].each_key do |month| %>
- <li><a href="/interviews/<%= year %>/<%= month %>/" title="View all interviews from <%= month %>, <%= year %>."><%= month %></a></li>
+ <% %w{01 02 03 04 05 06 07 08 09 10 11 12}.each do |month| %>
+ <li>
+ <% if data[:months].include?(month) %>
+ <a href="/interviews/<%= year %>/<%= month %>/" title="View all interviews from <%= Time.mktime(year, month).strftime('%B') %> <%= year %>."><%= month %></a>
+ <% else %>
+ <%= month %>
+ <% end %>
+ </li>
<% end %>
</ul>
</li>

0 comments on commit aa9a257

Please sign in to comment.