Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 102 additions & 42 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -8,41 +7,83 @@
<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">
<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! 😄💪🌈">
<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">
<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">
<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">
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Open+Sans"
/>

<!-- CSS -->
<style>
Expand All @@ -51,21 +92,21 @@
}

body {
font-family: 'Open Sans', sans-serif;
font-family: "Open Sans", sans-serif;
margin-left: 30px;
margin-right: 30px;
background-color:white;
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;
#output-div img {
display: block;
max-width: 100%;
max-height: 200px;
}
.header {
text-align: center;
Expand All @@ -74,7 +115,7 @@
}

#container {
background-color: pink;
background-color: rgb(151, 210, 255);
margin: 40px auto;
max-width: 800px;
padding: 38px 31px;
Expand All @@ -96,43 +137,62 @@
}

#output-div {
background-color: lightgrey;
margin: 20px auto;
padding: 20px;
width: 100%;
text-align: center;
}

.logo-img {
height: 49px;
position: relative;
top: 22px;
}

#instructions {
border-radius: 4px;
margin: 20px auto;
padding: 15px;
width: 75%;
text-align: center;
}
/* 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>
<h1 class="header">♠️♣️♠️♣️ 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>
<div id="instructions">
<h2>♠️♥️♣️♦️</h2>
<h2>Game instructions</h2>
<p><b>Your goal: Beat the dealer without going over 21</b></p>

<p>
You and the dealer will be dealt 2 cards each. Choose 'h' to hit or 's'
to stand.
</p>
<p>
Dealer must hit if their hand is 16 or less, otherwise, it must stand.
</p>
<p>
Aces can be 1 or 11. Blackjack is an Ace and a 10-value card. It beats
any other hand totalling 21.
</p>
<p>Click "Submit" to start! Good luck!</p>
<h2>♠️♥️♣️♦️</h2>
</div>
<!-- Import program logic -->
<script src="script.js"></script>
<!-- Define button click functionality -->
Expand Down
Loading