From bd55714984f72d7352c67fac9dbd583a55681677 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Wed, 24 Oct 2018 13:26:38 -0600 Subject: [PATCH 01/25] Deferred Blocks --- templates/partials/base.html.twig | 40 ++++++++++++++++--------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/templates/partials/base.html.twig b/templates/partials/base.html.twig index 35241a3..4cc1fcc 100644 --- a/templates/partials/base.html.twig +++ b/templates/partials/base.html.twig @@ -4,9 +4,9 @@ -{% block head %} +{% block head deferred %} - {% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }} + {% if page.title %}{{ page.title|e('html') }} | {% endif %}{{ site.title|e('html') }} @@ -14,29 +14,31 @@ +{% endblock head %} - {% block stylesheets %} - {% do assets.addCss('theme://css-compiled/spectre'~compress) %} - {% if theme_var('spectre.exp') %}{% do assets.addCss('theme://css-compiled/spectre-exp'~compress) %}{% endif %} - {% if theme_var('spectre.icons') %}{% do assets.addCss('theme://css-compiled/spectre-icons'~compress) %}{% endif %} - {% do assets.addCss('theme://css-compiled/theme'~compress) %} - {% do assets.addCss('theme://css/custom.css') %} - {% do assets.addCss('theme://css/line-awesome.min.css') %} - {% endblock %} - {{ assets.css()|raw }} +{% block stylesheets %} + {% do assets.addCss('theme://css-compiled/spectre'~compress) %} + {% if theme_var('spectre.exp') %}{% do assets.addCss('theme://css-compiled/spectre-exp'~compress) %}{% endif %} + {% if theme_var('spectre.icons') %}{% do assets.addCss('theme://css-compiled/spectre-icons'~compress) %}{% endif %} + {% do assets.addCss('theme://css-compiled/theme'~compress) %} + {% do assets.addCss('theme://css/custom.css') %} + {% do assets.addCss('theme://css/line-awesome.min.css') %} +{% endblock %} - {% block javascripts %} - {% do assets.addJs('jquery', 101) %} - {% do assets.addJs('theme://js/jquery.treemenu.js', {group:'bottom'}) %} - {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %} - {% endblock %} - {{ assets.js()|raw }} +{% block javascripts %} + {% do assets.addJs('jquery', 101) %} + {% do assets.addJs('theme://js/jquery.treemenu.js', {group:'bottom'}) %} + {% do assets.addJs('theme://js/site.js', {group:'bottom'}) %} +{% endblock %} -{% endblock head %} +{% block assets deferred %} + {{ assets.css() }} + {{ assets.js() }} +{% endblock %}
- {% block header %} + {% block header deferred %}