diff --git a/python_docs_theme/layout.html b/python_docs_theme/layout.html
index a9a0e6f..bf4e425 100644
--- a/python_docs_theme/layout.html
+++ b/python_docs_theme/layout.html
@@ -37,6 +37,7 @@
{{ _('Navigation') }}
{{ reldelim2 }}
{%- endif %}
+ {{ themeselector() }}{{ reldelim2 }}
{% endblock %}
@@ -47,25 +48,35 @@ {{ _('Navigation') }}
{%- if builder != "htmlhelp" %}
{%- endif %}
{%- endmacro %}
+{%- macro themeselector() %}
+
+{%- endmacro %}
+
{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
-
{%- block extrahead -%}
+
{%- if builder != "htmlhelp" %}
{%- if not embedded %}
+
{%- endif -%}
{%- endif -%}
{{ super() }}
@@ -82,28 +93,30 @@ {{ _('Navigation') }}
-