-
Notifications
You must be signed in to change notification settings - Fork 1
/
play.html
95 lines (93 loc) · 3.13 KB
/
play.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
<!doctype html>
{% autoescape true %}
<html ng-app="cc">
<head>
<title>Codingcraft</title>
<meta charset="utf-8">
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="css/normalize.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script>
</head>
<body ng-controller="GameController as game">
{% raw %}
<div id="container">
<div class="crosshair" ng-hide="!game.hideCover">
<img src="images/crosshair.png"/>
</div>
<div class="blocks">
<div class="blocks-center">
<span class="block" ng-repeat="icon in game.icons" ng-class="{selected: game.currentMaterial == $index}">
<img ng-src="/textures/{{icon}}.png">
<span class="block-name">{{icon}}</span>
</span>
</div>
</div>
</div>
{% endraw %}
<div class="cover" ng-hide="game.hideCover"></div>
<div class="help-container" ng-hide="game.hideCover">
{% include "help.html" %}
</div>
<div class="status-container" ng-hide="!game.hideCover">
{% raw %}
<div ng-repeat="(name, value) in game.status">
{{name}}: {{value}}
</div>
{% endraw %}
</div>
<div class="menu-container" ng-hide="game.hideCover">
<div class="user-container">
{% raw %}
<a href="/">{{game.name}}</a>
{% endraw %}
</div>
<div class="menu">
{% raw %}
<div class="title">Codingcraft v0.1</div>
<div class="section code">
<div>
<textarea ng-model="game.codes[game.currentCode]"></textarea>
</div>
<div class="error" ng-cloak>{{game.syntaxError}}</div>
<div>
<span class="button-container" ng-repeat="code in game.codes track by $index">
<button class="button primary"
ng-class="{checked: game.currentCode == $index}"
ng-click="game.setCurrentCode($index)">
{{$index+1}}
</button>
</span>
<div>To run the code, press the number key.</div>
</div>
<div>
<button class="button primary" ng-click="game.saveCodes()">Save codes</button>
</div>
</div>
<!--
<div class="section">
<div class="title">Menu</div>
<div>
<span class="button-container">
<button class="button secondary" ng-click="game.resetMap()">Reset map</button>
</span>
</div>
</div>
-->
{% endraw %}
<div class="section api">
{% include "api.html" %}
</div>
</div>
</div>
<aside class="topbar hide" id="topbar"></aside>
<script type="text/javascript">
window.MC_initdata = {
key: '{{key}}'
};
</script>
<script src="js/game_bundle.js"></script>
</body>
</html>
{% endautoescape %}