weh!
This commit is contained in:
parent
32e28aa4f9
commit
abe0f6928d
2 changed files with 361 additions and 0 deletions
35
weh.php
Normal file
35
weh.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
$quotes = file_get_contents('weh.json');
|
||||
if ($quotes !== false) {
|
||||
$quotes = json_decode($quotes, true);
|
||||
$quote = $quotes[array_rand($quotes)];
|
||||
echo "<pre>".var_dump($quote)."</pre>";
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Weh?</title>
|
||||
<link rel="stylesheet" href="weh.css">
|
||||
<link rel="icon" type="image/x-icon" href="weh.ico">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Weh?</h1>
|
||||
<div class="weh"></div>
|
||||
<?php if ($quotes) { ?>
|
||||
<?php if ($quote["line"] == "*Rage squeals*") { ?>
|
||||
*Rage squeals*
|
||||
<?php } else { ?>
|
||||
<?=$quote["line"]?><br>
|
||||
<em><small>~ King (The Owl House, <?=$quote["attribution"]?>)</small></em>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue