-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
85 lines (78 loc) · 2.33 KB
/
index.html
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
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Generator</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="alkohole.js"></script>
<script>
let firstRandom;
let secondRandom;
function GenerateText()
{
firstRandom = Math.floor(Math.random() * piwa.length);
secondRandom = Math.floor(Math.random() * piwa.length);
return piwa[firstRandom].part + piwa[secondRandom].part2;
}
function SetText() {
document.getElementById("generatedText").innerHTML = GenerateText();
document.getElementById("subText").innerHTML = piwa[firstRandom].piwo + "+" + piwa[secondRandom].piwo;
}
</script>
<style>
body {
background-color:#ddd;
}
header {
display: flex;
flex-direction: row;
justify-content: center;
font-size: 5vw;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#buttonContainer {
margin-top:10vh;
display:flex;
flex-direction: row;
justify-content: center;
}
button {
background-color:#00dd00;
width:33vw;
height:10vw;
border:none;
font-size:7vw;
border-radius: 2vw;
cursor:pointer;
}
#text {
margin-top:5vh;
display:flex;
flex-direction: column;
justify-content: center;
}
.subText {
color:#ccc;
font-size:8vw;
text-align: center;
}
#generatedText {
position:relative;
bottom:0.25em;
font-size:12vw;
text-align: center;
}
</style>
</head>
<body>
<header>Generator alko-mieszanki</header>
<div id="buttonContainer">
<button onClick="SetText()">Generuj</button>
</div>
<main id="text">
<div id="generatedText"></div>
<div class="subText" id="subText"> Tatra + Harnaś </div>
</main>
</body>
</html>