From a110f125bbec56034a5254253257fb22bfd1daec Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 21 Apr 2026 23:40:09 +0200 Subject: fix: correct padding calculation and remove flex classes in spiral layout - Issue #1: Fix padding calculation from 48px to 32px (2rem). Tags normalized to y=16px (top), so add 32px bottom padding = 16+32=48px total height buffer after normalization - Issue #2: Explicitly remove flex and flex-wrap classes via classList.remove() to properly clean DOM when switching to absolute positioning Co-Authored-By: Claude Haiku 4.5 --- themes/danix-xyz-hacker/assets/js/tag-cloud-spiral.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'themes/danix-xyz-hacker/assets/js') diff --git a/themes/danix-xyz-hacker/assets/js/tag-cloud-spiral.js b/themes/danix-xyz-hacker/assets/js/tag-cloud-spiral.js index 6965565..9f8b7b4 100644 --- a/themes/danix-xyz-hacker/assets/js/tag-cloud-spiral.js +++ b/themes/danix-xyz-hacker/assets/js/tag-cloud-spiral.js @@ -44,9 +44,10 @@ document.addEventListener('DOMContentLoaded', function () { return { w: rect.width, h: rect.height }; }); - // Switch container to relative positioning + // Switch container to relative positioning and remove flex layout container.style.position = 'relative'; container.style.display = 'block'; + container.classList.remove('flex', 'flex-wrap'); var padding = 8; // px gap between tags var aStep = 0.3; // radians per spiral step @@ -115,7 +116,7 @@ document.addEventListener('DOMContentLoaded', function () { } }); - // Set container height to fit all tags + 2rem bottom padding - container.style.height = (maxBottom - minTop + 48) + 'px'; + // Set container height to fit all tags + 2rem bottom padding (32px) + container.style.height = (maxBottom - minTop + 32) + 'px'; }); }); -- cgit v1.2.3