diff --git a/content/assets/stylesheets/includes/tiles.scss b/content/assets/stylesheets/includes/tiles.scss index 6ac2b59..bd43fe4 100644 --- a/content/assets/stylesheets/includes/tiles.scss +++ b/content/assets/stylesheets/includes/tiles.scss @@ -122,5 +122,5 @@ a.box { } .backgroundimg{ - Background-position: center; + background-position: center; } diff --git a/content/index.erb b/content/index.erb index 4ab94a8..3f14787 100644 --- a/content/index.erb +++ b/content/index.erb @@ -36,20 +36,20 @@
- <% for i in [0,1,2] do event = upcoming_events[1+i] || all_events[-2-i] %> + <% all_events.reverse[1..3].each do |event| %>
<%= render '/partials/_tile.*', - article: event, - small_text: if upcoming_events[1] then "Upcoming event" else "Past event" end, - htmlclass:"highlighted"%> + article: event, + small_text: upcoming_events.include?(event) ? "Upcoming event" : "Past event", + htmlclass:"highlighted" %>
<%end%>
- <% for i in [1,2,3] do post = sorted_articles[i] %> + <% sorted_articles[1..3].each do |post| %>
<%= render '/partials/_tile.*', - article: post, + article: post, small_text: "blogpost"%>
<%end%> @@ -60,7 +60,7 @@
<%= asset :js, :gamification %> <%= asset :js, :quote %> -