forked from artyyouth/minesweeper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex_production.html
executable file
·90 lines (85 loc) · 3.32 KB
/
index_production.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Minesweeper</title>
<!-- Libraries Needed -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/journal/bootstrap.min.css"/>
<link rel="stylesheet" href="https://carlos.fyi/assets/css/main.css"/>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<link rel="stylesheet" href="dist/sweeper.min.css"/>
<script type="text/javascript" src="dist/sweeper.min.js"></script>
</head>
<body>
<div class="container">
<div class="mine-game container-fluid">
<div class="row">
<div class="col-sm-6">
<h1><i class="fa fa-bomb"></i> Minesweeper!</h1>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-xs-6">
<a class="github-button" href="https://github.com/cajogos/minesweeper/fork" target="_blank"
data-size="large" data-show-count="true" aria-label="Fork cajogos/minesweeper on GitHub">Fork</a>
<a class="github-button" href="https://github.com/cajogos/minesweeper" target="_blank"
data-icon="octicon-star" data-size="large" data-show-count="true"
aria-label="Star cajogos/minesweeper on GitHub">Star</a>
</div>
<div class="col-xs-6 text-right">
<button type="button" class="btn btn-success" id="start-btn">
<i class="fa fa-flag"></i> Start
</button>
<button type="button" class="btn btn-primary" id="reset-btn">
<i class="fa fa-refresh"></i> Reset
</button>
</div>
</div>
<hr />
<div class="row config-area">
<div class="col-xs-3">
<label class="small" for="num-rows">Num Rows: <span id="num-rows-value"></span></label>
<input type="range" id="num-rows" min="8" max="50" step="2" value="16"/>
</div>
<div class="col-xs-3">
<label class="small" for="num-cols">Num Cols: <span id="num-cols-value"></span></label>
<input type="range" id="num-cols" min="8" max="50" step="2" value="16"/>
</div>
<div class="col-xs-6">
<label class="small" for="num-mines">Num Mines: <span id="num-mines-value"></span></label>
<input type="range" id="num-mines" min="8" max="12" step="1" value="28"/>
</div>
</div>
</div>
</div>
<hr/>
<div id="game-area">
<h1 class="text-center">Press Start to play!</h1>
</div>
</div>
</div>
<script type="text/javascript">
// Initialise once document loads
$(document).ready(function ()
{
var sweeperOptions = {
gameArea: $('#game-area'),
buttons: {
start: $('#start-btn'),
reset: $('#reset-btn')
},
inputs: {
rows: $('#num-rows'),
cols: $('#num-cols'),
mines: $('#num-mines')
}
};
SWEEPER.init(sweeperOptions);
});
</script>
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>