Simplify layout logic

This commit is contained in:
Maruan Al-Shedivat 2020-05-17 05:52:09 -04:00
parent 097a32a680
commit b6543ef41e
2 changed files with 36 additions and 29 deletions

View File

@ -1,7 +1,16 @@
---
layout: page
layout: default
---
<div class="post">
<header class="post-header">
{% assign name = site.title | split: ' ' %}
<h1 class="post-title"><span class="font-weight-bold">{{ name | first }}</span> {{ name | last }}</h1>
<p class="post-description">{{ page.description }}</p>
</header>
<article>
<div class="row">
<div class="col">
{{ content }}
@ -30,3 +39,6 @@ layout: page
<div class="contact-note">{{ site.contact_note }}</div>
</div>
{% endif %}
</article>
</div>

View File

@ -4,12 +4,7 @@ layout: default
<div class="post">
<header class="post-header">
{% if page.title == 'about' %}
{% assign name = site.title | split: ' ' %}
<h1 class="post-title"><span class="font-weight-bold">{{ name | first }}</span> {{ name | last }}</h1>
{% else %}
<h1 class="post-title">{{ page.title }}</h1>
{% endif %}
<p class="post-description">{{ page.description }}</p>
</header>