From: Danilo M. Date: Tue, 21 Apr 2026 21:40:09 +0000 (+0200) Subject: fix: correct padding calculation and remove flex classes in spiral layout X-Git-Tag: release_22042026-1342~23 X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=a110f125bbec56034a5254253257fb22bfd1daec;p=danix.xyz-2.git 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 --- 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'; }); });