Added support for disabling footer navigation

This commit is contained in:
squidfunk
2022-11-12 14:44:59 +01:00
parent 128e26742c
commit 8fdd1ad529
9 changed files with 105 additions and 100 deletions

View File

@@ -138,7 +138,7 @@
<div class="md-container" data-md-component="container"> <div class="md-container" data-md-component="container">
{% block hero %}{% endblock %} {% block hero %}{% endblock %}
{% block tabs %} {% block tabs %}
{% if not "navigation.tabs.sticky" in features %} {% if "navigation.tabs.sticky" not in features %}
{% if "navigation.tabs" in features %} {% if "navigation.tabs" in features %}
{% include "partials/tabs.html" %} {% include "partials/tabs.html" %}
{% endif %} {% endif %}
@@ -159,7 +159,7 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% if not "toc.integrate" in features %} {% if "toc.integrate" not in features %}
{% if page.meta and page.meta.hide %} {% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "toc" in page.meta.hide %} {% set hidden = "hidden" if "toc" in page.meta.hide %}
{% endif %} {% endif %}

View File

@@ -16,7 +16,7 @@
{% if not actions %} {% if not actions %}
{% set actions = ["accept", "manage"] %} {% set actions = ["accept", "manage"] %}
{% endif %} {% endif %}
{% if not "manage" in actions %} {% if "manage" not in actions %}
{% set checked = "checked" %} {% set checked = "checked" %}
{% endif %} {% endif %}
<h4>{{ config.extra.consent.title }}</h4> <h4>{{ config.extra.consent.title }}</h4>

View File

@@ -5,7 +5,7 @@
{% include "partials/tags.html" %} {% include "partials/tags.html" %}
{% endif %} {% endif %}
{% include "partials/actions.html" %} {% include "partials/actions.html" %}
{% if not "\x3ch1" in page.content %} {% if "\x3ch1" not in page.content %}
<h1>{{ page.title | d(config.site_name, true)}}</h1> <h1>{{ page.title | d(config.site_name, true)}}</h1>
{% endif %} {% endif %}
{{ page.content }} {{ page.content }}

View File

@@ -2,6 +2,7 @@
This file was automatically generated - do not edit This file was automatically generated - do not edit
-#} -#}
<footer class="md-footer"> <footer class="md-footer">
{% if "navigation.footer" in features %}
{% if page.previous_page or page.next_page %} {% if page.previous_page or page.next_page %}
{% if page.meta and page.meta.hide %} {% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "footer" in page.meta.hide %} {% set hidden = "hidden" if "footer" in page.meta.hide %}
@@ -41,6 +42,7 @@
{% endif %} {% endif %}
</nav> </nav>
{% endif %} {% endif %}
{% endif %}
<div class="md-footer-meta md-typeset"> <div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid"> <div class="md-footer-meta__inner md-grid">
{% include "partials/copyright.html" %} {% include "partials/copyright.html" %}

View File

@@ -45,6 +45,7 @@ theme:
- content.tooltips - content.tooltips
# - header.autohide # - header.autohide
# - navigation.expand # - navigation.expand
- navigation.footer
- navigation.indexes - navigation.indexes
# - navigation.instant # - navigation.instant
# - navigation.prune # - navigation.prune

View File

@@ -263,7 +263,7 @@
<!-- Navigation tabs (collapsing) --> <!-- Navigation tabs (collapsing) -->
{% block tabs %} {% block tabs %}
{% if not "navigation.tabs.sticky" in features %} {% if "navigation.tabs.sticky" not in features %}
{% if "navigation.tabs" in features %} {% if "navigation.tabs" in features %}
{% include "partials/tabs.html" %} {% include "partials/tabs.html" %}
{% endif %} {% endif %}
@@ -297,7 +297,7 @@
{% endif %} {% endif %}
<!-- Table of contents --> <!-- Table of contents -->
{% if not "toc.integrate" in features %} {% if "toc.integrate" not in features %}
{% if page.meta and page.meta.hide %} {% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "toc" in page.meta.hide %} {% set hidden = "hidden" if "toc" in page.meta.hide %}
{% endif %} {% endif %}

View File

@@ -40,7 +40,7 @@
{% endif %} {% endif %}
<!-- Determine initial settings state --> <!-- Determine initial settings state -->
{% if not "manage" in actions %} {% if "manage" not in actions %}
{% set checked = "checked" %} {% set checked = "checked" %}
{% endif %} {% endif %}

View File

@@ -32,7 +32,7 @@
Hack: check whether the content contains a h1 headline. If it doesn't, the Hack: check whether the content contains a h1 headline. If it doesn't, the
page title (or respectively site name) is used as the main headline. page title (or respectively site name) is used as the main headline.
--> -->
{% if not "\x3ch1" in page.content %} {% if "\x3ch1" not in page.content %}
<h1>{{ page.title | d(config.site_name, true)}}</h1> <h1>{{ page.title | d(config.site_name, true)}}</h1>
{% endif %} {% endif %}

View File

@@ -24,6 +24,7 @@
<footer class="md-footer"> <footer class="md-footer">
<!-- Link to previous and/or next page --> <!-- Link to previous and/or next page -->
{% if "navigation.footer" in features %}
{% if page.previous_page or page.next_page %} {% if page.previous_page or page.next_page %}
{% if page.meta and page.meta.hide %} {% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "footer" in page.meta.hide %} {% set hidden = "hidden" if "footer" in page.meta.hide %}
@@ -81,6 +82,7 @@
{% endif %} {% endif %}
</nav> </nav>
{% endif %} {% endif %}
{% endif %}
<!-- Further information --> <!-- Further information -->
<div class="md-footer-meta md-typeset"> <div class="md-footer-meta md-typeset">