more ruby-esque stuff
This commit is contained in:
parent
907874f4d3
commit
15ab0113c9
2 changed files with 8 additions and 8 deletions
|
@ -122,5 +122,5 @@ a.box {
|
|||
}
|
||||
|
||||
.backgroundimg{
|
||||
Background-position: center;
|
||||
background-position: center;
|
||||
}
|
||||
|
|
|
@ -36,17 +36,17 @@
|
|||
</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,
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue