partial event preview

This commit is contained in:
myncke 2016-08-27 03:50:40 +02:00
parent cdb214cc23
commit 7d74313176
3 changed files with 42 additions and 34 deletions

View file

@ -10,39 +10,12 @@ title: Events
<% all_events.each do |event| %> <% all_events.each do |event| %>
<!-- <hr class="divider"> --> <!-- <hr class="divider"> -->
<div class="box event-preview"> <% if (sub_events(event)).empty? %>
<div class="image-holder"> <%= render '/partials/_event_preview.*', event: event %>
<img src="https://placehold.it/150x150" alt="" class="image" /> <% else %>
</div> <% sub_events(event).each do |sub_event| %>
<%= render '/partials/_event_preview.*', event: sub_event %>
<div class="box info"> <% end %>
<div class="title"> <% end %>
<a href="<%= relative_path_to(event) %>">
<%= event[:title] %>
</a>
</div>
<div class="location">
<a href="#">
<%= event[:location] %>
</a>
</div>
<div class="description">
<%= event[:description] %>
</div>
<div class="time">
<%= event[:time] %>
</div>
<% sub_events(event).each do |sub_event| %>
<div class="subevent">
<a href="<%= relative_path_to(sub_event) %>">
<%= sub_event[:title] %>
</a>
</div>
<% end %>
</div>
</div>
<% end %> <% end %>
</div> </div>

View file

@ -2,4 +2,5 @@
title: Bottle Bats Introductie title: Bottle Bats Introductie
time: 12-3-16 time: 12-3-16
location: Grace Hopper location: Grace Hopper
description: Dit is een description!
--- ---

View file

@ -0,0 +1,34 @@
<div class="box event-preview">
<div class="image-holder">
<img src="https://placehold.it/150x150" alt="" class="image" />
</div>
<div class="box info">
<div class="title">
<a href="<%= relative_path_to(@event) %>">
<%= @event[:title] %>
</a>
</div>
<div class="location">
<a href="#">
<%= event[:location] %>
</a>
</div>
<div class="description">
<%= event[:description] %>
</div>
<div class="time">
<%= event[:time] %>
</div>
<% sub_events(event).each do |sub_event| %>
<div class="subevent">
<a href="<%= relative_path_to(sub_event) %>">
<%= sub_event[:title] %>
</a>
</div>
<% end %>
</div>
</div>