Skip to content

Commit

Permalink
fix: Adjust summary positioning to prevent overlap on mobile and desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Dec 3, 2024
1 parent 2be1554 commit 5712b85
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hugo-site/layouts/shortcodes/summary-delta-sync/sync.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 5712b85

Please sign in to comment.