aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-12-22 00:35:27 +0100
committerAlex Auvolat <alex@adnab.me>2022-12-22 00:35:27 +0100
commit0e95d0d7b43df2c696662098722227f62bfb124d (patch)
treeb35f06091e63d857c55c5f4fd822764c657b64bf /templates
parent719c8cf49309890ad82ef0cf9b87aeed299b6777 (diff)
downloadguide.deuxfleurs.fr-0e95d0d7b43df2c696662098722227f62bfb124d.tar.gz
guide.deuxfleurs.fr-0e95d0d7b43df2c696662098722227f62bfb124d.zip
Tentative 2: navigation sur mobile
Diffstat (limited to 'templates')
-rw-r--r--templates/_nav.html8
-rw-r--r--templates/index.html22
2 files changed, 15 insertions, 15 deletions
diff --git a/templates/_nav.html b/templates/_nav.html
index 3bfda07..b05e472 100644
--- a/templates/_nav.html
+++ b/templates/_nav.html
@@ -133,9 +133,15 @@
{% set root_path = hierarchy | nth(n=0) %}
{% set root = get_section(path=root_path) %}
+
+ <input id="menu-toggle" type="checkbox" />
+ <label class='menu-button-container' for="menu-toggle">
+ <div class="menu-button"></div>
+ <div class="toc-item toc-menu-title subtext">{{ root.title }}</div>
+ </label>
+
<div class="toc-item toc-section">
<a class="subtext" href="{{root.permalink | safe}}">{{ root.title }}</a>
</div>
-
{{ nav::navsection(hierarchy=hierarchy,level=0,current=current) }}
{% endmacro %}
diff --git a/templates/index.html b/templates/index.html
index a00a979..fd4e9bf 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -26,21 +26,15 @@
<main>
{% block mainnav %}
- {% if page.ancestors or section.ancestors %}
- <input id="menu-toggle" type="checkbox" {% if section.subsections or section.pages %}checked{% endif %} />
- <label class='menu-button-container' for="menu-toggle">
- <div class='menu-button'></div>
- </label>
- <div class="toc" id="navigation">
- <div class="toc-sticky">
- {% if page %}
- {{ nav::navmenu(current=page) }}
- {% else %}
- {{ nav::navmenu(current=section) }}
- {% endif %}
- </div>
+ <div class="toc {% if page.ancestors or section.ancestors %}{% else %}toc-homepage{% endif %}">
+ <div class="toc-sticky">
+ {% if page %}
+ {{ nav::navmenu(current=page) }}
+ {% else %}
+ {{ nav::navmenu(current=section) }}
+ {% endif %}
</div>
- {% endif %}
+ </div>
{% endblock mainnav %}
<div class="content text">