-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
115 lines (113 loc) · 6.58 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Match the Fruits</title>
<!-- Bootstrap CDN -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<!-- Fontawesome CDN -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" />
<link rel="stylesheet" href="assets/css/style.css">
<!-- Favicon icon -->
<link rel="shortcut icon" href="assets/images/favicon.ico" type="image/x-icon">
<link rel="icon" href="assets/images/favicon.ico" type="image/x-icon">
</head>
<body>
<!-- Header section. JavaScript used to indicate to users location on website -->
<header id="introduction-header" class="mb-5">
<nav id="nav">
<div class="container-fluid text-center">
<h1 class="mt-2">MATCH THE FRUITS</h1>
<h2 class="mt-3 mb-3">CARD MEMORY GAME</h2>
<ul>
<li>
<a href="index.html">Home</a>
</li>
<li>
<a href="contact.html">Contact</a>
</li>
</ul>
</div>
</nav>
</header>
<main>
<!-- Section for the timer and 'Select difficulty' (return home) button
This section is hidden by JavaScript until a game difficulty is selected via one of the three buttons on this page
-->
<div id="timer-and-home">
<a href="index.html" id="return-home" class="hvr-grow text-center" role="button">Select difficulty</a>
<div id="timer"><i class="far fa-clock"></i> <span id="minutes"></span>:<span id="seconds"></span> </div>
</div>
<div id="introduction-section">
<div class="container text-center">
<h3 class="mb-4" id="play-rules"><strong>How to Play:</strong></h3>
<p>The objective of the game is to find all matching pairs of fruit cards.</p>
<p>When the game is generated after you select a difficulty, select two cards at a time. If they do not match, the cards will flip back to their backs.</p>
<p>If they do match, the fruit cards will remain face up. </p>
<p>Keep going until you find all of the fruit cards!</p>
<h3 class="my-4"><strong>Select difficulty to start the game</strong></h3>
</div>
</div>
<!-- Buttons that prompt what mode of game will be generated by JavaScript -->
<div id="start-game-prompt" class="text-center">
<button id="easy-button" class="mx-2 hvr-grow">Easy</button>
<button id="moderate-button" class="mx-2 hvr-grow">Moderate</button>
<button id="hard-button" class="mx-2 hvr-grow">Hard</button>
</div>
<!-- Section where game is generated, all of which is hidden until an event listener in JavaScript is triggered -->
<!-- Game board -->
<div id="board" class="row"></div>
<!-- Where the scores, moves tracker and buttons will be generated -->
<div id="board-content" class="text-center container">
<!-- Credit for moves counter: Michelle Toscano-->
<h3 id="counter">Moves: <span id="count"></span></h3>
<!-- Score tracker -->
<h3 id="score-text">Score: <span id="result"></span></h3>
<!-- Button to reset the game (cards, timer, moves counter, and score tracker)-->
<button id="reset" class="mx-2 mb-5 hvr-grow">Reset Game</button>
<!-- Navigational button to allow users to give feedback about the game-->
<a href="contact.html" id="feedback" class="hvr-grow text-center button mx-2 mb-5" role="button">Give Feedback</a>
</div>
</main>
<footer class="text-center footer">
<ul>
<!-- Credit for accessibility measures in social media icons: Mário Gusman -->
<!-- Credit for social media icons: Font awesome -->
<li>
<a href="https://www.instagram.com/" target="_blank" rel="noopener">
<i aria-hidden="true" class="fab fa-instagram"></i>
<span class="sr-only">Instagram</span>
</a>
</li>
<li>
<a href="https://www.facebook.com/" target="_blank" rel="noopener">
<i aria-hidden="true" class="fab fa-facebook"></i>
<span class="sr-only">Facebook</span>
</a>
</li>
<li>
<a href="https://twitter.com/" target="_blank" rel="noopener">
<i aria-hidden="true" class="fab fa-twitter"></i>
<span class="sr-only">Twitter</span>
</a>
</li>
<li>
<a href="https://www.youtube.com/" target="_blank" rel="noopener">
<i aria-hidden="true" class="fab fa-youtube"></i>
<span class="sr-only">YouTube</span>
</a>
</li>
</ul>
</footer>
<!-- Bug fix: 'async' attribute in script tag was causing DOMContentLoaded event listener to fail to execute. 'async' removed -->
<!-- Bug fix: Change order of js scripts loaded to ensure all arrays using the .slice method work correctly -->
<script src="assets/js/main.js"></script>
<script src="assets/js/hard-game.js"></script>
<script src="assets/js/moderate-game.js"></script>
<script src="assets/js/easy-game.js"></script>
<!-- Bootstrap library -->
<script defer async src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
</body>
</html>