From f9ce37b6d0e1852bf353f440a748fd3c4209d49d Mon Sep 17 00:00:00 2001 From: juanatsap Date: Wed, 19 Nov 2025 09:29:10 +0000 Subject: [PATCH] fix: Apply at-bottom color to ALL buttons consistently **Issue**: Only info and shortcuts buttons were showing orange color when scrolled to bottom of page. Download PDF, Print Friendly, and Color Theme buttons were missing this visual feedback. **Fix**: 1. Added all buttons to at-bottom class logic in utils._hs: - #download-button - #print-friendly-button - .color-theme-switcher 2. Added CSS .at-bottom styles for missing buttons: - .download-btn.at-bottom - .print-friendly-btn.at-bottom - .color-theme-switcher.at-bottom **Result**: All fixed buttons now show unified orange (#f39c12) background when page is scrolled to bottom (within 50px), providing consistent visual feedback across all controls. Files changed: - static/hyperscript/utils._hs: Added 3 buttons to scroll handler - static/css/main.css: Added 2 .at-bottom styles - static/css/color-theme.css: Added 1 .at-bottom style --- static/css/color-theme.css | 6 ++++++ static/css/main.css | 10 ++++++++++ static/hyperscript/utils._hs | 6 ++++++ 3 files changed, 22 insertions(+) diff --git a/static/css/color-theme.css b/static/css/color-theme.css index a7e8b64..46e1194 100644 --- a/static/css/color-theme.css +++ b/static/css/color-theme.css @@ -199,6 +199,12 @@ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); } +/* At-bottom state - unified orange for all theme modes */ +.color-theme-switcher.at-bottom { + opacity: 1; + background: #f39c12 !important; /* Orange when at bottom */ +} + .color-theme-switcher iconify-icon { color: white !important; transition: color 0.3s ease; diff --git a/static/css/main.css b/static/css/main.css index 23a57bc..c89874a 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -4147,6 +4147,11 @@ html { color: #27ae60; /* Green icon on hover */ } +.print-friendly-btn.at-bottom { + opacity: 1; + background: #f39c12; /* Orange when at bottom */ +} + /* Download Button (TOP POSITION) */ .download-btn { position: fixed; @@ -4190,6 +4195,11 @@ html { filter: brightness(0) invert(1); /* Keep white on hover */ } +.download-btn.at-bottom { + opacity: 1; + background: #f39c12; /* Orange when at bottom */ +} + /* Mobile adjustments */ @media (max-width: 768px) { .shortcuts-btn { diff --git a/static/hyperscript/utils._hs b/static/hyperscript/utils._hs index 946e5f8..0bd2847 100644 --- a/static/hyperscript/utils._hs +++ b/static/hyperscript/utils._hs @@ -114,12 +114,18 @@ def handleScroll() add .at-bottom to #back-to-top add .at-bottom to #info-button add .at-bottom to #shortcuts-button + add .at-bottom to #download-button + add .at-bottom to #print-friendly-button + add .at-bottom to .color-theme-switcher end if not isAtBottom remove .at-bottom from #back-to-top remove .at-bottom from #info-button remove .at-bottom from #shortcuts-button + remove .at-bottom from #download-button + remove .at-bottom from #print-friendly-button + remove .at-bottom from .color-theme-switcher end -- Update last scroll position