diff --git a/public/index.html b/public/index.html index 1675b29..5374f82 100644 --- a/public/index.html +++ b/public/index.html @@ -2696,18 +2696,53 @@ ); } - // Modern Layout (default) - Compact single-screen design + // Modern Layout (default) - Compact single-screen design with viewport scaling + + // Calculate scale factor to fit content in viewport + const [scale, setScale] = useState(1); + + useEffect(() => { + const calculateScale = () => { + const minHeight = 900; // Design height + const minWidth = 1400; // Design width + const vh = window.innerHeight; + const vw = window.innerWidth; + + const scaleH = vh / minHeight; + const scaleW = vw / minWidth; + const newScale = Math.min(scaleH, scaleW, 1); // Never scale above 1 + + setScale(Math.max(newScale, 0.5)); // Minimum 50% scale + }; + + calculateScale(); + window.addEventListener('resize', calculateScale); + return () => window.removeEventListener('resize', calculateScale); + }, []); + return (
+
{/* TOP BAR - spans full width */}
+
{/* Settings Panel */}