From 5712b85dccbd715f6c4071005593a72d2dd0d527 Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Tue, 3 Dec 2024 08:10:11 -0500 Subject: [PATCH] fix: Adjust summary positioning to prevent overlap on mobile and desktop --- .../layouts/shortcodes/summary-delta-sync/sync.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hugo-site/layouts/shortcodes/summary-delta-sync/sync.html b/hugo-site/layouts/shortcodes/summary-delta-sync/sync.html index efdbce4c..611b99b6 100644 --- a/hugo-site/layouts/shortcodes/summary-delta-sync/sync.html +++ b/hugo-site/layouts/shortcodes/summary-delta-sync/sync.html @@ -68,8 +68,9 @@ } @media (max-width: 768px) { .summary-display, .delta-display { - width: 90px; - padding: 0.5rem; + width: 80px; + padding: 0.4rem; + font-size: 0.8rem; } } .summary-display { @@ -378,9 +379,9 @@ // Calculate positions relative to container with adjusted spacing const summary1Left = (peer1Rect.right - containerRect.left) + PEER_SPACING; - const summary1Top = (peer1Rect.top - containerRect.top) + (peer1Rect.height / 2); + const summary1Top = (peer1Rect.top - containerRect.top) + (peer1Rect.height / 2) - 20; const summary2Left = (peer2Rect.left - containerRect.left) - summary2.offsetWidth - PEER_SPACING; - const summary2Top = (peer2Rect.top - containerRect.top) + (peer2Rect.height / 2) + (window.innerWidth <= 768 ? 10 : 0); + const summary2Top = (peer2Rect.top - containerRect.top) + (peer2Rect.height / 2) + 20; console.log('Calculated positions:', { summary1Left,