Merge pull request #44 from ZeusWPI/events

first iteration event preview
This commit is contained in:
lorin 2016-08-30 22:26:44 +02:00 committed by GitHub
commit 5f65118621
6 changed files with 137 additions and 13 deletions

View file

@ -1,3 +1,84 @@
.subevent {
margin-left: 20px;
.divider {
align-items:flex-start;
border: 1px solid lighten(gray, 45%);
width: 67%;
margin: 0 30% 0 3%;
}
.box.event-preview {
border-radius: 0px;
display: flex;
align-items: center;
box-shadow : none;
margin-bottom: 0px;
// border-top: 1px solid lighten(gray, 40%);
.image-holder {
border-radius: 50%;
padding: 10px;
border: 1px solid lighten(gray, 30%);
width: 15%;
height: 15%;
}
.image {
border-radius: 50%;
vertical-align: middle;
border: 1px solid gray;
}
.info {
margin: 1.5em;
box-shadow : none;
width: 60%;
.title {
font-size: 1.7em;
font-weight: 500;
margin-bottom: 0;
a {
color: darken(gray, 20%);
}
a:hover {
border-bottom: none;
color: #FF7F00;
}
}
.location {
font-size: .9em;
a {
color: lighten(gray, 10%);
}
}
.description {
font-size: 1.7em;
font-weight: 200;
color: #FF7F00;
}
.time {
font-size: 1.6em;
font-weight: 400;
}
}
.main-event {
border-left: 1px solid gray;
border-radius: 0px;
box-shadow: none;
height: 8em;
// display: flex;
// align-items: center;
ul {
padding-left: .7em;
}
.active {
color: #FF7F00;
}
}
}

View file

@ -9,17 +9,13 @@ title: Events
</div>
<% all_events.each do |event| %>
<div class="box">
<a href="<%= relative_path_to(event) %>">
<%= event[:title] %>
</a>
<!-- <hr class="divider"> -->
<% if (sub_events(event)).empty? %>
<%= render '/partials/_event_preview.*', event: event %>
<% else %>
<% sub_events(event).each do |sub_event| %>
<div class="subevent">
<a href="<%= relative_path_to(sub_event) %>">
<%= sub_event[:title] %>
</a>
</div>
<% end %>
</div>
<%= render '/partials/_event_preview.*', event: sub_event, main_event: event %>
<% end %>
<% end %>
<% end %>
</div>

View file

@ -5,6 +5,7 @@ description: Een AWK-les voor AWK gerelateerde dingen
created_at: 01-02-2016
time: 23-02-2016
location: Auditorium A1, Campus Sterre, Gebouw S9
description: Dit is een description van het awk event!
---
Op **dinsdag 23 februari 18:00** (na de les Scriptingtalen) in **Auditorium A1** organiseren we een **AWK-les** gegeven door **professor Peter Dawyndt**.

View file

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

View file

@ -0,0 +1,6 @@
---
title: test
time: 12-3-16
location: Grace Hopper
description: Dit is een description!
---

View file

@ -0,0 +1,39 @@
<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>
</div>
<% if @main_event %>
<div class="box main-event">
<p>
<%= main_event[:title] %>
</p>
<ul>
<% sub_events(main_event).each do |sub_event| %>
<li class="<%= "active" if sub_event[:title] == (event[:title])%>" >
<%= sub_event[:title] %>
</li>
<% end %>
</ul>
</div>
<% end %>
</div>