Merge pull request #113 from ZeusWPI/better-blog-page
Improved blog page with mobile menu, author and excerpt
This commit is contained in:
commit
e2e2ab235e
1 changed files with 44 additions and 30 deletions
|
@ -1,21 +1,6 @@
|
||||||
<div class="columns is-flex-mobile" >
|
<div class="columns" >
|
||||||
<div class="column">
|
<div class="column is-2 is-narrow">
|
||||||
<% posts_in_year(item[:academic_year]).each do |post| %>
|
<aside class="menu">
|
||||||
<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">
|
|
||||||
<p class="menu-label">
|
<p class="menu-label">
|
||||||
Academic Year
|
Academic Year
|
||||||
</p>
|
</p>
|
||||||
|
@ -35,4 +20,33 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</aside>
|
</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] %>
|
||||||
|
by <%= 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>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue