Merge pull request #368 from ZeusWPI/events/soon-fixes
Fixes for events/soon
This commit is contained in:
commit
3c5741eacb
5 changed files with 27 additions and 54 deletions
|
@ -57,32 +57,21 @@
|
|||
<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? %>
|
||||
<% unless soon_events.empty? %>
|
||||
<div class="column is-3 is-narrow">
|
||||
<div class="menu">
|
||||
<div class="content">
|
||||
<h1>
|
||||
Soon TM.
|
||||
Soon™
|
||||
</h1>
|
||||
</div>
|
||||
<% soon_events().each do |event| %>
|
||||
<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:'light-grey';"
|
||||
<% end %>
|
||||
>
|
||||
<div class="content event-content has-text-centered">
|
||||
<h3 style="color: white;"><%= event[:title] %></h3>
|
||||
<p><%= event[:description] %></p>
|
||||
</div>
|
||||
</div>
|
||||
<% soon_events.each do |event| %>
|
||||
<%= render '/partials/_soon_tile.*', event: event %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,33 +1,17 @@
|
|||
<% if @event[:banner] %>
|
||||
<a href="<%= @event.path %>" 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] %>
|
||||
<a href="<%= @event.path %>" 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 %>
|
||||
<a href="<%= @event.path %>" class="tile event-tile is-child box backgroundimg">
|
||||
<% end %>
|
||||
<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 nil && @event[:image] %>
|
||||
<% 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">
|
||||
<%= fa :'clock-o' , fw: true %><%= @event[:time].strftime('%A %d %B, %H:%M') %>
|
||||
<br>
|
||||
<%= fa :'map-marker', fw: true %><%= @event[:location] %>
|
||||
<div class="has-text-centered">
|
||||
<h3><%= @event[:title] %></h3>
|
||||
<p><%= @event[:description] %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@ module EventsHelper
|
|||
items_.select { |x| x[:soon] == soon }.sort_by { |x| x[:time] }
|
||||
end
|
||||
|
||||
def soon_events()
|
||||
def soon_events
|
||||
all_events(nil, true)
|
||||
end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -5,7 +5,7 @@ module PreprocessHelper
|
|||
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'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue