-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
68 lines (55 loc) · 2.6 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
<!doctype html>
<html onContextMenu="return false;">
<head>
<meta charset="UTF-8">
<title>TicTacToe</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="icon" type="image/png" href="img/favicon.png">
</head>
<body>
<div class="wrapper center">
<header>
<h1 class="center">Good Old Tic Tac Toe</h1>
<h2 class="center">Play it like you did in grade school</h2>
</header>
<section>
<div class="scorehalf">
<section class="scoreview"></section>
</div><!-- comment removes space causing line break in layout
--><div class="gamehalf">
<section class="gameview"></section>
</div><!-- comment removes space causing line break in layout
--><div class="statshalf">
<section class="upperstats">
<div class="playerview"></div>
</section>
<section class="lowerstats">
<a href="" class="playagain undecorated">Restart Game!</a>
</section>
</div>
</section>
<p class="backbone outer"><a class="undecorated" href="http://backbonejs.org/" target="blank"><img src="img/backbone.png" title="Coded with love using Backbone.js"/></a></p>
<a class="github outer" href="https://github.com/ferdinandtorggler/tictactoe" target="_blank"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub"></a>
</div>
<!-- TEMPLATES -->
<script type="text/template" id="tmp-scoreview">
<p><span class="player">X</span> won <%= xTimes %> <% if (xTimes == 1) {print("time");} else {print("times");} %></p>
<p><span class="player">O</span> won <%= oTimes %> <% if (oTimes == 1) {print("time");} else {print("times");} %></p>
</script>
<script type="text/template" id="tmp-fieldview">
<% if (!status) {print("")} else {print(status)}%>
</script>
<script type="text/template" id="tmp-playerview">
<p><% if (!winner) {print('<span class="middleheight">current player: </span>' + '<span class="player big">' + current.toUpperCase() + '</span>');} %></p>
<p><% if (winner && winner == "nobody") print("draw"); else if (winner) print('<span class="player big">' + winner.toUpperCase() + '</span>' + ' <span class="middleheight">wins</span>'); %></p>
</script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.10/backbone-min.js"></script>
<script src="js/app.js"></script>
<script src="js/models.js"></script>
<script src="js/collections.js"></script>
<script src="js/views.js"></script>
<script src="js/router.js"></script>
</body>
</html>