From a956abd65a56653809559ce1582ee89a753edcd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 9 Mar 2015 13:29:51 +0100 Subject: [PATCH] Only display sidebar/tab if there are components within If sidebar is present but tabs not or vice versa, it will be blown up to 100% width. --- src/octoprint/templates/index.jinja2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/octoprint/templates/index.jinja2 b/src/octoprint/templates/index.jinja2 index e9d7b9e9..d7b85295 100644 --- a/src/octoprint/templates/index.jinja2 +++ b/src/octoprint/templates/index.jinja2 @@ -38,7 +38,8 @@
-
+ {% if templates.sidebar.order %} +
{% for key in templates.sidebar.order %} {% set entry, data = templates.sidebar.entries[key] %} {% if "custom_bindings" not in data or data["custom_bindings"] %}{% endif %} @@ -67,9 +68,11 @@ {% if "custom_bindings" not in data or data["custom_bindings"] %}{% endif %} {% endfor %}
+ {% endif %} -
+ {% if templates.tab.order %} +
+ {% endif %}