From c8797ec86abc65611e124f9673787613dbd4e87c Mon Sep 17 00:00:00 2001 From: lorin Date: Wed, 7 Jun 2017 10:23:02 +0200 Subject: [PATCH] prepare events for new year, fixes #173 (#178) * prepare events for new year, fixes #173 * remove unnused method * remove dummy event --- Rules | 18 ++++-- .../assets/stylesheets/includes/navbar.scss | 11 +++- content/events.erb | 34 ----------- layouts/archive_page.erb | 2 +- layouts/events.erb | 56 +++++++++++++++++++ lib/helpers/archives.rb | 2 +- lib/helpers/events.rb | 26 +++++++-- lib/helpers/preprocess.rb | 14 +++-- 8 files changed, 110 insertions(+), 53 deletions(-) delete mode 100644 content/events.erb create mode 100644 layouts/events.erb diff --git a/Rules b/Rules index 84ab9ef..c26df97 100644 --- a/Rules +++ b/Rules @@ -16,7 +16,8 @@ preprocess do # We don't want to compile old blogposts in development ignore_old_blogposts if development? update_blog_attributes - create_blog_items + create_yearly_items('Blog') + create_yearly_items('Events') convert_event_time_to_timestamps end @@ -42,7 +43,16 @@ end # # EVENTS # -compile '/events/**/*' do + +# Overview page +compile '/events/*' do + layout '/events.*' + layout '/generic.*' + layout '/default.*' + filter :erb +end + +compile '/events/*/*' do filter :kramdown layout '/eventpost.*' @@ -50,12 +60,12 @@ compile '/events/**/*' do filter :erb end -compile '/events/**/*', rep: :text do +compile '/events/*/*', rep: :text do filter :kramdown filter :strip_html end -compile '/events/**/*', rep: :ical do +compile '/events/*/*', rep: :ical do filter :ical write ext: 'ics' end diff --git a/content/assets/stylesheets/includes/navbar.scss b/content/assets/stylesheets/includes/navbar.scss index c706e72..a2fbc8e 100644 --- a/content/assets/stylesheets/includes/navbar.scss +++ b/content/assets/stylesheets/includes/navbar.scss @@ -35,7 +35,6 @@ #logo-link { #logo { - padding-top: 10px; padding-left: 10px; width: 100px; } @@ -75,3 +74,13 @@ } } } + +.hero { + #logo { + padding-top: 25px; + } + + .nav-right { + padding-right: 10px; + } +} diff --git a/content/events.erb b/content/events.erb deleted file mode 100644 index 7dd7cda..0000000 --- a/content/events.erb +++ /dev/null @@ -1,34 +0,0 @@ ---- -navigable: true -title: Events -order: 20 ---- -
-
-

Upcoming events

-
- <% upcoming_events.each_slice(2) do |slice| %> -
- <% slice.each do |event| %> -
- <%= render '/partials/_events_tile.*', event: event %> -
- <% end %> -
- <% end %> -
- -
-
-

Past events

-
- <% past_events.each_slice(2) do |slice| %> -
- <% slice.each do |event| %> -
- <%= render '/partials/_events_tile.*', event: event %> -
- <% end %> -
- <% end %> -
diff --git a/layouts/archive_page.erb b/layouts/archive_page.erb index a77b803..7a93594 100644 --- a/layouts/archive_page.erb +++ b/layouts/archive_page.erb @@ -5,7 +5,7 @@ Academiejaar