diff --git a/index.php b/index.php index f2f5f14f89c8efd979eb843a69195021fc3ba28a..b3913a4f020d63d9d1edebca0e6394ddbcdc12da 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; ?>