From 1801fda8e028ae1ba788de5baeca490ca2bf53a6 Mon Sep 17 00:00:00 2001 From: Pedro Moreno Date: Mon, 20 Feb 2023 21:33:03 +0100 Subject: [PATCH] Simplified check if sidebar is true --- templates/blog.html.twig | 2 -- templates/default.html.twig | 2 -- templates/item.html.twig | 4 +--- templates/modular.html.twig | 2 -- templates/partials/base.html.twig | 4 +++- templates/portfolio.html.twig | 6 ++---- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/templates/blog.html.twig b/templates/blog.html.twig index 10e0010..d5ae096 100755 --- a/templates/blog.html.twig +++ b/templates/blog.html.twig @@ -68,7 +68,5 @@ {% endblock %} {% block sidebar %} - {% if show_sidebar == true %} {% include 'partials/sidebar_left.html.twig' %} - {% endif %} {% endblock %} diff --git a/templates/default.html.twig b/templates/default.html.twig index 88e8210..391a2ed 100755 --- a/templates/default.html.twig +++ b/templates/default.html.twig @@ -45,7 +45,5 @@ {% endblock %} {% block sidebar %} - {% if show_sidebar == true %} {% include 'partials/sidebar_left.html.twig' %} - {% endif %} {% endblock %} diff --git a/templates/item.html.twig b/templates/item.html.twig index 266f517..a1b7162 100755 --- a/templates/item.html.twig +++ b/templates/item.html.twig @@ -34,7 +34,5 @@ {% endblock %} {% block sidebar %} - {% if show_sidebar == true %} - {% include 'partials/sidebar_left.html.twig' %} - {% endif %} + {% include 'partials/sidebar_left.html.twig' %} {% endblock %} diff --git a/templates/modular.html.twig b/templates/modular.html.twig index 6a99e5a..dbba848 100755 --- a/templates/modular.html.twig +++ b/templates/modular.html.twig @@ -41,7 +41,5 @@ {% endblock %} {% block sidebar %} - {% if show_sidebar == true %} {% include 'partials/sidebar_left.html.twig' %} - {% endif %} {% endblock %} diff --git a/templates/partials/base.html.twig b/templates/partials/base.html.twig index f55c5a5..066d9f6 100644 --- a/templates/partials/base.html.twig +++ b/templates/partials/base.html.twig @@ -55,7 +55,9 @@
{% block content %}{% endblock %}
- {% block sidebar %}{% endblock %} + {% if show_sidebar == true %} + {% block sidebar %}{% endblock %} + {% endif %} {% endblock %} {% endblock %} diff --git a/templates/portfolio.html.twig b/templates/portfolio.html.twig index d4703fc..d96506d 100755 --- a/templates/portfolio.html.twig +++ b/templates/portfolio.html.twig @@ -76,9 +76,7 @@ {% endblock %} {% block sidebar %} - {% if show_sidebar == true %} - {% include 'partials/sidebar_left.html.twig' %} - {% endif %} + {% include 'partials/sidebar_left.html.twig' %} {% endblock %} {% block javascripts %} @@ -99,7 +97,7 @@ preload: {{ page.header.preload }}, dragAutoSnap: {{ page.header.dragAuto }}, moreText: '{{ page.header.more_text }}', - startAt: {{ page.header.startAt }}, + {% if page.header.startAt is defined %}startAt: {{ page.header.startAt }},{% endif %} moreLength: {{page.header.more_length}} }); {% endset %}