more ruby-esque stuff

This commit is contained in:
Lorin Werthen 2017-02-08 13:50:59 +01:00
parent 907874f4d3
commit 15ab0113c9
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
2 changed files with 8 additions and 8 deletions

View file

@ -122,5 +122,5 @@ a.box {
}
.backgroundimg{
Background-position: center;
background-position: center;
}

View file

@ -36,20 +36,20 @@
</div>
<div class="tile">
<div class="tile is-vertical">
<% for i in [0,1,2] do event = upcoming_events[1+i] || all_events[-2-i] %>
<% all_events.reverse[1..3].each do |event| %>
<div class="tile is-parent ">
<%= 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" %>
</div>
<%end%>
</div>
<div class="tile is-vertical">
<% for i in [1,2,3] do post = sorted_articles[i] %>
<% sorted_articles[1..3].each do |post| %>
<div class="tile is-parent ">
<%= render '/partials/_tile.*',
article: post,
article: post,
small_text: "blogpost"%>
</div>
<%end%>
@ -60,7 +60,7 @@
</div>
<%= asset :js, :gamification %>
<%= asset :js, :quote %>
<!--
<!--
<div class="tile is-parent is-2">
<a class="tile box is-child imgcenter project-tile" href="/projects/#12urenloop">