From 0adfd87cd0a38a8fbd88e52ddd290b7db45d36b1 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 20 May 2019 18:07:52 +0100 Subject: [PATCH] Split app and base layouts --- source/_layouts/app.html.twig | 37 ++++++++++++++++++ source/_layouts/base.html.twig | 70 +++++++++------------------------- 2 files changed, 54 insertions(+), 53 deletions(-) create mode 100644 source/_layouts/app.html.twig diff --git a/source/_layouts/app.html.twig b/source/_layouts/app.html.twig new file mode 100644 index 00000000..c1f15e99 --- /dev/null +++ b/source/_layouts/app.html.twig @@ -0,0 +1,37 @@ + + + + {% if page.title is defined and page.url != '//' %}{{ page.title }} | {% endif %}{{ site.title }} - {{ site.subtitle }} + {% include 'meta' %} + {% block metas %} + + + + {% endblock %} + + + {% block stylesheets %}{% endblock %} + + {% for size in site.apple_touch_icon_sizes %} + + {% endfor %} + + {% for size in site.favicon_sizes %} + + {% endfor %} + + +
+ {% block body %}{% endblock %} +
+ + {% if site.google_analytics.id %} + + {% endif %} + + + + + {% block scripts %}{% endblock %} + + diff --git a/source/_layouts/base.html.twig b/source/_layouts/base.html.twig index f3ed54da..0dc8ca39 100644 --- a/source/_layouts/base.html.twig +++ b/source/_layouts/base.html.twig @@ -1,57 +1,21 @@ - - - - {% if page.title is defined and page.url != '//' %}{{ page.title }} | {% endif %}{{ site.title }} - {{ site.subtitle }} - {% include 'meta' %} - {% block metas %} - - - - {% endblock %} +{% extends 'app' %} - - {% block stylesheets %}{% endblock %} +{% block body %} + {% include 'layout/navbar' %} - {% for size in site.apple_touch_icon_sizes %} - - {% endfor %} +
+
+ {% block page_title_wrapper %} +

+ {% block page_title %}{{ page.title }}{% endblock %} +

+ {% endblock %} - {% for size in site.favicon_sizes %} - - {% endfor %} - - -
- + {% block content_wrapper %} + {% block content %}{% endblock %} + {% endblock %} +
- {% include 'layout/navbar' %} - -
-
- {% block page_title_wrapper %} -

- {% block page_title %}{{ page.title }}{% endblock %} -

- {% endblock %} - - {% block content_wrapper %} - {% block content %}{% endblock %} - {% endblock %} -
- - {% include 'layout/footer' %} -
-
- - {% if site.google_analytics.id %} - - {% endif %} - - - - - {% block scripts %}{% endblock %} - - + {% include 'layout/footer' %} + +{% endblock %}