mirror of
https://github.com/tchartron/blow
synced 2024-11-23 12:53:20 +00:00
update
This commit is contained in:
parent
088847c4ee
commit
c31dbb36c9
2 changed files with 3 additions and 4 deletions
|
@ -42,13 +42,12 @@ function switchTheme() {
|
|||
|
||||
function toggleSidebar() {
|
||||
let sidebar = document.getElementById('sidebar');
|
||||
sidebar.classList.remove('hidden')
|
||||
if ([...sidebar.classList].includes('translate-x-0')) {
|
||||
document.body.style.setProperty("overflow", "hidden")
|
||||
document.body.style.removeProperty("overflow")
|
||||
sidebar.classList.remove('translate-x-0')
|
||||
sidebar.classList.add('-translate-x-full')
|
||||
} else {
|
||||
document.body.style.removeProperty("overflow")
|
||||
document.body.style.setProperty("overflow", "hidden")
|
||||
sidebar.classList.remove('-translate-x-full')
|
||||
sidebar.classList.add('translate-x-0')
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0">
|
||||
<div class="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:pr-0 ml-auto">
|
||||
<button id="switch-theme" type="button" class="bg-gray-200 text-gray-800 hover:text-gray-900 dark:bg-gray-800 dark:text-gray-400 dark:hover:text-white p-1 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">
|
||||
<span class="sr-only">Switch Theme</span>
|
||||
<!-- Heroicon name: outline/light -->
|
||||
|
|
Loading…
Reference in a new issue