better blogpost looks and table of contents
This commit is contained in:
parent
42a20b355f
commit
019c41fad9
2 changed files with 36 additions and 30 deletions
|
@ -1,27 +1,24 @@
|
||||||
<div class="columns">
|
<div class="heading">
|
||||||
<article class="column is-8 is-offset-2">
|
<h1 class="title is-1 has-text-centered">
|
||||||
<div class="heading">
|
<%= item[:title] %>
|
||||||
<h1 class="title is-1 has-text-centered">
|
</h1>
|
||||||
<%= item[:title] %>
|
<% if item[:author] %>
|
||||||
</h1>
|
<h2 class="subtitle is-3 has-text-centered">
|
||||||
<% if item[:author] %>
|
<% if item[:lang] == :en %>
|
||||||
<h2 class="subtitle is-3 has-text-centered">
|
by
|
||||||
<% if item[:lang] == :en %>
|
<% else %>
|
||||||
by
|
door
|
||||||
<% else %>
|
<% end %>
|
||||||
door
|
<%= item[:author] %>
|
||||||
<% end %>
|
</h2>
|
||||||
<%= item[:author] %>
|
<% end %>
|
||||||
</h2>
|
<p class="has-text-centered">
|
||||||
<% end %>
|
<small>Geschreven op <%= item[:created_at] %></small><br>
|
||||||
<p class="has-text-centered">
|
Leestijd: <%= reading_time @item %>
|
||||||
<small>Geschreven op <%= item[:created_at] %></small><br>
|
</p>
|
||||||
Leestijd: <%= reading_time @item %>
|
<hr>
|
||||||
</p>
|
</div>
|
||||||
<hr>
|
|
||||||
</div>
|
<div class="columns">
|
||||||
<div class="content is-medium">
|
<%= yield %>
|
||||||
<%= yield %>
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,11 +1,20 @@
|
||||||
|
<article class="column is-offset-2 is-8" markdown="1">
|
||||||
|
<div class="content is-medium" markdown="1">
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
<% if item[:toc] %>
|
<% if item[:toc] %>
|
||||||
<aside class="menu is-pulled-right" markdown="1">
|
<div class="menu column" markdown="1">
|
||||||
<p class="menu-label">
|
<p class="menu-label">
|
||||||
Table of Contents
|
Table of Contents
|
||||||
</p>
|
</p>
|
||||||
|
<% if item[:toc].is_a? Hash %>
|
||||||
* x
|
* x
|
||||||
{:toc .toc-depth-<%= item[:toc][:depth] %>}
|
{:toc .toc-depth-<%= item[:toc][:depth] %>}
|
||||||
</aside>
|
<% else %>
|
||||||
|
* x
|
||||||
|
{:toc}
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= yield %>
|
|
||||||
|
|
Loading…
Reference in a new issue