From 58a7fe3a0c75122250de3571414abdbaf9341cd0 Mon Sep 17 00:00:00 2001
From: "Kreinsen, Moritz" <moritz.kreinsen@uni-hamburg.de>
Date: Sun, 12 Mar 2023 19:19:38 +0000
Subject: [PATCH] Update index.php

---
 index.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.php b/index.php
index e070c4a..f6e3b31 100644
--- a/index.php
+++ b/index.php
@@ -10,7 +10,7 @@
 <body>
   <section class="memory-game">
     <div class="memory-card" data-framework="A">
-      <?php $text = 'A'; $style = 'background-color: #FFCCCB; text-align: center;'; $width = 640 * 0.25 - 10; $height = 640 * 0.33333 - 10; $svg = "<svg xmlns='http://www.w3.org/2000/svg' width='$width' height='$height'><text x='10' y='30'>$text</text></svg>"; $svgData = base64_encode($svg); $src = "data:image/svg+xml;base64,$svgData"; $imgTag = "<img class='front-face' src='$src' alt='$text' style='$style'/>"; echo $imgTag; ?>
+      <?php $text = 'A'; $style = 'background-color: #FFCCCB'; $width = 640 * 0.25 - 10; $height = 640 * 0.33333 - 10; $textSize = min($width, $height) * 0.4; $svg = "<svg xmlns='http://www.w3.org/2000/svg' width='$width' height='$height'><text x='50%' y='50%' text-anchor='middle' alignment-baseline='middle' font-size='$textSize'>$text</text></svg>";  $svgData = base64_encode($svg); $src = 'data:image/svg+xml;base64,'.$svgData; $imgTag = "<img class='front-face' src='$src' alt='$text' style='$style'/>"; echo $imgTag; ?>
       <!-- <img class="front-face" src="img/aurelia.svg" alt="Aurelia" style="background-color: #FFCCCB"/> -->
       <img class="back-face" src="img/js-badge.svg" alt="" />
     </div>
-- 
GitLab