From 41505776af8e16a77f5ef225db18f8b88124fa99 Mon Sep 17 00:00:00 2001 From: w Date: Wed, 16 Jul 2025 22:29:04 -0300 Subject: [PATCH] Center align flavor text and card ID in drawing function --- web/templates/card_creator.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/templates/card_creator.html b/web/templates/card_creator.html index 8141fdd..1cbf90c 100644 --- a/web/templates/card_creator.html +++ b/web/templates/card_creator.html @@ -116,7 +116,8 @@ function drawCard() { // Flavor ctx.font = "italic 24px serif"; - wrapText(flavorInput.value, 60, 950, 680, 30); + ctx.textAlign = "center"; + wrapText(flavorInput.value, canvas.width / 2, 965, 558, 30); // Artist ctx.font = "30px sans-serif"; @@ -130,8 +131,8 @@ function drawCard() { async function drawCardId() { const id = await generateCardId(packInput.value, nameInput.value); - ctx.font = "20px sans-serif"; - ctx.fillText("KC-" + id, canvas.width - 350, canvas.height - 60); + ctx.font = "15px sans-serif"; + ctx.fillText("KC-" + id, canvas.width/2, canvas.height - 30); }