fix homepage for blogpost previews

This commit is contained in:
Lorin Werthen 2021-02-25 12:55:30 +01:00
parent dc2794bb98
commit 584184da7a
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
2 changed files with 47 additions and 46 deletions

View file

@ -1,63 +1,64 @@
<% content_for :head do %> <% content_for :head do %>
<META NAME="Title" CONTENT="Zeus WPI: Werkgroep informatica van de Universiteit Gent"> <META NAME="Title" CONTENT="Zeus WPI: Werkgroep informatica van de Universiteit Gent">
<META NAME="Keywords" CONTENT="zeus wpi, informatica, universiteit gent"> <META NAME="Keywords" CONTENT="zeus wpi, informatica, universiteit gent">
<META NAME="Description" CONTENT="Studentenvereniging van de informatica aan de Universiteit Gent. Informatie over o.a. Linux (downloads en lessen), programmeren, en internetbeveiliging."> <META NAME="Description" CONTENT="Studentenvereniging van de informatica aan de Universiteit Gent. Informatie over o.a. Linux (downloads en lessen), programmeren, en internetbeveiliging.">
<meta property="og:title" content="Zeus WPI: WerkgroeP Informatica van de Universiteit Gent" /> <meta property="og:title" content="Zeus WPI: WerkgroeP Informatica van de Universiteit Gent" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:image" content="https://zinc.zeus.gent" /> <meta property="og:image" content="https://zinc.zeus.gent" />
<meta property="og:description" content="Studentenvereniging van de informatica aan de Universiteit Gent. Informatie over o.a. Linux (downloads en lessen), programmeren, en internetbeveiliging." /> <meta property="og:description" content="Studentenvereniging van de informatica aan de Universiteit Gent. Informatie over o.a. Linux (downloads en lessen), programmeren, en internetbeveiliging." />
<% end %> <% end %>
<% content_for :scripts do %> <% content_for :scripts do %>
<%= asset :js, :gamification %> <%= asset :js, :gamification %>
<% end %> <% end %>
<div id="homepage"> <div id="homepage">
<div class="tile is-vertical is-ancestor"> <div class="tile is-vertical is-ancestor">
<%= if studytime? then render '/tiles/blokmap.*'end %> <%= if studytime? then render '/tiles/blokmap.*'end %>
<!--next event --> <!--next event -->
<div class="tile is-parent"> <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>
<div class="tile"> <div class="tile">
<!--top coders --> <!--top coders -->
<div class="tile is-parent is-6"> <div class="tile is-parent">
<div class="tile is-child box gamification-tile"> <div class="tile is-child box gamification-tile">
<div class="content"> <div class="content">
<div class="tile-header"> <div class="tile-header">
<h1 class="has-text-centered"> <h1 class="has-text-centered">
<a href="https://zeus.ugent.be/game"> <a href="https://zeus.ugent.be/game">
<i class="fa fa-trophy" aria-hidden="true"></i> <i class="fa fa-trophy" aria-hidden="true"></i>
</a> </a>
</h1> </h1>
</div> </div>
<div id="gamification-coders" > <div id="gamification-coders" >
<!-- EMPTY --> <!-- EMPTY -->
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- latest blogpost --> <div class="tile">
<div class="tile is-6 is-parent"> <div class="tile is-vertical">
<%= render '/partials/_blog_preview.*', post: sorted_articles.first %> <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 %>
</div>
<%end%>
</div> </div>
</div> <div class="tile is-vertical">
<div class="tile"> <div class="tile is-parent">
<div class="tile is-vertical"> <h2 class="title">Blogposts</h2>
<% front_page_events[1..3].each do |event| %> </div>
<div class="tile is-parent "> <% sorted_articles[0..3].each do |post| %>
<%= render '/partials/_events_tile.*', event: event %> <div class="tile is-parent ">
<%= render '/partials/_blog_preview.*', post: post %>
</div>
<%end%>
</div> </div>
<%end%>
</div> </div>
<div class="tile is-vertical">
<% sorted_articles[1..3].each do |post| %>
<div class="tile is-parent ">
<%= render '/partials/_blog_preview.*', post: post %>
</div>
<%end%>
</div>
</div>
</div> </div>
</div> </div>

View file

@ -17,5 +17,5 @@
<p> <p>
<%= excerptize(post.reps[:text].compiled_content, length: 500).tr("\n", ' ')%> <%= excerptize(post.reps[:text].compiled_content, length: 500).tr("\n", ' ')%>
</p> </p>
<hr>
</div> </div>
<hr>