-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
122 lines (104 loc) · 3.61 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Jack21 - Black Jack by ColdFriday</title>
<link rel="stylesheet" href="styles.scss" />
<link
href="https://fonts.googleapis.com/css?family=Rubik:400,500,700&display=swap"
rel="stylesheet"
/>
<meta name="description" content="Jack21, the casino that let your inner lumberjack run free. The online classic game of BlackJack, test your luck!">
<meta name="keywords" content="lumberjack, blackjack, casino, bet, betting, gambling,">
<meta name="author" content="ColdFriday">
<meta name="robots" content="noindex">
<link rel="apple-touch-icon" sizes="180x180" href="./favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon/favicon-16x16.png">
<link rel="mask-icon" href="./favicon/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<header id="menu">
<div id="mobil-header">
<img src="static/Backgrounds/burger menu.svg" alt="burgermenu" />
<img id="logo1" src="static/Backgrounds/Logo.svg" alt="logo" />
<div id="ikkeses"></div>
</div>
<div id="pc-header">
<a class="justifyself" href="./index.html"><img id="logo2" src="static/Backgrounds/Logo.svg" alt="logo" /></a>
<ul>
<a href="game.html"><li>Play</li></a>
<li>News</li>
<li>Weekly chart</li>
</ul>
</div>
</header>
<div id="lumberjack-svg"></div>
<div id="trees-svg"></div>
<div id="info-box">
<div>
<h2>Welcome to</h2>
<h1>Jack21</h1>
<p>
At Jack21, you have the opportunity to win a fortune through our
thrilling classic, Blackjack. Blackjack is a timeless classic and has been a fan favorite among players for decades. <br />
<br />
Try your skills and see how far you can go, good luck!
Enter your name below to start playing.
</p>
<div id="label-container">
<input
name="firstname"
type="text"
placeholder="Name"
required
class="firstname-formfield"
pattern="[A-Za-z]+"
/>
</div>
</div>
<br />
<button name="Continue" id="btn" disabled>
Continue</button>
</div>
</div>
<script>
/* Form validation for index.html ************************/
document
.querySelector(".firstname-formfield")
.addEventListener("keypress", checkValidity);
document
.querySelector(".firstname-formfield")
.addEventListener("keypress", noSpace);
function checkValidity() {
if (
document.querySelector("input[name='firstname']").checkValidity() === true
) {
document.querySelector("button").removeAttribute("disabled");
console.log("Valid");
} else {
console.log("Invalid");
document.querySelector("button").disabled = "true";
}
}
function noSpace(event) {
console.log("test");
let e = event.which || event.keyCode;
if (e === 32) {
event.preventDefault();
document.querySelector(".instruction-firstname").style.opacity = "1";
} else {
}
}
let button = document.querySelector("#btn")
button.addEventListener("click", () => {
location.href = "game.html?id=" + document
.querySelector(".firstname-formfield").value;
})
</script>
</body>
</html>