git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d043a71
)
word/memory: manual grid size override option
author
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 31 Dec 2021 13:35:54 +0000
(14:35 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 7 Feb 2022 17:42:33 +0000
(18:42 +0100)
Temporary workaround for unsupported aspect ratio and custom amounts.
word/memory.plp
patch
|
blob
|
history
diff --git
a/word/memory.plp
b/word/memory.plp
index 7bf757f6cc76d44a17c92d297a178b9c34f22ca9..11520b19b483d3a6860742e62b6ca151db83b39f 100644
(file)
--- a/
word/memory.plp
+++ b/
word/memory.plp
@@
-78,5
+78,10
@@
figure.good {
</style>
EOT
});
+if (my $gridsize = $get{grid}) {
+ printf "<style>#quiz {grid: repeat(%d, 1fr) / repeat(%d, 1fr)}</style>",
+ reverse split /\D+/, $gridsize;
+ say '';
+}
say '<h1>memory</h1><p id="quiz"></p>';
say "<script>new WordMemory('/$wordlistbase.json')</script>";