tangled
alpha
login
or
join now
flo-bit.dev
/
blento
your personal website on atproto - mirror
blento.app
20
fork
atom
overview
issues
pulls
pipelines
test 2
jycouet
1 week ago
04eb63a7
0e4a4935
+5
-5
1 changed file
expand all
collapse all
unified
split
src
lib
cards
GitHubContributorsCard
GitHubContributorsCard.svelte
+5
-5
src/lib/cards/GitHubContributorsCard/GitHubContributorsCard.svelte
···
59
59
60
60
const GAP = 6;
61
61
const MIN_SIZE = 16;
62
62
-
const MAX_SIZE = 80;
62
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
92
-
const availW = containerWidth - (layout === 'hex' ? mid : 0);
93
93
-
const availH = containerHeight - (layout === 'hex' ? mid : 0);
92
92
+
const availW = containerWidth - (layout === 'hex' ? mid / 2 : 0);
93
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
108
-
let padding = $derived(layout === 'hex' ? computedSize / 2 : 0);
108
108
+
let padding = $derived(layout === 'hex' ? computedSize / 4 : 0);
109
109
110
110
let rows = $derived.by(() => {
111
111
-
const availW = containerWidth - (layout === 'hex' ? computedSize : 0);
111
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));