changed layout to tiles with banner background
This commit is contained in:
parent
0f0d0a8707
commit
0bd1c3537c
2 changed files with 42 additions and 17 deletions
|
@ -8,30 +8,55 @@ order: 20
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h1>Upcoming events</h1>
|
<h1>Upcoming events</h1>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
<% upcoming_events.each do |event| %>
|
<% upcoming_events.each_slice(2) do |slice| %>
|
||||||
<!-- <hr class="divider"> -->
|
<!-- <hr class="divider"> -->
|
||||||
|
<div class="columns">
|
||||||
|
<% slice.each do |event| %>
|
||||||
<% if (sub_events(event)).empty? %>
|
<% 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 %>
|
<% 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>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="content">
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="content ">
|
||||||
<h1>Past events</h1>
|
<h1>Past events</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% past_events.each do |event| %>
|
<% past_events.each_slice(2) do |slice| %>
|
||||||
<!-- <hr class="divider"> -->
|
<!-- <hr class="divider"> -->
|
||||||
|
<div class="columns">
|
||||||
|
<% slice.each do |event| %>
|
||||||
<% if (sub_events(event)).empty? %>
|
<% 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 %>
|
<% 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>
|
||||||
|
<%end%>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<a href="<%= @article.path %>" class="tile is-child box backgroundimg <%= @htmlclass %>"
|
<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="content" >
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
|
|
Loading…
Reference in a new issue