mirror of
https://github.com/tchartron/blow
synced 2025-02-17 05:38:26 +00:00
update
This commit is contained in:
parent
2a07f865b1
commit
dcd157bc8c
2 changed files with 9 additions and 4 deletions
|
@ -20,6 +20,9 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||||
}
|
}
|
||||||
// Switch theme action
|
// Switch theme action
|
||||||
document.getElementById('switch-theme').addEventListener('click', switchTheme);
|
document.getElementById('switch-theme').addEventListener('click', switchTheme);
|
||||||
|
|
||||||
|
// ---------------- Toggle Sidebar -------------------------
|
||||||
|
document.getElementById('toggle-sidebar').addEventListener('click', toggleSidebar);
|
||||||
});
|
});
|
||||||
|
|
||||||
function switchTheme() {
|
function switchTheme() {
|
||||||
|
@ -39,7 +42,7 @@ function switchTheme() {
|
||||||
|
|
||||||
function toggleSidebar() {
|
function toggleSidebar() {
|
||||||
let sidebar = document.getElementById('sidebar');
|
let sidebar = document.getElementById('sidebar');
|
||||||
if (sidebar.classList.includes('translate-x-0')) {
|
if ([...sidebar.classList].includes('translate-x-0')) {
|
||||||
console.log('visible')
|
console.log('visible')
|
||||||
} else {
|
} else {
|
||||||
console.log('not visible')
|
console.log('not visible')
|
||||||
|
|
|
@ -57,9 +57,11 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<!-- More ... Button (sidebar) -->
|
<!-- More ... Button (sidebar) -->
|
||||||
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
<button id="toggle-sidebar">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"></path>
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||||
</svg>
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue