add pin picker

This commit is contained in:
Ben Harris 2021-07-23 11:49:25 -04:00
parent f33abe3bc1
commit 58d1618f4d
2 changed files with 50 additions and 0 deletions

19
pin/games.txt Normal file
View File

@ -0,0 +1,19 @@
APOLLO
BIG GAME
BIG GUNS
COMET
CYCLONE
ELVIRA
FISH TALES
HERCULES
HOOK
JURASSIC
LED ZEP
SILVERBALL
SINBAD
SPY HUNTER
STAR WARS BLUIE
STAR WARS STERN
STAR WARS TRIL
TAXI
THE BEATLES

31
pin/index.php Normal file
View File

@ -0,0 +1,31 @@
<?php
$games = file("games.txt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$game = $games[array_rand($games)];
?>
<!DOCTYPE html>
<html>
<head>
<title>pin</title>
<link rel="stylesheet" href="../gruvbox/gruvbox.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body id="top">
<main>
<h1>right brain pin picker</h1>
<p>reload the page to pick a table</p>
<ul>
<?php foreach ($games as $g) {
if ($g === $game) { ?>
<li><strong><mark><?=$g?></mark></strong></li>
<?php } else { ?>
<li><?=$g?></li>
<?php }
} ?>
</ul>
</main>
</body>
</html>