-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
96 lines (91 loc) · 5.03 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
<!DOCTYPE html>
<html ng-app="strobeApp">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>loops</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- lib -->
<link rel="stylesheet" type="text/css" media="screen" href="styles/lib/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="styles/lib/fa-regular.min.css" />
<!-- app -->
<link rel="stylesheet" type="text/css" media="screen" href="styles/app/main.css" />
<link rel="stylesheet" type="text/css" media="screen" href="styles/app/loops.css" />
</head>
<body ng-controller="loopsController">
<nav class="navbar navbar-light bg-primary navbar-fixed">
<a class="navbar-brand" href="#">
<strong>Strobe</strong>
</a>
<form class="form-inline">
<input class="form-control action-control mr-sm-2" type="number" placeholder="bars" min="0" ng-model="barCount">
<!-- <button class="btn btn-success mr-sm-2" type="submit" ng-disabled="selectedBar.loopIndex == undefined" ng-click="addAction()">Add <i class="fas fa-add"></i></button>
<input class="form-control action-control mr-sm-2" type="number" placeholder="start" max="{{selectedAction.end}}" ng-model="selectedAction.start">
<input class="form-control action-control mr-sm-2" type="number" placeholder="end" min="{{selectedAction.start}}" ng-model="selectedAction.end"> -->
<button type="button" class="btn btn-primary mr-sm-2" data-toggle="modal" data-target="#codeModal" ng-click="submit">
Code
</button>
<!-- <button class="btn btn-dark mr-sm-2" type="submit" ng-click="removeAction()" ng-disabled="!selectedAction.end">Remove
<i class="fas fa-remove"></i>
</button> -->
</form>
</nav>
<div class="body-content">
<div class="container-fluid">
<div class="bar-indicator">
<div class="bar bar-numbered" ng-repeat="a in [].constructor(barCount) track by $index">
<div class="badge badge-success badge-bar" ng-hide="$index%4">
<span ng-bind="$index"></span>
</div>
</div>
</div>
<div class="loop-indicator">
<div class="bar-loop-indicator" ng-repeat="a in [].constructor(16) track by $index">
<div class="badge badge-success badge-loop">
<span ng-bind="$index + 1"></span>
</div>
</div>
</div>
<div class="loops-container">
<div class="loop" ng-repeat="loop in loops">
<div class="bar" ng-repeat="bar in [].constructor(barCount) track by $index" ng-mousedown="addAction($parent.$index, $index, $index + 1)" ng-mouseover="!isMouseClicked || addAction($parent.$index, $index, $index + 1)" ng-class="{'active': $parent.$index == selectedBar.loopIndex && $index == selectedBar.barIndex}"></div>
<div class="action" on-resize="test()" ng-repeat="action in loop" ng-class="{'active': action == selectedAction}" ng-style="{'left': action.start*64 + 'px', 'width': (action.end - action.start)*64 + 'px'}" ng-click="selectAction(action, $parent.$index)"
ng-right-click="removeAction(action, $parent.$index, $index)"></div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="codeModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">code</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="message-text" class="col-form-label">Data:</label>
<textarea class="form-control" rows="10" id="message-text" ng-model="code"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
<!-- lib -->
<script src="scripts/lib/jquery-3.3.1.min.js"></script>
<script src="scripts/lib/angular.min.js"></script>
<script src="scripts/lib/bootstrap.min.js"></script>
<!-- app -->
<script src="scripts/app/main.js"></script>
<script src="scripts/app/loops.js"></script>
</body>
</html>