Compare commits
2 commits
master
...
planned-ev
Author | SHA1 | Date | |
---|---|---|---|
|
de81efe189 | ||
|
a570d649be |
5 changed files with 71 additions and 2 deletions
9
content/planned_events/ctf2.md
Normal file
9
content/planned_events/ctf2.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
title: 'Capture The Flag II'
|
||||
description: Zeus CTF in aanloop naar de Belgische Cybersecuritychallenge
|
||||
created_at: 06-12-2019
|
||||
image: 'https://zeus.ugent.be/zeuswpi/_9i__XUJ.jpg'
|
||||
banner: 'https://zeus.ugent.be/zeuswpi/JnpFxP-T.jpg'
|
||||
location: 'Auditorium A3, Zeus WPI'
|
||||
locationlink: 'S9 Gent'
|
||||
---
|
8
content/planned_events/spelletjesavond2.md
Normal file
8
content/planned_events/spelletjesavond2.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: Spelletjesavond
|
||||
description: Kom samen met andere Zeussers en Zeusinnen spelletjes spelen!
|
||||
created_at: 13-03-2019
|
||||
location: 'Leslokaal 1.1, Gebouw S9, Campus Sterre'
|
||||
locationlink: 'S9 Gent'
|
||||
color: blue
|
||||
---
|
|
@ -38,6 +38,21 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% unless planned_events().empty? %>
|
||||
<div class="content">
|
||||
<h1>Planned events</h1>
|
||||
</div>
|
||||
<% planned_events().each_slice(1) do |slice| %>
|
||||
<div class="columns">
|
||||
<% slice.each do |event| %>
|
||||
<div class="tile is-parent ">
|
||||
<%= render '/partials/_planned_events_tile.*', event: event %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% unless past_events(@item[:academic_year]).empty? %>
|
||||
<div class="content">
|
||||
<h1>Past events</h1>
|
||||
|
|
33
layouts/partials/_planned_events_tile.erb
Normal file
33
layouts/partials/_planned_events_tile.erb
Normal file
|
@ -0,0 +1,33 @@
|
|||
<% if @event[:banner] %>
|
||||
<div class="tile event-tile is-child box backgroundimg highlighted"
|
||||
style="background-image:linear-gradient(rgba(0,0,0,0.2), rgba(0, 0, 0, 0.65)), url('<%= @event[:banner] %>');">
|
||||
<% elsif @event[:color] %>
|
||||
<div class="tile event-tile is-child box backgroundimg highlighted"
|
||||
style="background-image: linear-gradient(to top right,rgba(255,255,255,0),rgba(0,0,0,.60)); background-color:<%= @event[:color] %>;">
|
||||
<% else %>
|
||||
<div class="tile event-tile is-child box backgroundimg">
|
||||
<% end %>
|
||||
<div class="content event-content">
|
||||
<% if @event[:image] %>
|
||||
<img class="event-tile-image" src="<%= @event[:image] %>" alt="">
|
||||
<% end %>
|
||||
<div class="event-text">
|
||||
<h1 class="has-text-centered">
|
||||
<%= @event[:title] %>
|
||||
</h1>
|
||||
|
||||
<div class="description has-text-centered">
|
||||
<%= @event[:description] %>
|
||||
</div>
|
||||
|
||||
<div class="is-divider"></div>
|
||||
|
||||
<div class="event-time-loc">
|
||||
<% if @event[:time] %><%= fa :'clock-o' , fw: true %><%= @event[:time].strftime('%A %d %B, %H:%M') %><% end %>
|
||||
<br>
|
||||
<% if @event[:location] %><%= fa :'map-marker', fw: true %><%= @event[:location] %><% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -14,11 +14,15 @@ module EventsHelper
|
|||
end
|
||||
|
||||
def upcoming_events(year = nil)
|
||||
all_events(year).reject { |x| x[:time] <= Date.today }
|
||||
all_events(year).reject { |x| x[:concrete] == false or x[:time] <= Date.today}
|
||||
end
|
||||
|
||||
def planned_events()
|
||||
@items.find_all('/planned_events/*.md')
|
||||
end
|
||||
|
||||
def past_events(year = nil)
|
||||
all_events(year).reject { |x| x[:time] > Date.today }.reverse
|
||||
all_events(year).reject { |x| x[:concrete] == false or x[:time] > Date.today }.reverse
|
||||
end
|
||||
|
||||
def academic_years_event_items
|
||||
|
|
Loading…
Reference in a new issue