From ccc48f6e5a69a8ea582087bad1e76e8ca48286f6 Mon Sep 17 00:00:00 2001 From: juanatsap Date: Wed, 12 Nov 2025 14:18:13 +0000 Subject: [PATCH] fix: remove dynamic height logic that was breaking footer visibility The dynamic height adjustment was setting a fixed height on .cv-paper, but the footer is a sibling element OUTSIDE .cv-paper in the DOM. This caused the footer to be positioned incorrectly and hidden. Removed: - dataset.originalHeight storage - height calculation and setting - All dynamic height adjustment logic The CSS transform: scale() will handle the visual zoom without affecting the natural document flow, allowing the footer to appear properly after the content. Result: Footer should now be visible at all zoom levels --- static/js/main.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/static/js/main.js b/static/js/main.js index 08b51fa..cab7295 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -334,22 +334,9 @@ // Store current scroll position const oldScrollTop = window.pageYOffset || document.documentElement.scrollTop; - // Get the natural height before any transform - if (!cvPaper.dataset.originalHeight) { - // Store original height on first zoom - cvPaper.style.transform = 'scale(1)'; - cvPaper.dataset.originalHeight = cvPaper.scrollHeight; - } - - const originalHeight = parseInt(cvPaper.dataset.originalHeight); - // Apply the new scale cvPaper.style.transform = `scale(${newScale})`; - // Adjust the container height to match the scaled content - // This prevents empty space when zooming out and content overflow when zooming in - cvPaper.style.height = `${originalHeight * newScale}px`; - // Calculate proportional scroll position to maintain visual position // If zooming from 100% to 50%, content at pixel 1000 moves to pixel 500 // So we need to scroll to pixel 500 to see the same content