-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
169 lines (148 loc) · 5.67 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Word Fun Jam!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Type faster than the next guy.">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/bootswatch.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
</head>
<body class="preview" id="top" data-spy="scroll" data-target=".subnav" data-offset="80">
<!-- Navbar
================================================== -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="/index.html">Word Fun Jam!</a>
<div class="nav-collapse collapse" id="main-menu">
<ul class="nav" id="main-menu-left">
<li><a href="index.html">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Game <b class="caret"></b></a>
<ul class="dropdown-menu" id="swatch-menu">
<li><a id="newgame" href="#">New</a></li>
<li><a id="joingame" href="/join">Join</a></li>
</ul>
</li>
<li><a href="credits.html">Credits</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<!-- Masthead
================================================== -->
<header class="jumbotron subhead" id="overview">
<div class="row">
<div class="span6">
<h1>Word Fun Jam!</h1>
<p class="lead">Who types faster?</p>
</div>
</div>
</header>
<div id="entergame" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">New Game</h4>
</div>
<form id="gameform">
<div class="modal-body">
<p>Enter your name:</p>
<input type="text" id="playername"></input>
<p>Enter a new or existing Game ID:</p>
<input type="text" id="gameid"></input>
<p>Difficulty:</p>
<input type="radio" name="difficulty" value="normal" checked> normal<br>
<input type="radio" name="difficulty" value="easy"> easy<br>
<br />
<p>Opponent:</p>
<input type="radio" name="opponent" value="real" checked> real person<br>
<input type="radio" name="opponent" value="computer"> computer<br />
<br />
<div id="computerSpeeds" style="display:none;">
<p>Computer Typing Speed:</p>
<select id="compSpeed" name="compSpeed">
<option value="2" checked> slow<br>
<option value="1"> medium<br>
<option value=".75"> fast<br>
<option value=".5"> really fast<br>
<option value=".20"> super fast<br>
<option value=".10"> Ann fast<br>
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-primary">Start Game</button>
</div>
</form>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Footer
================================================== -->
<hr>
<footer id="footer">
<p class="pull-right"><a href="#top">Back to top</a></p>
<div class="links">
<a href="#">Github</a>
<a href="#">Email</a>
<a href="#">Facebook</a>
<a href="#">Donate</a>
</div>
Made by <a href="#">Cameron Seebach</a> & <a href="#">Tyrone Warren</a>.
Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Affero GPL</a>.
</footer>
</div><!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script src="js/jquery.smooth-scroll.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootswatch.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#newgame').click(function(){
$('#entergame').modal();
});
$('#gameform').submit(function(e){
e.preventDefault();
var playername = $('#playername').val();
var gameid = $('#gameid').val();
var difficulty = $('input:radio[name=difficulty]:checked').val();
var ai = 'null';
var speed = 'null';
if($('input:radio[name=opponent]:checked').val()=='computer') {
ai = true;
speed = $('#computerSpeeds option:selected').val();
}
var path = 'game/' + gameid + '/' + playername + '?' + difficulty + '&' + ai + '&' + speed;
window.location = path;
});
$('input:radio[name=opponent]').click(function(){
if($(this).val()=='computer'){
$('#computerSpeeds').show();
}else{
$('#computerSpeeds').hide();
}
});
});
</script>
</body>
</html>