From cb6aa349f8b8a12e5f140ab5eaa95d389b80d881 Mon Sep 17 00:00:00 2001 From: Avris Date: Sun, 26 Jul 2020 13:14:30 +0200 Subject: [PATCH] #19 formy wymienne - banner --- server/banner.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/banner.js b/server/banner.js index f15bfd11..d9134f26 100644 --- a/server/banner.js +++ b/server/banner.js @@ -47,8 +47,9 @@ export default async function (req, res, next) { context.font = 'regular 48pt Quicksand' context.fillText('Moje zaimki to:', width / leftRatio + imageSize / 1.5, height / 2 - 36) - context.font = 'bold 70pt Quicksand' - context.fillText(template.name(), width / leftRatio + imageSize / 1.5, height / 2 + 72) + const templateNameOptions = template.nameOptions(); + context.font = `bold ${templateNameOptions.length <= 2 ? '70' : '36'}pt Quicksand` + context.fillText(templateNameOptions.join('\n'), width / leftRatio + imageSize / 1.5, height / 2 + (templateNameOptions.length <= 2 ? 72 : 24)) } else { context.font = 'regular 120pt Quicksand' context.fillText('Zaimki.pl', width / leftRatio + imageSize / 1.5, height / 2 + 48)