diff --git a/content/assets/stylesheets/includes/eventpage.scss b/content/assets/stylesheets/includes/eventpage.scss index 916b9fa..dd33c77 100644 --- a/content/assets/stylesheets/includes/eventpage.scss +++ b/content/assets/stylesheets/includes/eventpage.scss @@ -55,3 +55,13 @@ width: 100%; } } + +.event-tile-image { + // For now, don't show the event tile image on mobile, takes too much space + @include mobile { + display: none; + } + + max-width:200px; + max-height:200px; +} diff --git a/content/index.erb b/content/index.erb index 77dd31f..8bbdf4f 100644 --- a/content/index.erb +++ b/content/index.erb @@ -11,55 +11,54 @@
<%= if studytime? then render '/tiles/blokmap.*'end %> -
- -
-
-
-
-

- - - -

-
-
- -
+ +
+ <%= render '/partials/_events_tile.*', event: upcoming_events[0] || all_events[-1] %> +
+
+ +
+
+
+
+

+ + + +

+
+
+
- -
- <%= render '/partials/_events_tile.*', event: upcoming_events[0] || all_events[-1] %> -
- - -
- <%= render '/partials/_tile.*', - article: sorted_articles.first, - small_text: "Latest blogpost", - htmlclass:"highlighted"%> -
-
-
- <% all_events.reject { |x| x == (upcoming_events[0] || all_events[-1]) }.reverse[0..2].each do |event| %> -
- <%= render '/partials/_events_tile.*', event: event %> -
- <%end%> + +
+ <%= render '/partials/_tile.*', + article: sorted_articles.first, + small_text: "Latest blogpost", + htmlclass:"highlighted"%> +
+
+
+
+ <% all_events.reject { |x| x == (upcoming_events[0] || all_events[-1]) }.reverse[0..2].each do |event| %> +
+ <%= render '/partials/_events_tile.*', event: event %>
-
- <% sorted_articles[1..3].each do |post| %> -
- <%= render '/partials/_tile.*', - article: post, - small_text: "Blogpost"%> -
<%end%> - -
+
+ <% sorted_articles[1..3].each do |post| %> +
+ <%= render '/partials/_tile.*', + article: post, + small_text: "Blogpost"%> +
+ <%end%> + +
+
diff --git a/layouts/events.erb b/layouts/events.erb index df95b69..e8e1d62 100644 --- a/layouts/events.erb +++ b/layouts/events.erb @@ -27,7 +27,7 @@

Upcoming events

- <% upcoming_events(@item[:academic_year]).each_slice(2) do |slice| %> + <% upcoming_events(@item[:academic_year]).each_slice(1) do |slice| %>
<% slice.each do |event| %>
@@ -42,7 +42,7 @@

Past events

- <% past_events(@item[:academic_year]).each_slice(2) do |slice| %> + <% past_events(@item[:academic_year]).each_slice(1) do |slice| %>
<% slice.each do |event| %>
diff --git a/layouts/partials/_events_tile.erb b/layouts/partials/_events_tile.erb index 702e551..c1ca994 100644 --- a/layouts/partials/_events_tile.erb +++ b/layouts/partials/_events_tile.erb @@ -8,6 +8,9 @@ <% end %>
+ <% if @event[:image] %> + + <% end %>

<%= @event[:title] %>