feat: add guide section header notes
CI / Verify (push) Successful in 24m57s
CI / Build immutable images and deploy (push) Successful in 1m57s

This commit is contained in:
2026-09-01 13:52:01 +07:00 Unverified
parent 9b0b5f8c83
commit 1b4581b94e
12 changed files with 3276 additions and 14 deletions
@@ -57,7 +57,8 @@ export async function GET(
Promise.all(guide.weapons.map((row) => pngDataUrl(row.weapon.imageUrl))),
]);
const weaponHeights = guide.weapons.map((row) => Math.max(126, 126 + (row.note ? Math.ceil(row.note.length / 52) * 22 : 0)));
const height = Math.max(360, 190 + weaponHeights.reduce((sum, rowHeight) => sum + rowHeight, 0) + Math.max(0, guide.weapons.length - 1) * 14);
const noteHeight = guide.note ? Math.max(24, Math.ceil(guide.note.length / 70) * 22) : 0;
const height = Math.max(360, 190 + noteHeight + weaponHeights.reduce((sum, rowHeight) => sum + rowHeight, 0) + Math.max(0, guide.weapons.length - 1) * 14);
return new ImageResponse(
<div
@@ -78,6 +79,7 @@ export async function GET(
<div style={{ display: "flex", flexDirection: "column", alignItems: "center", gap: 8, marginBottom: 6 }}>
<div style={{ display: "flex", color: "#f0b72f", fontSize: 16, fontWeight: 700 }}>อาวุธที่แนะนำ</div>
<div style={{ display: "flex", fontSize: 38, fontWeight: 700 }}>อาวุธ</div>
{guide.note ? <div style={{ display: "flex", maxWidth: 760, color: "#b9b9c2", fontSize: 16, lineHeight: 1.4, textAlign: "center" }}>{guide.note}</div> : null}
</div>
{guide.weapons.map((row, index) => (
<div