This repository has been archived by the owner on Apr 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
73 lines (72 loc) · 2.84 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
// Headings
$allanHeadings = array(
'Allans svar til dig',
'Allan ved besked',
'Allan er ikke i tvivl',
'Tukanen har talt',
'Tukanens vise ord',
'Oralkets svar',
'Oraklets råd er klart'
);
// Answers
$allanAnswers = array(
'Oraklet siger ja! Ingen tvivl om det.',
'Det bliver et nej fra Allan!',
'Den var svær. Spørg igen senere.',
'Har du overhovedet tænkt det igennem? Han er målløs!',
'Han har hørt, det skulle være en dum idé. Lad være!',
'Ja, ja, ja! Kom i gang! Det er helt perfekt!',
'Sikke et mærkeligt spørgsmål, men ja! Klart ja!',
'NEEEEJ! KÆMPE NEEEJ!!',
'JA DA!? 100 %',
'NIX, DU! ALDRIG!',
'Hmmmm... Allan er sulten!',
'Skru op for varmen. Alting løser sig.',
'Er du klar over, hvad det koster? Spar lige op først!',
'Er du sikker på, det er lovligt? Allan siger no go!'
);
?>
<!DOCTYPE html>
<html lang="da-DK">
<head>
<title>Spørg Tukanen Allan</title>
<!-- META TAGS -->
<meta charset="UTF-8">
<meta name="description" content="Spørg oraklet Allan om alt!">
<meta name="author" content="N4.DK">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- STYLESHEETS -->
<!-- Custom CSS -->
<link rel="stylesheet" type="text/css" media="screen" href="styles.css">
<!-- Bootstrap 4.0 -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
</head>
<body>
<div id="contentDiv">
<div class="boxDiv">
<h1>Spørg Tukanen Allan</h1>
<p>
Allan er intet mindre end et orakel. Han har svar på stort set alt.<br>
Stil ham et spørgsmål og tryk på knappen, så vil han vil guide dig gennem livets problemer.
</p>
</div>
<!-- Handles the Magic of Allan's Knowledge -->
<div class="boxDiv">
<h2 id="allanHeading"><?php echo $allanHeadings[rand(0, count($allanHeadings) - 1)]; ?></h2>
<p id="allanAnswer"><?php echo $allanAnswers[rand(0, count($allanAnswers) - 1)]; ?></p>
<img id="imgAllan" src="images/allan.png" width="200px" height="160px" alt="Tukanen Allan"><br>
<input id="questionInput" type="text" placeholder="Skriv dit spørgsmål...">
<button id="askQuestionButton" onClick="getAnswer()">Spørg Allan</button>
<button id="newQuestionButton" onClick="history.go(0)">Nyt spørgsmål?</button>
</div>
<p id="footerDiv">Udviklet af N4.DK</p>
</div>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<!-- Custom script -->
<script src="script.js"></script>
</body>
</html>