Merge pull request #54 from ZeusWPI/eventpage

Eventpage
This commit is contained in:
lorin 2016-09-21 17:34:36 +02:00 committed by GitHub
commit fe9a867932
8 changed files with 67 additions and 24 deletions

2
.bundle/config Normal file
View file

@ -0,0 +1,2 @@
---
BUNDLE_WITHOUT: "production"

View file

@ -11,3 +11,11 @@
height: 400px;
}
}
.banner-image{
justify-content: center;
display: flex;
img{
height: 256px;
}
}

View file

@ -8,14 +8,15 @@
.box.event-preview {
border-radius: 0px;
display: flex;
align-items: center;
box-shadow : none;
margin-bottom: 0px;
margin: 0px;
padding:20px;
padding-top:0px;
// border-top: 1px solid lighten(gray, 40%);
.image-holder {
border-radius: 50%;
//border-radius: 50%;
padding: 10px;
border: 1px solid lighten(gray, 30%);
width: 15%;
@ -23,13 +24,14 @@
}
.image {
border-radius: 50%;
vertical-align: middle;
//border-radius: 50%;
vertical-align: baseline;
border: 1px solid gray;
}
.info {
margin: 1.5em;
padding:20px;
padding-top:0px;
box-shadow : none;
width: 60%;

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
locationlink: Zeus WPI,Ghent Belgium
description: Dit is een description van het awk event!
---

View file

@ -0,0 +1,15 @@
---
title: Geeks, Attack! V
banner: https://scontent.xx.fbcdn.net/v/t1.0-9/13903431_1277596932251344_3927837466166230371_n.jpg?oh=bdda0d18a635c49893a097fba6aa99b9&oe=587C7886
description: Zeus' vijfde LAN-Party
created_at: 13-09-2016
time: 4-11-2016
location: Therminal, Hoveniersberg 24 9000 Gent
locationlink: Therminal,Ghent Belgium
description: Zeus' vijfde LAN-Party
---
De vijfde editie van Zeus WPI's LAN-Party komt eraan!
Hou alvast de datum vrij!
Wij houden jullie op de hoogte!

View file

@ -9,22 +9,33 @@
<div class="hero-head">
<%= render '/partials/_navbar.*', zeus_logo_color: :white %>
</div>
<div class="hero-body">
<div class="hero-body ">
<div class="container">
<p class="title is-1">
<b>
<%= item[:title] %>
</b>
</p>
<p class="subtitle is-3">
<%= item[:description] %>
</p>
<p class="subtitle is-3">
<ul class="fa-ul">
<li><%= fa 'clock-o', li: true %><%= item[:time] %></li>
<li><%= fa 'globe', li: true %><%= item[:location] %></li>
</ul>
</p>
<div class="columns">
<div class="column">
<p class="title is-1">
<b>
<%= item[:title] %>
</b>
</p>
<p class="subtitle is-3">
<%= item[:description] %>
</p>
<p class="subtitle is-3">
<ul class="fa-ul">
<li><%= fa 'clock-o', li: true %><%= item[:time] %></li>
<li><%= fa 'globe', li: true %><%= item[:location] %></li>
</ul>
</p>
</div>
<div class="is-narrow column banner-image">
<img src=<%= item[:banner] %> >
</div>
</div>
</div>
</div>
</section>
@ -41,8 +52,7 @@
<div class="google-maps column is-8 is-offset-2">
<iframe
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=AIzaSyBDTmw7LtDG28o9QjCnNucAJv2zTZpLjJU
&q=Zeus+WPI,Ghent+Belgium" allowfullscreen>
src="<%= locationlink item[:locationlink] %>" allowfullscreen>
</iframe>
</div>
</div>

View file

@ -1,6 +1,6 @@
<div class="box event-preview">
<div class="image-holder">
<img src="https://placehold.it/150x150" alt="" class="image" />
<img src="<%= event[:banner]%>" alt="" class="image" />
</div>
<div class="box info">

View file

@ -1,3 +1,4 @@
require 'uri'
module EventsHelper
def all_events
@items.find_all('/events/*/*') + grouped_events
@ -17,4 +18,8 @@ module EventsHelper
[]
end
end
def locationlink(location)
"https://www.google.com/maps/embed/v1/place?key=AIzaSyBDTmw7LtDG28o9QjCnNucAJv2zTZpLjJU&q=#{URI.escape(location)}" if location
end
end