commit
60d03a8920
10 changed files with 78 additions and 17 deletions
|
@ -55,7 +55,7 @@ $top_coder_size: 80px;
|
|||
.content {
|
||||
color: white;
|
||||
|
||||
h1, h2 {
|
||||
h1, h2, h3 {
|
||||
color: inherit;
|
||||
}
|
||||
a, a:visited {
|
||||
|
@ -130,7 +130,7 @@ $top_coder_size: 80px;
|
|||
.content {
|
||||
position: relative;
|
||||
|
||||
h1, h2 {
|
||||
h1, h2, h3 {
|
||||
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>
|
||||
</section>
|
||||
|
||||
<!-- LOCATION -->
|
||||
<% if item[:locationlink] %>
|
||||
<section class="section">
|
||||
<div class="columns">
|
||||
<div class="column is-8 is-offset-2">
|
||||
|
@ -83,6 +85,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
|
||||
<!-- SPONSORED BY -->
|
||||
|
|
|
@ -57,8 +57,23 @@
|
|||
<div class="content has-text-centered">
|
||||
<h1>Sorry.</h1>
|
||||
<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>
|
||||
<% end %>
|
||||
</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>
|
||||
|
|
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'
|
||||
|
||||
module EventsHelper
|
||||
def all_events(year = nil)
|
||||
def all_events(year = nil, soon = nil)
|
||||
items_ = if year
|
||||
@items.find_all("/events/#{year}/*.md")
|
||||
else
|
||||
@items.find_all('/events/*/*.md')
|
||||
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
|
||||
|
||||
def upcoming_events(year = nil)
|
||||
|
|
|
@ -2,9 +2,9 @@ module IcalHelper
|
|||
def event_calendar
|
||||
cal = Icalendar::Calendar.new
|
||||
|
||||
items.find_all('/events/*/*.md').each do |i|
|
||||
cal.add_event(event_for(i))
|
||||
end
|
||||
items.find_all('/events/*/*.md')
|
||||
.select { |x| x[:soon] == nil }
|
||||
.each {|i| cal.add_event(event_for(i)) }
|
||||
|
||||
cal.to_ical
|
||||
end
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
module PreprocessHelper
|
||||
def required_attrs
|
||||
{
|
||||
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',
|
||||
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: {
|
||||
status: 'A privacy item must include the status of the project'
|
||||
}
|
||||
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',
|
||||
location: 'The event should include a :location, a textual description',
|
||||
},
|
||||
privacy: {
|
||||
status: 'A privacy item must include the status of the project'
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue