inital commit

This commit is contained in:
Russell R. 2021-07-23 13:02:38 -04:00
parent 4fad5b7c9c
commit ed31dd7705
2 changed files with 41 additions and 0 deletions

11
cspin/games.txt Normal file
View File

@ -0,0 +1,11 @@
Rick & Morty
Star Wars (cantainer)
Mando
Mr. Dead Pool
Star Trek
TMNT
J.P.
Monster Bash
Walking Dead
Gardians
Avengers

30
cspin/index.php Normal file
View File

@ -0,0 +1,30 @@
<?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="https://tilde.team/~ben/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>