commit
60d03a8920
10 changed files with 78 additions and 17 deletions
|
@ -55,7 +55,7 @@ $top_coder_size: 80px;
|
||||||
.content {
|
.content {
|
||||||
color: white;
|
color: white;
|
||||||
|
|
||||||
h1, h2 {
|
h1, h2, h3 {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
a, a:visited {
|
a, a:visited {
|
||||||
|
@ -130,7 +130,7 @@ $top_coder_size: 80px;
|
||||||
.content {
|
.content {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
h1, h2 {
|
h1, h2, h3 {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
7
content/events/19-20/ctf2.md
Normal file
7
content/events/19-20/ctf2.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
title: 'Capture The Flag II'
|
||||||
|
description: Zeus CTF in aanloop naar de Belgische Cybersecuritychallenge
|
||||||
|
time: '12-11-2019 18:00'
|
||||||
|
location: 'Kelder Zeus WPI'
|
||||||
|
soon: true
|
||||||
|
---
|
8
content/events/19-20/godot.md
Normal file
8
content/events/19-20/godot.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
title: Game Development - Godot
|
||||||
|
description: Maak je eerste spel met Godot, we focussen op Flappy Bird!
|
||||||
|
color: '#478CBF'
|
||||||
|
time: '12-11-2019 18:00'
|
||||||
|
location: 'Kelder Zeus WPI'
|
||||||
|
soon: true
|
||||||
|
---
|
8
content/events/19-20/spelletjesavond2.md
Normal file
8
content/events/19-20/spelletjesavond2.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
title: Spelletjesavond
|
||||||
|
description: Kom samen met andere Zeussers en Zeusinnen spelletjes spelen!
|
||||||
|
color: lightblue
|
||||||
|
time: '12-11-2019 18:00'
|
||||||
|
location: 'Kelder Zeus WPI'
|
||||||
|
soon: true
|
||||||
|
---
|
|
@ -73,6 +73,8 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- LOCATION -->
|
||||||
|
<% if item[:locationlink] %>
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-8 is-offset-2">
|
<div class="column is-8 is-offset-2">
|
||||||
|
@ -83,6 +85,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
<!-- SPONSORED BY -->
|
<!-- SPONSORED BY -->
|
||||||
|
|
|
@ -57,8 +57,23 @@
|
||||||
<div class="content has-text-centered">
|
<div class="content has-text-centered">
|
||||||
<h1>Sorry.</h1>
|
<h1>Sorry.</h1>
|
||||||
<h2>No events planned yet this year.</h2>
|
<h2>No events planned yet this year.</h2>
|
||||||
<h4 class="has-text-grey"><i>Soon TM.<i></h4>
|
<h4 class="has-text-grey"><em>Soon™.</em></h4>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% unless soon_events.empty? %>
|
||||||
|
<div class="column is-3 is-narrow">
|
||||||
|
<div class="menu">
|
||||||
|
<div class="content">
|
||||||
|
<h1>
|
||||||
|
Soon™
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<% soon_events.each do |event| %>
|
||||||
|
<%= render '/partials/_soon_tile.*', event: event %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
17
layouts/partials/_soon_tile.erb
Normal file
17
layouts/partials/_soon_tile.erb
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<div class="tile box highlighted"
|
||||||
|
<% if event[:color] %>
|
||||||
|
style="background-image: linear-gradient(to top right,rgba(255,255,255,0),rgba(0,0,0,.60)); background-color:<%= event[:color] %>;"
|
||||||
|
<% else %>
|
||||||
|
style="background-image: linear-gradient(to top right,rgba(255,255,255,0),rgba(0,0,0,.60)); background-color: lightgrey;"
|
||||||
|
<% end %>
|
||||||
|
>
|
||||||
|
<div class="content event-content">
|
||||||
|
<% if @event[:image] %>
|
||||||
|
<img class="event-tile-image" src="<%= @event[:image] %>" alt="">
|
||||||
|
<% end %>
|
||||||
|
<div class="has-text-centered">
|
||||||
|
<h3><%= @event[:title] %></h3>
|
||||||
|
<p><%= @event[:description] %></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -3,14 +3,18 @@
|
||||||
require 'uri'
|
require 'uri'
|
||||||
|
|
||||||
module EventsHelper
|
module EventsHelper
|
||||||
def all_events(year = nil)
|
def all_events(year = nil, soon = nil)
|
||||||
items_ = if year
|
items_ = if year
|
||||||
@items.find_all("/events/#{year}/*.md")
|
@items.find_all("/events/#{year}/*.md")
|
||||||
else
|
else
|
||||||
@items.find_all('/events/*/*.md')
|
@items.find_all('/events/*/*.md')
|
||||||
end
|
end
|
||||||
|
|
||||||
items_.sort_by { |x| x[:time] }
|
items_.select { |x| x[:soon] == soon }.sort_by { |x| x[:time] }
|
||||||
|
end
|
||||||
|
|
||||||
|
def soon_events
|
||||||
|
all_events(nil, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
def upcoming_events(year = nil)
|
def upcoming_events(year = nil)
|
||||||
|
|
|
@ -2,9 +2,9 @@ module IcalHelper
|
||||||
def event_calendar
|
def event_calendar
|
||||||
cal = Icalendar::Calendar.new
|
cal = Icalendar::Calendar.new
|
||||||
|
|
||||||
items.find_all('/events/*/*.md').each do |i|
|
items.find_all('/events/*/*.md')
|
||||||
cal.add_event(event_for(i))
|
.select { |x| x[:soon] == nil }
|
||||||
end
|
.each {|i| cal.add_event(event_for(i)) }
|
||||||
|
|
||||||
cal.to_ical
|
cal.to_ical
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
module PreprocessHelper
|
module PreprocessHelper
|
||||||
def required_attrs
|
def required_attrs
|
||||||
{
|
{
|
||||||
event: {
|
event: {
|
||||||
time: 'An event item should include the :time attribute, which describes the begin time and date of the event.',
|
time: 'An event item should include the :time attribute, which describes the begin time and date of the event.',
|
||||||
title: 'The event does not include a :title',
|
title: 'The event does not include a :title',
|
||||||
location: 'The event should include a :location, a textual description',
|
location: 'The event should include a :location, a textual description',
|
||||||
locationlink: 'The event does not include a :locationlink, which is a querystring which is used for Google Maps'
|
},
|
||||||
},
|
privacy: {
|
||||||
privacy: {
|
status: 'A privacy item must include the status of the project'
|
||||||
status: 'A privacy item must include the status of the project'
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue