-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (57 loc) · 2.33 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
<!DOCTYPE html>
<html>
<head>
<title>Color Bands</title>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="js/snap.svg-min.js"></script>
<script src="js/storage.js"></script>
<script src="js/data.js"></script>
<script src="js/cell.js"></script>
<script src="js/puzzle.js"></script>
<script src="js/canvas.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Color Bands</a>
</div>
<ul class="nav navbar-nav">
<li class="disabled"><a href="#">Levels</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="disabled"><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li class="disabled"><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
</div>
</nav>
<div class="container">
<div class="row text-center">
<h2 id="levelNumber"></h2>
</div>
<div class="row text-center">
<svg id="mainGrid" width="600" height="600" />
</div>
<div class="row text-center">
<span id="btnNextPuzzle" class="btn btn-primary btn-lg">Go to next puzzle</span>
</div>
</div>
</body>
<script>
//TODO: Remove the variable
var canvas;
$(document).ready(function () {
var fnNextPuzzle = function () {
$("#btnNextPuzzle").hide();
canvas = new cBandsCanvas(new cBandsPuzzle(storage.getNext()));
canvas.render(Snap('#mainGrid'));
levelNumber.innerText = "Level " + storage.currentPuzzle;
}
$("#btnNextPuzzle").click(fnNextPuzzle);
fnNextPuzzle();
});
</script>
</html>