diff options
| author | Danilo M. <danix@danix.xyz> | 2026-04-21 23:40:09 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-04-21 23:40:09 +0200 |
| commit | a110f125bbec56034a5254253257fb22bfd1daec (patch) | |
| tree | 4dd969c065205ae3173ca5bad3e470ee2272ab61 /themes | |
| parent | 740506603dc9be03c3337dfa469d79e27c45fbbf (diff) | |
| download | danixxyz-a110f125bbec56034a5254253257fb22bfd1daec.tar.gz danixxyz-a110f125bbec56034a5254253257fb22bfd1daec.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/danix-xyz-hacker/assets/js/tag-cloud-spiral.js | 7 |
1 files changed, 4 insertions, 3 deletions
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'; }); }); |
