Improved blog page with mobile menu, author and excerpt
This commit is contained in:
parent
f72d001672
commit
1cc8efbbd6
1 changed files with 36 additions and 19 deletions
|
@ -1,21 +1,6 @@
|
|||
<div class="columns is-flex-mobile" >
|
||||
<div class="column">
|
||||
<% posts_in_year(item[:academic_year]).each do |post| %>
|
||||
<a href="<%= relative_path_to(post) %>" >
|
||||
<div class="box padbox">
|
||||
<article class="media">
|
||||
<div class="media-content">
|
||||
<div class="content">
|
||||
<h2><%= post[:title] %> <small> <%= post[:created_at] %></small></h2>
|
||||
<%= post[:description] %>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<aside class="column is-narrow menu">
|
||||
<div class="columns" >
|
||||
<div class="column is-2 is-narrow">
|
||||
<aside class="menu">
|
||||
<p class="menu-label">
|
||||
Academic Year
|
||||
</p>
|
||||
|
@ -36,3 +21,35 @@
|
|||
</ul>
|
||||
</aside>
|
||||
</div>
|
||||
<div class="column">
|
||||
<% posts_in_year(item[:academic_year]).each do |post| %>
|
||||
<a href="<%= relative_path_to(post) %>">
|
||||
<article class="box padbox">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<p class="title is-3"><%= post[:title] %></p>
|
||||
<p class="subtitle is-5"><% if post[:author] %>
|
||||
<% if post[:lang] == :en %>
|
||||
by
|
||||
<% else %>
|
||||
door
|
||||
<% end %>
|
||||
<%= post[:author] %>
|
||||
<% end %></p>
|
||||
<div class="content">
|
||||
<%= post[:description] %>
|
||||
<br>
|
||||
<small><%= post[:created_at] %></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="content">
|
||||
<%= excerptize(post.reps[:text].compiled_content, length: 200).tr("\n", ' ')%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue