From f4b48efd35a1be37938e8b9e1eaa024aef2d5eaa Mon Sep 17 00:00:00 2001 From: "Kreinsen, Moritz" <moritz.kreinsen@uni-hamburg.de> Date: Mon, 13 Mar 2023 07:59:45 +0000 Subject: [PATCH] Update index.php --- index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index f2f5f14..b3913a4 100644 --- a/index.php +++ b/index.php @@ -11,7 +11,7 @@ <body> <section class="memory-game"> <div class="memory-card" data-framework="A"> - <?php +/* <?php $text = 'A'; $width = 640 * 0.25 - 10; $height = 640 * 0.33333 - 10; @@ -52,7 +52,9 @@ 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="" /> --> <?php echo $backface; ?> -- GitLab