From b6543ef41ed623ec9e9b1feef0f50b9ea36c4db7 Mon Sep 17 00:00:00 2001 From: Maruan Al-Shedivat Date: Sun, 17 May 2020 05:52:09 -0400 Subject: [PATCH] Simplify layout logic --- _layouts/about.html | 60 +++++++++++++++++++++++++++------------------ _layouts/page.html | 5 ---- 2 files changed, 36 insertions(+), 29 deletions(-) diff --git a/_layouts/about.html b/_layouts/about.html index ded8a6c..9ac234e 100644 --- a/_layouts/about.html +++ b/_layouts/about.html @@ -1,32 +1,44 @@ --- -layout: page +layout: default --- -
-
- {{ content }} -
- {% if page.profile %} -
- {% if page.profile.image %} - - {% endif %} - {% if page.profile.address %} -
- {{ page.profile.address }} +
+ +
+ {% assign name = site.title | split: ' ' %} +

{{ name | first }} {{ name | last }}

+

{{ page.description }}

+
+ +
+
+
+ {{ content }} +
+ {% if page.profile %} +
+ {% if page.profile.image %} + + {% endif %} + {% if page.profile.address %} +
+ {{ page.profile.address }} +
+ {% endif %}
- {% endif %} + {% endif %} +
+ + {% if page.news %} + {% include news.html %} + {% endif %} + + {% if page.social %} + {% endif %} -
+ -{% if page.news %} - {% include news.html %} -{% endif %} - -{% if page.social %} - -{% endif %} diff --git a/_layouts/page.html b/_layouts/page.html index e474e9b..10b9ab4 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -4,12 +4,7 @@ layout: default
- {% if page.title == 'about' %} - {% assign name = site.title | split: ' ' %} -

{{ name | first }} {{ name | last }}

- {% else %}

{{ page.title }}

- {% endif %}

{{ page.description }}