zeus.ugent.be/layouts/archive_page.erb
lorin c8797ec86a prepare events for new year, fixes #173 (#178)
* prepare events for new year, fixes #173

* remove unnused method

* remove dummy event
2017-06-07 10:23:02 +02:00

39 lines
1.1 KiB
Text

<div class="columns" >
<div class="column is-2 is-narrow">
<aside class="menu">
<p class="menu-label">
Academiejaar
</p>
<ul class="menu-list">
<% academic_years_blog_items.each do |year, item| %>
<% if @item_rep && @item_rep.path == item.path %>
<li>
<a href="#" class="is-active">
<%= pretty_year(year) %>
</a>
</li>
<% else %>
<li>
<%= link_to pretty_year(year), item %>
</li>
<% end %>
<% end %>
</ul>
</aside>
</div>
<div class="column">
<div class="columns is-multiline">
<div class="column">
<% posts_in_year(item[:academic_year]).each_with_index.select {|e, i| i.even?}.map(&:first).each do |post| %>
<%= render '/partials/_blog_preview.*', post: post %>
<% end %>
</div>
<div class="column">
<% posts_in_year(item[:academic_year]).each_with_index.reject {|e, i| i.even?}.map(&:first).each do |post| %>
<%= render '/partials/_blog_preview.*', post: post %>
<% end %>
</div>
</div>
</div>
</div>