]> git.proxmox.com Git - proxmox-backup.git/commitdiff
docs: html: adapt sidebar in index page
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 24 Sep 2020 17:40:28 +0000 (19:40 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 24 Sep 2020 17:41:19 +0000 (19:41 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
docs/_templates/index-sidebar.html [new file with mode: 0644]
docs/_templates/sidebar-header.html [new file with mode: 0644]
docs/conf.py

diff --git a/docs/_templates/index-sidebar.html b/docs/_templates/index-sidebar.html
new file mode 100644 (file)
index 0000000..45e0635
--- /dev/null
@@ -0,0 +1,11 @@
+<h3>Navigation</h3>
+{{ toctree(includehidden=theme_sidebar_includehidden, collapse=True, titles_only=True) }}
+{% if theme_extra_nav_links %}
+<hr />
+<h3>Links</h3>
+<ul>
+    {% for text, uri in theme_extra_nav_links.items() %}
+    <li class="toctree-l1"><a href="{{ uri }}">{{ text }}</a></li>
+    {% endfor %}
+</ul>
+{% endif %}
diff --git a/docs/_templates/sidebar-header.html b/docs/_templates/sidebar-header.html
new file mode 100644 (file)
index 0000000..c695c85
--- /dev/null
@@ -0,0 +1,6 @@
+ <p class="logo">
+    <a href="index.html">
+        <img class="logo" src="_static/proxmox-logo.svg" alt="Logo">
+    </a>
+</p>
+<hr style="width:100%;">
index 1666a3543d3e6a62a535ee45f763be65c0f3d81d..fc1631c22a6a9dc9be7ec5a1f697c1fd3166c12f 100644 (file)
@@ -181,6 +181,24 @@ html_theme_options = {
     'font_family': 'Open Sans, sans-serif',
 }
 
+# Alabaster theme recommends setting this fixed.
+# If you switch theme this needs to removed, probably.
+html_sidebars = {
+    '**': [
+        'sidebar-header.html',
+        'searchbox.html',
+        'navigation.html',
+        'relations.html',
+    ],
+
+    'index': [
+        'sidebar-header.html',
+        'searchbox.html',
+        'index-sidebar.html',
+    ]
+}
+
+
 # Add any paths that contain custom themes here, relative to this directory.
 # html_theme_path = []
 
@@ -226,10 +244,6 @@ html_static_path = ['_static']
 #
 # html_use_smartypants = True
 
-# Custom sidebar templates, maps document names to template names.
-#
-# html_sidebars = {}
-
 # Additional templates that should be rendered to pages, maps page names to
 # template names.
 #