From d366b6d6d28ddaf1b3c41bc3388631ff58dfcb24 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 6 Dec 2018 18:20:14 +0000 Subject: [PATCH] Re-organise layouts --- .../{base.html.twig => app.html.twig} | 34 +---------------- source/_layouts/default.html.twig | 38 +++++++++++++++++-- source/_layouts/page.html.twig | 5 +++ source/_layouts/post.html.twig | 2 +- 4 files changed, 42 insertions(+), 37 deletions(-) rename source/_layouts/{base.html.twig => app.html.twig} (54%) create mode 100644 source/_layouts/page.html.twig diff --git a/source/_layouts/base.html.twig b/source/_layouts/app.html.twig similarity index 54% rename from source/_layouts/base.html.twig rename to source/_layouts/app.html.twig index b0d13124..ce4579a0 100644 --- a/source/_layouts/base.html.twig +++ b/source/_layouts/app.html.twig @@ -26,39 +26,7 @@
- {% include 'layout/navbar' %} - -
-
-
- {% block page_title %} -

{{ page.title }}

- {% endblock %} - - {% block content_wrapper %} - {% block content %}{% endblock %} - {% endblock %} -
- - {% block sidebar_wrapper %} - - {% endblock %} -
- -
-

- © 2010-{{ 'now'|date('Y') }} {{ site.title }}. - Built with Sculpin and Tailwind CSS. - Hosted on Netlify. -

- - {% include 'meetups' %} -
-
+ {% block body %}{% endblock %}
{% if site.google_analytics_tracking_id %} diff --git a/source/_layouts/default.html.twig b/source/_layouts/default.html.twig index 68173dd6..da552ab9 100644 --- a/source/_layouts/default.html.twig +++ b/source/_layouts/default.html.twig @@ -1,5 +1,37 @@ -{% extends 'base' %} +{% extends 'app' %} -{% block content_top %} -

{{ page.title }}

+{% block body %} + {% include 'layout/navbar' %} + +
+
+
+ {% block page_title %} +

{{ page.title }}

+ {% endblock %} + + {% block content_wrapper %} + {% block content %}{% endblock %} + {% endblock %} +
+ + {% block sidebar_wrapper %} + + {% endblock %} +
+ +
+

+ © 2010-{{ 'now'|date('Y') }} {{ site.title }}. + Built with Sculpin and Tailwind CSS. + Hosted on Netlify. +

+ + {% include 'meetups' %} +
+
{% endblock %} diff --git a/source/_layouts/page.html.twig b/source/_layouts/page.html.twig new file mode 100644 index 00000000..a60b03d2 --- /dev/null +++ b/source/_layouts/page.html.twig @@ -0,0 +1,5 @@ +{% extends 'default' %} + +{% block content_top %} +

{{ page.title }}

+{% endblock %} diff --git a/source/_layouts/post.html.twig b/source/_layouts/post.html.twig index 0a61456b..90f3d4a6 100644 --- a/source/_layouts/post.html.twig +++ b/source/_layouts/post.html.twig @@ -1,4 +1,4 @@ -{% extends 'base' %} +{% extends 'page' %} {% block page_title %}{% endblock %}