-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (84 loc) · 4.82 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
<html>
<head>
<title>KeysHit</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=0">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
</head>
<body>
<div id="main-container">
<div id="game-title"><span class="title-keys">Keys</span><span class="title-hit"> Hit</span></div>
<div id="game-score"><div>SCORE: <span id="score-text"></span></div></div>
<div id="game-best-score"><div>BEST SCORE: <span id="best-score-text"></span></div></div>
<div id="game-content" class="state-0">
<div id="key-containers">
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
<div class="key-container"><div class="container-text"></div></div>
</div>
<div class="popups">
<div class="popup" id="start-game-popup">
<div class="popup-inner">
<div><button class="btn wide-btn" id="start-button">START</button></div>
<div><button class="btn wide-btn how-to-play-button">HOW TO PLAY?</button></div>
</div>
</div>
<div class="popup" id="restart-game-popup">
<div class="popup-inner">
<p id="popup-over-msg"></p>
<div style="font-size:18px">SCORE: <span id="popup-score-text">0</span></div>
<div><button class="btn wide-btn" id="restart-button">RESTART</button></div>
<div><button class="btn wide-btn how-to-play-button">HOW TO PLAY?</button></div>
</div>
</div>
<div class="popup" id="how-to-play-game-popup">
<div class="popup-inner">
<p>1. Type the keys in the order they appear.</p>
<p>2. There should be atleast 2 keys on the screen all the time.</p>
<p>3. There should be atleast 1 empty circle all the time.</p>
<div><button class="btn wide-btn pop-state-btn">OK</button></div>
</div>
</div>
</div>
</div>
<div id="footer">
<div class="github-link">
<a href="https://github.com/aneelkkhatri/keyshit" target="_blank"><svg aria-hidden="true" class="octicon octicon-mark-github" height="16" version="1.1" viewBox="0 0 16 16" width="16" style="fill: #5e5e5e;
"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path></svg></a>
</div>
<div class="footer-text">made by <a href="https://github.com/aneelkkhatri" target="_blank">aneel</a></div>
</div>
</div>
<script type="text/javascript">
(function scale() {
let contentWidth = 546;
let contentHeight = 620;
let scale = Math.min(window.innerWidth / contentWidth, window.innerHeight / contentHeight) * 100;
scale = Math.min(scale, 140);
let translateX = Math.min((scale - 100) / 2, 0);
let translateY = (scale - 100) / 2;
let mainContainer = document.getElementById("main-container");
mainContainer.setAttribute("style", `transform: translate(${translateX}%,${translateY}%) scale(${scale}%,${scale}%)`);
})();
</script>
<script type="text/javascript" src="js/key-container-colors.js"></script>
<script type="text/javascript" src="js/game.js"></script>
</body>
</html>