diff options
| author | 2026-01-03 20:41:07 +0700 | |
|---|---|---|
| committer | 2026-01-03 20:41:07 +0700 | |
| commit | c8e542e883c8fec8b4a101bcd55c4d771b377e80 (patch) | |
| tree | 26ec381d0d8040d583153223d4dfcebb13287c84 /views/pages | |
| parent | 05d7fe78450219e85ebe9c4372a20f8edd264d8d (diff) | |
| download | web-c8e542e883c8fec8b4a101bcd55c4d771b377e80.tar.gz web-c8e542e883c8fec8b4a101bcd55c4d771b377e80.zip | |
feat: nextstep-like buttons for toolbar
Diffstat (limited to 'views/pages')
| -rw-r--r-- | views/pages/global-map.html | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/views/pages/global-map.html b/views/pages/global-map.html index 306f442..c13a5f4 100644 --- a/views/pages/global-map.html +++ b/views/pages/global-map.html @@ -42,23 +42,25 @@ } </script> - <div id="sidebar" class="bg-sidebar block fixed shadow-[0_0_0.4rem_black] z-1001 w-[5rem] h-auto"> + <div id="sidebar" class="bg-sidebar block fixed shadow-[0_0_0.4rem_black] z-1001 w-fit h-auto"> <div class="text-[3rem] text-stroke-(--sidebar-stroke-color) text-stroke-[0.1dvw] flex flex-col gap-0 relative z-1001"> - <a href="./" class="w-[5rem] h-[5rem]"> - <i class="fas fa-circle-left flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i> + <a href="./" class="toolbar-button w-fit h-fit" draggable="false"> + <i class="fas fa-circle-left flex w-18 h-18 content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i> </a> - <a href="/{{ .Lang }}" class="w-[5rem] h-[5rem]"> - <i class="fas fa-home flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i> + <a href="/{{ .Lang }}" class="toolbar-button w-fit h-fit" draggable="false"> + <i class="fas fa-home flex w-18 h-18 content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i> </a> - <a href="/{{ .Lang }}/blog" class="w-[5rem] h-[5rem]"> - <i class="fas fa-search flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i> + <a href="/{{ .Lang }}/blog" class="toolbar-button w-fit h-fit" draggable="false"> + <i class="fas fa-search flex w-18 h-18 content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i> </a> - <a href="/{{ .Lang }}/map" class="w-[5rem] h-[5rem]"> - <i class="fas fa-map flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i> + <a href="/{{ .Lang }}/map" class="toolbar-button w-fit h-fit" draggable="false"> + <i class="fas fa-map flex w-18 h-18 content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i> </a> - <i onclick="toggleThemeWheel();" id="theme-button" class="fas fa-swatchbook flex w-[5rem] h-[5rem] content-center text-center text-sidebar hover:bg-background-dark cursor-pointer transition-colors duration-300 rounded-lg"></i> - <a href="/{{ .Lang }}/user" id="sidebar-user-button" class="w-[5rem] h-[5rem]"> - <i onclick="return changeUrl('/{{ .Lang }}/user');" class="fas fa-user flex w-full h-full content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i> + <div id="toolbar-theme-button" onclick="toggleThemeWheel();" class="toolbar-button w-fit h-fit" draggable="false"> + <i id="toolbar-theme-button-content" class="fas fa-swatchbook flex w-18 h-18 content-center text-center text-sidebar hover:bg-background-dark cursor-pointer transition-colors duration-300 rounded-lg"></i> + </div> + <a href="/{{ .Lang }}/user" id="sidebar-user-button" class="toolbar-button w-fit h-fit" draggable="false"> + <i onclick="return changeUrl('/{{ .Lang }}/user');" class="fas fa-user flex w-18 h-18 content-center text-center text-sidebar hover:bg-background-dark transition-colors duration-300 rounded-lg"></i> </a> </div> <div class="theme-wheel" id="theme-wheel"> @@ -79,7 +81,7 @@ <script> const themeWheel = document.getElementById('theme-wheel'); - const themeButton = document.getElementById('theme-button'); + const themeButton = document.getElementById('toolbar-theme-button'); const themeIcons = document.querySelectorAll('.theme-icon'); const themeWheelRadius = convertRemToPixels(6); @@ -195,7 +197,7 @@ themeWheel.addEventListener('mouseleave', hideThemeWheel); document.addEventListener('click', (e) => { - if (!themeWheel.contains(e.target) && e.target !== themeButton) { + if (!themeWheel.contains(e.target) && e.target !== themeButton && !e.target.classList.contains("toolbar-theme-button-content")) { hideThemeWheel(); } }); |