Fix unneccessary sidebar button on index

This commit is contained in:
schmop 2025-09-13 23:13:27 +02:00
parent 1bba146344
commit 82d1cbd2b2
3 changed files with 5 additions and 22 deletions

View File

@ -32,19 +32,3 @@ document.addEventListener('DOMContentLoaded', () => {
updateButtonText(); updateButtonText();
}); });
}); });
/**
* -----------------------
* Sidebar toggle
* -----------------------
*/
function toggleSidebar() {
const sidebar = document.querySelector('.sidebar');
sidebar.classList.toggle('collapsed');
}
document.addEventListener('DOMContentLoaded', () => {
const button = document.querySelector('.sidebar-toggle');
button.addEventListener('click', toggleSidebar);
});

View File

@ -11,12 +11,8 @@
<header> <header>
<nav> <nav>
<ul> <ul>
{% block actions_left %}
<li> <li>
<!--<button class="sidebar-toggle" type="button">
<svg viewBox="0 0 448 512" width="100">
<path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z" />
</svg>
</button>-->
<label class="sidebar-toggler"> <label class="sidebar-toggler">
<svg viewBox="0 0 448 512" width="100"> <svg viewBox="0 0 448 512" width="100">
<path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z" /> <path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z" />
@ -24,12 +20,15 @@
<input type="checkbox" /> <input type="checkbox" />
</label> </label>
</li> </li>
{% endblock %}
<li><h3 class="mb-0">{{ title }}</h3></li> <li><h3 class="mb-0">{{ title }}</h3></li>
</ul> </ul>
<ul> <ul>
{% block actions_right %}
<li> <li>
<button type="button" class="secondary color-theme-toggle">🌙</button> <button type="button" class="secondary color-theme-toggle">🌙</button>
</li> </li>
{% endblock %}
</ul> </ul>
</nav> </nav>
</header> </header>

View File

@ -1,5 +1,5 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block actions_left %}{% endblock %}
{% block main %} {% block main %}
<h2></h2> <h2></h2>
<aside> <aside>