word: language includes for general use
[sheet.git] / word / memory.plp
index 1bb8cebb3ae6211b609e4bf14fa513ef4776410a..d0364e43bd601fc4dadf230adc9e28f86b81777b 100644 (file)
@@ -3,9 +3,21 @@
 Html({
        raw => <<'EOT',
 <script src="/word/put.min.js"></script>
+<script src="/word/quiz.js"></script>
 <script src="/word/memory.js"></script>
 <style>
 /* cards */
+#quiz {
+       display: grid;
+       grid: repeat(3, 1fr) / repeat(4, 1fr);
+       grid-gap: 1ex;
+       min-height: calc(100vh - 11.5ex);
+}
+@media (orientation: portrait) {
+       #quiz {
+               grid: repeat(6, 1fr) / repeat(2, 1fr);
+       }
+}
 html {
        overflow: hidden; /* rotation overflow on celebration */
 }
@@ -14,9 +26,7 @@ figure {
        display: inline-block;
        background: #224;
        border: 1px solid #888;
-       margin: 2px;
        perspective: 100em;
-       height: 300px;
        position: relative;
 }
 figure:not(.turn):hover {
@@ -33,7 +43,7 @@ figure img {
        backface-visibility: hidden;
        transform: rotateY(180deg); /* back */
        transform-style: preserve-3d;
-       float: left; /* ff workaround to prevent click selection */
+       -float: left; /* ff workaround to prevent click selection */
 }
 
 /* turn results */
@@ -61,3 +71,4 @@ figure.good {
 EOT
 });
 say '<h1>memory</h1><p id="quiz"></p>';
+say "<script>new WordMemory()</script>";