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"> -->
|
||||||
<% if (sub_events(event)).empty? %>
|
<div class="columns">
|
||||||
<%= render '/partials/_event_preview.*', event: event %>
|
<% slice.each do |event| %>
|
||||||
<% else %>
|
<% if (sub_events(event)).empty? %>
|
||||||
<% sub_events(event).each do |sub_event| %>
|
<!--<%= render '/partials/_event_preview.*', event: event %>-->
|
||||||
<%= render '/partials/_event_preview.*', event: sub_event, main_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 %>
|
<% end %>
|
||||||
<% end %>
|
</div>
|
||||||
<% end %>
|
<% 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"> -->
|
||||||
<% if (sub_events(event)).empty? %>
|
<div class="columns">
|
||||||
<%= render '/partials/_event_preview.*', event: event %>
|
<% slice.each do |event| %>
|
||||||
<% else %>
|
<% if (sub_events(event)).empty? %>
|
||||||
<% sub_events(event).each do |sub_event| %>
|
<!--<%= render '/partials/_event_preview.*', event: event %>-->
|
||||||
<%= render '/partials/_event_preview.*', event: sub_event, main_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 %>
|
<% end %>
|
||||||
<% end %>
|
</div>
|
||||||
<% end %>
|
<%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