diff --git a/layouts/events.erb b/layouts/events.erb index 827c71f..c967bf7 100644 --- a/layouts/events.erb +++ b/layouts/events.erb @@ -57,33 +57,22 @@

Sorry.

No events planned yet this year.

-

Soon TM.

+

Soon™.

<% end %> - <% unless soon_events().empty? %> + <% unless soon_events.empty? %>
<% end %> diff --git a/layouts/partials/_soon_tile.erb b/layouts/partials/_soon_tile.erb index f46b4c9..cea1f67 100644 --- a/layouts/partials/_soon_tile.erb +++ b/layouts/partials/_soon_tile.erb @@ -1,33 +1,17 @@ -<% if @event[:banner] %> - -<% elsif @event[:color] %> - -<% else %> - -<% end %> +
+ 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 %> + > diff --git a/lib/helpers/events.rb b/lib/helpers/events.rb index cb8501d..7e682dd 100644 --- a/lib/helpers/events.rb +++ b/lib/helpers/events.rb @@ -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 diff --git a/lib/helpers/ical.rb b/lib/helpers/ical.rb index 1369e0f..e11e1ef 100644 --- a/lib/helpers/ical.rb +++ b/lib/helpers/ical.rb @@ -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 diff --git a/lib/helpers/preprocess.rb b/lib/helpers/preprocess.rb index bb23b51..41abf9a 100644 --- a/lib/helpers/preprocess.rb +++ b/lib/helpers/preprocess.rb @@ -1,11 +1,11 @@ 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', + 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' }