added specific events tile and black-white

This commit is contained in:
Brecht Hendrickx 2017-02-09 16:55:30 +01:00 committed by Lorin Werthen
parent 4b2a60edbe
commit 01e61aa2b8
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
2 changed files with 39 additions and 6 deletions

View file

@ -15,18 +15,20 @@ order: 20
<div class="columns">
<% slice.each do |event| %>
<% if (sub_events(event)).empty? %>
<!--<%= render '/partials/_event_preview.*', event: event %>-->
<div class="tile is-parent ">
<%= render '/partials/_tile.*',
<%= render '/partials/_events_tile.*',
article: event,
small_text: event[:time].strftime('%A %d %B %Y %H:%M'),
htmlclass:"highlighted" %>
location: event[:location],
htmlclass: event[:banner].nil? ? "" : "highlighted" %>
</div>
<!-- Render old event_preview when using subevent, for now not used
<% else %>
<% sub_events(event).each do |sub_event| %>
<%= render '/partials/_event_preview.*', event: sub_event, main_event: event %>
<% end %>
<% end %>
-->
<% end %>
</div>
<% end %>
@ -43,18 +45,20 @@ order: 20
<div class="columns">
<% slice.each do |event| %>
<% if (sub_events(event)).empty? %>
<!--<%= render '/partials/_event_preview.*', event: event %>-->
<div class="tile is-parent ">
<%= render '/partials/_tile.*',
<%= render '/partials/_events_tile.*',
article: event,
small_text: event[:time].strftime('%A %d %B %Y %H:%M'),
htmlclass:"highlighted" %>
location: event[:location],
htmlclass: event[:banner].nil? ? "" : "highlighted" %>
</div>
<!-- Render old event_preview when using subevent, for now not used
<% else %>
<% sub_events(event).each do |sub_event| %>
<%= render '/partials/_event_preview.*', event: sub_event, main_event: event %>
<% end %>
<% end %>
-->
<% end %>
</div>
<%end%>

View file

@ -0,0 +1,29 @@
<a href="<%= @article.path %>" class="tile is-child box backgroundimg <%= @htmlclass %>"
style="background-image:url('<%= @article[:banner] %>');">
<div class="content" >
<div class="columns">
<div class="column">
<h2>
<%= @article[:title] %>
</h2>
</div>
<div class="column is-narrow">
<small>
<%= @small_text %>
<br>
<%= @location %>
</small>
</div>
<div class="column is-narrow">
</div>
</div>
<div class="description">
<%= @article[:description] %>
</div>
<div class="teaser">
<%= get_teaser(@article) %>
</div>
</div>
</a>