From 252dcdd2a3cde4573d4135ce9f7b52965efeadbd Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Tue, 3 Dec 2024 08:12:36 -0500 Subject: [PATCH] fix: Adjust summary positioning to prevent overlap and improve layout --- hugo-site/layouts/shortcodes/summary-delta-sync/sync.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hugo-site/layouts/shortcodes/summary-delta-sync/sync.html b/hugo-site/layouts/shortcodes/summary-delta-sync/sync.html index f0bc414e..4b535f6c 100644 --- a/hugo-site/layouts/shortcodes/summary-delta-sync/sync.html +++ b/hugo-site/layouts/shortcodes/summary-delta-sync/sync.html @@ -377,11 +377,13 @@ // Adjust spacing based on screen size const PEER_SPACING = window.innerWidth <= 768 ? 10 : 20; - // Calculate positions relative to container with adjusted spacing + // Position summary1 to the right of peer1 const summary1Left = (peer1Rect.right - containerRect.left) + PEER_SPACING; - const summary1Top = (peer1Rect.top - containerRect.top) + (peer1Rect.height / 2) - 20; + const summary1Top = (peer1Rect.top - containerRect.top) + (peer1Rect.height / 2) - 40; + + // Position summary2 to the left of peer2 const summary2Left = (peer2Rect.left - containerRect.left) - summary2.offsetWidth - PEER_SPACING; - const summary2Top = (peer2Rect.top - containerRect.top) + (peer2Rect.height / 2) + 20; + const summary2Top = (peer2Rect.top - containerRect.top) + (peer2Rect.height / 2) + 40; console.log('Calculated positions:', { summary1Left,