/
index.html
69 lines (68 loc) · 1.24 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
<!DOCTYPE html>
<html>
<head>
<title>THE CUBE</title>
<style>
.cube {
}
.side {
display: inline-block;
position: relative;
float: left;
margin: 5px;
margin-top: 175px;
}
.side:nth-child(5) {
position: absolute;
top: 5px;
left: 7px;
margin-top: 5px;
}
.side:nth-child(6) {
position: absolute;
top: 350px;
left: 7px;
margin-top: 5px;
}
.field {
display: inline-block;
position: relative;
width: 50px;
height: 50px;
border: 2px solid #eee;
float: left;
}
.field:nth-child(3n+1) {
clear: both;
}
.remote {
position: fixed;
top: 5px;
right: 5px;
}
</style>
</head>
<body ng-app="Cube">
<div ng-controller="cube">
<div class="cube">
<div class="side" ng-repeat="(id, side) in cube">
<div
class="field"
ng-repeat="(num, color) in side"
ng-style="{'background-color': color}"></div>
</div>
</div>
<div class="remote">
<select ng-model="axis" ng-options="axis for axis in axises"></select>
<select ng-model="direction">
<option>left</option>
<option>right</option>
</select>
<button ng-click="move(axis, direction)" value="Move">Move</button>
</div>
</div>
<br>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js"></script>
<script src="app.js"></script>
</body>
</html>