[Refactor] Blog/Post: Use hero instead of (duplicate) header, update post templates with page module

This commit is contained in:
0xfff 2016-10-08 21:50:59 +02:00
parent d7a13d8c9a
commit 61a012ac30
15 changed files with 201 additions and 215 deletions

View file

@ -2,35 +2,31 @@
layout: default
---
{% tf blog/header.html %}
{% include hero/post.html %}
<div id="title">
<h1 class="content">{% if page.title %}{{ page.title }}{% endif %}</h1>
</div>
<div class="page page--post">
<div class="content">
<div class="main-col post">
{% if page.image %}
<img src="{{ page.image }}" class="hero-image">
{% endif %}
<em>{{ page.date | date: "%b %d, %Y" }}</em>
{{ content }}
{% include author.html %}
</div>
<div class="sidebar">
{% for post in site.related_posts limit:5 %}
<!-- limit:4 -->
<div class="feature">
<h3><a href="{{ basenav }}{{ post.url }}">{{ post.title }}</a></h3>
<p><em>{{ post.date | date: "%b %d, %Y" }}</em><br />{{ post.excerpt | strip_html | truncatewords: 10 }}</p>
<section class="section section--post">
<div class="section__content content">
<div class="main-col post">
{{ content }}
{% include author.html %}
</div>
{% endfor %}
</div>
<div class="sidebar">
{% for post in site.related_posts limit:5 %}
<!-- limit:4 -->
<div class="feature">
<h3><a href="{{ basenav }}{{ post.url }}">{{ post.title }}</a></h3>
<p><em>{{ post.date | date: "%b %d, %Y" }}</em><br />{{ post.excerpt | strip_html | truncatewords: 10 }}</p>
</div>
{% endfor %}
</div>
</div>
</section>
</div>