changed layout to tiles with banner background

This commit is contained in:
Brecht Hendrickx 2017-02-09 15:04:12 +01:00 committed by Lorin Werthen
parent 0f0d0a8707
commit 0bd1c3537c
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
2 changed files with 42 additions and 17 deletions

View file

@ -8,30 +8,55 @@ order: 20
<div class="content">
<h1>Upcoming events</h1>
</div>
<div class="container">
<% upcoming_events.each do |event| %>
<% upcoming_events.each_slice(2) do |slice| %>
<!-- <hr class="divider"> -->
<div class="columns">
<% slice.each do |event| %>
<% if (sub_events(event)).empty? %>
<%= render '/partials/_event_preview.*', event: event %>
<!--<%= render '/partials/_event_preview.*', event: event %>-->
<div class="tile is-parent ">
<%= render '/partials/_tile.*',
article: event,
small_text: event[:time].strftime('%A %d %B %Y %H:%M'),
htmlclass:"highlighted" %>
</div>
<% else %>
<% sub_events(event).each do |sub_event| %>
<%= render '/partials/_event_preview.*', event: sub_event, main_event: event %>
<% end %>
<% end %>
<% end %>
</div>
<% end %>
<div class="content">
</div>
<div class="content ">
<h1>Past events</h1>
</div>
<% past_events.each do |event| %>
<% past_events.each_slice(2) do |slice| %>
<!-- <hr class="divider"> -->
<div class="columns">
<% slice.each do |event| %>
<% if (sub_events(event)).empty? %>
<%= render '/partials/_event_preview.*', event: event %>
<!--<%= render '/partials/_event_preview.*', event: event %>-->
<div class="tile is-parent ">
<%= render '/partials/_tile.*',
article: event,
small_text: event[:time].strftime('%A %d %B %Y %H:%M'),
htmlclass:"highlighted" %>
</div>
<% else %>
<% sub_events(event).each do |sub_event| %>
<%= render '/partials/_event_preview.*', event: sub_event, main_event: event %>
<% end %>
<% end %>
<% end %>
</div>
<%end%>
</div>

View file

@ -1,5 +1,5 @@
<a href="<%= @article.path %>" class="tile is-child box backgroundimg <%= @htmlclass %>"
style="background-image:url('<%= @article[:banner] %>');">
style="background-image:url('<%= @article[:banner] %>') ;">
<div class="content" >
<div class="columns">
<div class="column">