forked from rocketacademy/basics-blackjack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
216 lines (198 loc) Β· 6.24 KB
/
index.html
File metadata and controls
216 lines (198 loc) Β· 6.24 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Page setup configurations -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Favicon configuration -->
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://ra-web-files.s3.ap-southeast-1.amazonaws.com/all/favicons/apple-touch-icon.png?v=2"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://ra-web-files.s3.ap-southeast-1.amazonaws.com/all/favicons/favicon-32x32.png?v=2"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://ra-web-files.s3.ap-southeast-1.amazonaws.com/all/favicons/favicon-16x16.png?v=2"
/>
<link rel="manifest" href="/site.webmanifest?v=2" />
<link
rel="mask-icon"
href="https://ra-web-files.s3.ap-southeast-1.amazonaws.com/all/favicons/safari-pinned-tab.svg?v=2"
color="#e73c3e"
/>
<link
rel="shortcut icon"
href="https://ra-web-files.s3.ap-southeast-1.amazonaws.com/all/favicons/favicon.ico?v=2"
/>
<meta name="apple-mobile-web-app-title" content="Rocket Academy" />
<meta name="application-name" content="Rocket Academy" />
<meta name="msapplication-TileColor" content="#2b5797" />
<meta name="theme-color" content="#ffffff" />
<!-- sharing configuration -->
<!-- Primary Meta Tags -->
<title>Blackjack - Basics - Rocket Academy</title>
<meta name="title" content="Tabby's BlackJack Game!" />
<meta name="description" content="A fun card game I made myself! ππͺπ" />
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta
property="og:url"
content="https://rocketacademy.github.io/basics-blackjack/index.html"
/>
<meta property="og:title" content="Tabby's BlackJack Game!" />
<meta
property="og:description"
content="A fun card game I made myself! ππͺπ"
/>
<meta
property="og:image"
content="https://ra-web-files.s3.ap-southeast-1.amazonaws.com/basics/basics-blackjack-share-small.jpeg"
/>
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta
name="twitter:url"
content="https://rocketacademy.github.io/basics-blackjack/index.html"
/>
<meta name="twitter:title" content="Tabby's BlackJack Game!" />
<meta
name="twitter:description"
content="A fun card game I made myself! ππͺπ"
/>
<meta
name="twitter:image"
content="https://ra-web-files.s3.ap-southeast-1.amazonaws.com/basics/basics-blackjack-share-small.jpeg"
/>
<meta name="twitter:site" content="@rocketacademyco" />
<meta name="twitter:creator" content="@rocketacademyco" />
<!-- fonts -->
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Open+Sans"
/>
<!-- CSS -->
<style>
* {
box-sizing: border-box;
}
body {
font-family: "Open Sans", sans-serif;
margin-left: 30px;
margin-right: 30px;
background-color: white;
color: black; /* sets the font color */
background-image: url("https://media.karousell.com/media/photos/products/2021/2/8/quby_waterproof_stickers_40_pi_1612778601_e1fa4c58_progressive.jpg"); /* The image used */
background-position: center; /* Center the image */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: cover; /* Resize the background image to cover the entire container */
}
#output-div img {
display: block;
max-width: 100%;
max-height: 200px;
}
.header {
text-align: center;
font-size: 1.1rem;
margin-bottom: 3rem;
}
#container {
background-color: lightslategray;
margin: 40px auto;
max-width: 800px;
padding: 38px 31px;
}
#container1 {
background-color: lightslategray;
margin: 20px auto;
max-width: 450px;
padding: 2px 2px;
}
input {
font-size: 21px;
line-height: 33px;
margin: 0 0 23px 0;
padding: 0 9px;
width: 100%;
}
button {
font-size: 21px;
line-height: 33px;
margin: 0 0 23px 0;
padding: 0 6px;
}
#output-div {
background-color: lightgrey;
margin: 20px auto;
padding: 20px;
width: 100%;
}
.logo-img {
height: 49px;
position: relative;
top: 22px;
}
/* increase header font size on wider screens */
@media screen and (min-width: 600px) {
.header {
font-size: 2rem;
}
}
</style>
</head>
<body>
<div id="container1">
<h1 class="header">
<img
class="logo-img"
src="https://ra-web-files.s3.ap-southeast-1.amazonaws.com/all/brand/logo.png"
/>
Rocket Academy
<img
class="logo-img"
src="https://ra-web-files.s3.ap-southeast-1.amazonaws.com/all/brand/logo.png"
/>
</h1>
<h1 class="header">π Tabby's Blackjack π</h1>
</div>
<div id="container">
<p>Input:</p>
<input id="input-field" />
<br />
<button id="submit-button">Submit</button>
<p>Output:</p>
<div id="output-div">
Welcome to <b>Tabby's Cards</b>! Click the <b>submit</b> button to get
started! <br /><br />
<img
src="https://c.tenor.com/gzvf7TxLFuYAAAAi/pentol-danc-pentol-cute.gif"
/>
</div>
</div>
<!-- Import program logic -->
<script src="script.js"></script>
<!-- Define button click functionality -->
<script>
var button = document.querySelector("#submit-button");
button.addEventListener("click", function () {
// Set result to input value
var input = document.querySelector("#input-field");
var result = main(input.value);
// Display result in output element
var output = document.querySelector("#output-div");
output.innerHTML = result;
// Reset input value
input.value = "";
});
</script>
</body>
</html>