Skip to content
Snippets Groups Projects
Commit f4b48efd authored by Kreinsen, Moritz's avatar Kreinsen, Moritz
Browse files

Update index.php

parent b4fadce1
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<body> <body>
<section class="memory-game"> <section class="memory-game">
<div class="memory-card" data-framework="A"> <div class="memory-card" data-framework="A">
<?php /* <?php
$text = 'A'; $text = 'A';
$width = 640 * 0.25 - 10; $width = 640 * 0.25 - 10;
$height = 640 * 0.33333 - 10; $height = 640 * 0.33333 - 10;
...@@ -52,7 +52,9 @@ ...@@ -52,7 +52,9 @@
echo $imgTag; 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="front-face" src="img/aurelia.svg" alt="Aurelia" style="background-color: #FFCCCB"/> -->
<!-- <img class="back-face" src="img/js-badge.svg" alt="" /> --> <!-- <img class="back-face" src="img/js-badge.svg" alt="" /> -->
<?php echo $backface; ?> <?php echo $backface; ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment