+ {#if main}
{/if}
-
{#each grid as s, i}
-
-
- {#if s}
{/if} +
-
+ {#if s}
{/if}
{/each}
- {#if friend}
{/if}
+
diff --git a/src/lib/components/reps/WeaponRep.svelte b/src/lib/components/reps/WeaponRep.svelte
index 602d4f6d..f7d6569b 100644
--- a/src/lib/components/reps/WeaponRep.svelte
+++ b/src/lib/components/reps/WeaponRep.svelte
@@ -1,19 +1,21 @@
+ {#if friend}
{/if}
{/if}
-
- {#if mainhand}
{/if}
+
diff --git a/src/themes/_rep.scss b/src/themes/_rep.scss
index 7be80597..bb49e61d 100644
--- a/src/themes/_rep.scss
+++ b/src/themes/_rep.scss
@@ -2,29 +2,35 @@
// Keep grid and aspect utilities in one place for consistency.
@mixin aspect($w, $h) {
- // Use calc to avoid unit issues and keep intent clear.
- aspect-ratio: calc(#{$w} / #{$h});
+ // Use calc to avoid unit issues and keep intent clear.
+ aspect-ratio: calc(#{$w} / #{$h});
}
@mixin grid($rows, $cols, $gap) {
- display: grid;
- grid-template-rows: repeat(#{$rows}, 1fr);
- grid-template-columns: repeat(#{$cols}, 1fr);
- gap: $gap;
+ display: grid;
+ grid-template-rows: repeat(#{$rows}, 1fr);
+ grid-template-columns: repeat(#{$cols}, 1fr);
+ gap: $gap;
}
// Common proportions and ratios for reps
// Chosen to match legacy visual geometry without redesign.
-$rep-body-ratio: 1.95; // width / height for GridRep body; ensures no content cut-off
+$rep-body-ratio: 2.03; // width / height for GridRep body; ensures no content cut-off
// Column proportions for weapon/summon layouts
$weapon-cols-proportion: 3.55; // mainhand : grid width proportion (1 : 3.55)
$summon-cols-proportion: 2.25; // main : grid width proportion (1 : 2.25)
// Aspect pairs (w, h) for key cells
-$weapon-main-w: 73; $weapon-main-h: 153;
-$weapon-cell-w: 280; $weapon-cell-h: 160;
-$summon-main-w: 56; $summon-main-h: 97;
-$summon-cell-w: 184; $summon-cell-h: 138;
-$char-protag-w: 32; $char-protag-h: 66;
-$char-cell-w: 16; $char-cell-h: 33;
+$weapon-main-w: 73;
+$weapon-main-h: 153;
+$weapon-cell-w: 280;
+$weapon-cell-h: 160;
+$summon-main-w: 56;
+$summon-main-h: 97;
+$summon-cell-w: 184;
+$summon-cell-h: 138;
+$char-protag-w: 32;
+$char-protag-h: 66;
+$char-cell-w: 16;
+$char-cell-h: 33;
+ {#if mainhand}
{/if}
- -
- {#each grid as w, i}
-
-
- {#if w}
{/if} -
+ -
+ {#if w}
{/if} +
+ {/each}
+
+ {#each Array.from( { length: 3 }, (_, rowIndex) => grid.slice(rowIndex * 3, (rowIndex + 1) * 3) ) as row, rowIndex}
+
-
+ {#each row as w, colIndex}
+