your personal website on atproto - mirror blento.app

test 2

+5 -5
+5 -5
src/lib/cards/GitHubContributorsCard/GitHubContributorsCard.svelte
··· 59 59 60 60 const GAP = 6; 61 61 const MIN_SIZE = 16; 62 - const MAX_SIZE = 80; 62 + const MAX_SIZE = 120; 63 63 64 64 function hexCapacity(size: number, availW: number, availH: number): number { 65 65 const colsWide = Math.floor((availW + GAP) / (size + GAP)); ··· 89 89 90 90 while (lo <= hi) { 91 91 const mid = Math.floor((lo + hi) / 2); 92 - const availW = containerWidth - (layout === 'hex' ? mid : 0); 93 - const availH = containerHeight - (layout === 'hex' ? mid : 0); 92 + const availW = containerWidth - (layout === 'hex' ? mid / 2 : 0); 93 + const availH = containerHeight - (layout === 'hex' ? mid / 2 : 0); 94 94 if (availW <= 0 || availH <= 0) { 95 95 hi = mid - 1; 96 96 continue; ··· 105 105 return Math.max(MIN_SIZE, hi); 106 106 }); 107 107 108 - let padding = $derived(layout === 'hex' ? computedSize / 2 : 0); 108 + let padding = $derived(layout === 'hex' ? computedSize / 4 : 0); 109 109 110 110 let rows = $derived.by(() => { 111 - const availW = containerWidth - (layout === 'hex' ? computedSize : 0); 111 + const availW = containerWidth - (layout === 'hex' ? computedSize / 4 : 0); 112 112 if (availW <= 0) return [] as GitHubContributor[][]; 113 113 114 114 const colsWide = Math.floor((availW + GAP) / (computedSize + GAP));