added specific events tile and black-white
This commit is contained in:
parent
4b2a60edbe
commit
01e61aa2b8
2 changed files with 39 additions and 6 deletions
|
@ -15,18 +15,20 @@ order: 20
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<% slice.each do |event| %>
|
<% slice.each do |event| %>
|
||||||
<% if (sub_events(event)).empty? %>
|
<% if (sub_events(event)).empty? %>
|
||||||
<!--<%= render '/partials/_event_preview.*', event: event %>-->
|
|
||||||
<div class="tile is-parent ">
|
<div class="tile is-parent ">
|
||||||
<%= render '/partials/_tile.*',
|
<%= render '/partials/_events_tile.*',
|
||||||
article: event,
|
article: event,
|
||||||
small_text: event[:time].strftime('%A %d %B %Y %H:%M'),
|
small_text: event[:time].strftime('%A %d %B %Y %H:%M'),
|
||||||
htmlclass:"highlighted" %>
|
location: event[:location],
|
||||||
|
htmlclass: event[:banner].nil? ? "" : "highlighted" %>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Render old event_preview when using subevent, for now not used
|
||||||
<% else %>
|
<% else %>
|
||||||
<% sub_events(event).each do |sub_event| %>
|
<% sub_events(event).each do |sub_event| %>
|
||||||
<%= render '/partials/_event_preview.*', event: sub_event, main_event: event %>
|
<%= render '/partials/_event_preview.*', event: sub_event, main_event: event %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
-->
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -43,18 +45,20 @@ order: 20
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<% slice.each do |event| %>
|
<% slice.each do |event| %>
|
||||||
<% if (sub_events(event)).empty? %>
|
<% if (sub_events(event)).empty? %>
|
||||||
<!--<%= render '/partials/_event_preview.*', event: event %>-->
|
|
||||||
<div class="tile is-parent ">
|
<div class="tile is-parent ">
|
||||||
<%= render '/partials/_tile.*',
|
<%= render '/partials/_events_tile.*',
|
||||||
article: event,
|
article: event,
|
||||||
small_text: event[:time].strftime('%A %d %B %Y %H:%M'),
|
small_text: event[:time].strftime('%A %d %B %Y %H:%M'),
|
||||||
htmlclass:"highlighted" %>
|
location: event[:location],
|
||||||
|
htmlclass: event[:banner].nil? ? "" : "highlighted" %>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Render old event_preview when using subevent, for now not used
|
||||||
<% else %>
|
<% else %>
|
||||||
<% sub_events(event).each do |sub_event| %>
|
<% sub_events(event).each do |sub_event| %>
|
||||||
<%= render '/partials/_event_preview.*', event: sub_event, main_event: event %>
|
<%= render '/partials/_event_preview.*', event: sub_event, main_event: event %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
-->
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
29
layouts/partials/_events_tile.erb
Normal file
29
layouts/partials/_events_tile.erb
Normal 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>
|
Loading…
Reference in a new issue