forked from rocketacademy/basics-blackjack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
155 lines (136 loc) Β· 5.55 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
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
<!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="YOURNAME'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="YOURNAME'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="YOURNAME'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(""); /* 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: pink;
margin: 40px auto;
max-width: 800px;
padding: 38px 31px;
}
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>
<h1 class="header">
<img class="logo-img" src="https://firebasestorage.googleapis.com/v0/b/ftbc11-sample.appspot.com/o/images%2F1-PRIMARY_CRIMSON.png?alt=media&token=ce9e8333-2a45-44be-adb2-1f1bf054adf7" />
Rocket Academy
<img class="logo-img" src="https://firebasestorage.googleapis.com/v0/b/ftbc11-sample.appspot.com/o/images%2F1-PRIMARY_CRIMSON.png?alt=media&token=ce9e8333-2a45-44be-adb2-1f1bf054adf7" />
</h1>
<h1 class="header">β£οΈ Basics - Blackjack β οΈ</h1>
<div id="container">
<p>Input:</p>
<input id="input-field" />
<br />
<button id="submit-button">Submit</button>
<p>Output:</p>
<div id="output-div"></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>