diff --git a/stirling-pdf/src/main/resources/templates/fragments/common.html b/stirling-pdf/src/main/resources/templates/fragments/common.html index 2e9ff4404..a4e33f580 100644 --- a/stirling-pdf/src/main/resources/templates/fragments/common.html +++ b/stirling-pdf/src/main/resources/templates/fragments/common.html @@ -77,6 +77,8 @@ navbar.classList.remove('navbar-expand-lg'); } + navbar.style.overflowX = 'hidden'; + console.log('DPR:', currentDPR, 'isHighDPI:', isHighDPI, 'baseScale:', baseScale, 'navScale:', navScale, 'effective width:', effectiveWidth); } @@ -94,6 +96,7 @@ let lastDPR = window.devicePixelRatio; document.addEventListener('DOMContentLoaded', scaleNav); + window.addEventListener('resize', scaleNav); setInterval(() => { const currentDPR = window.devicePixelRatio; diff --git a/stirling-pdf/src/main/resources/templates/home.html b/stirling-pdf/src/main/resources/templates/home.html index e93293a98..6047338cc 100644 --- a/stirling-pdf/src/main/resources/templates/home.html +++ b/stirling-pdf/src/main/resources/templates/home.html @@ -9,7 +9,7 @@
-
+

@@ -237,7 +237,7 @@ const tallScreenBonus = Math.max(0, (1.8 - aspectRatio) * 0.15); // More bonus for taller screens let finalS = Math.min(s * 0.75, (space * (0.98 + tallScreenBonus)) / origH); - finalS = Math.max(0.7, finalS); + finalS = Math.max(0.7, Math.min(1.0, finalS)); // Never scale above 100% el.style.transform = `scale(${finalS})`; el.style.transformOrigin = 'top center';