fix homepage for blogpost previews
This commit is contained in:
parent
dc2794bb98
commit
584184da7a
2 changed files with 47 additions and 46 deletions
|
@ -17,11 +17,11 @@
|
|||
<%= if studytime? then render '/tiles/blokmap.*'end %>
|
||||
<!--next event -->
|
||||
<div class="tile is-parent">
|
||||
<%= render '/partials/_events_tile.*', event: front_page_events[0] %>
|
||||
<%= render '/partials/_events_tile.*', event: front_page_events.first %>
|
||||
</div>
|
||||
<div class="tile">
|
||||
<!--top coders -->
|
||||
<div class="tile is-parent is-6">
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child box gamification-tile">
|
||||
<div class="content">
|
||||
<div class="tile-header">
|
||||
|
@ -37,13 +37,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- latest blogpost -->
|
||||
<div class="tile is-6 is-parent">
|
||||
<%= render '/partials/_blog_preview.*', post: sorted_articles.first %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile">
|
||||
<div class="tile is-vertical">
|
||||
<div class="tile is-parent">
|
||||
<h2 class="title">Events</h2>
|
||||
</div>
|
||||
<% front_page_events[1..3].each do |event| %>
|
||||
<div class="tile is-parent">
|
||||
<%= render '/partials/_events_tile.*', event: event %>
|
||||
|
@ -51,12 +50,14 @@
|
|||
<%end%>
|
||||
</div>
|
||||
<div class="tile is-vertical">
|
||||
<% sorted_articles[1..3].each do |post| %>
|
||||
<div class="tile is-parent">
|
||||
<h2 class="title">Blogposts</h2>
|
||||
</div>
|
||||
<% sorted_articles[0..3].each do |post| %>
|
||||
<div class="tile is-parent ">
|
||||
<%= render '/partials/_blog_preview.*', post: post %>
|
||||
</div>
|
||||
<%end%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,5 +17,5 @@
|
|||
<p>
|
||||
<%= excerptize(post.reps[:text].compiled_content, length: 500).tr("\n", ' ')%>
|
||||
</p>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue