-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
168 lines (139 loc) · 4.28 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
<html>
<head>
<link rel="stylesheet" href="libs/bootstrap/css/bootstrap.min.css"/ >
<script type="text/javascript" src="libs/jquery.js"></script>
<script src="libs/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="libs/angular.min.js"></script>
<script type="text/javascript" src="libs/underscore-min.js"></script>
<script type="text/javascript" src="libs/hyphenate.js"></script>
<script type="text/javascript" src="master.js"></script>
<title>Renga</title>
<style type="text/css">
body {
background-image: url('img/bodybg.jpg');
background-size: cover;
background-origin: 50% 90%;
}
.target-box {
width: 45px;
}
.line-green {
background-image:url('img/line_green.jpg');
background-repeat: no-repeat;
}
.line-green--0 {
background-size: 0% 100%;
}
.line-green--10 {
background-size: 10% 100%;
}
.line-green--20 {
background-size: 20% 100%;
}
.line-green--30 {
background-size: 30% 100%;
}
.line-green--40 {
background-size: 40% 100%;
}
.line-green--50 {
background-size: 50% 100%;
}
.line-green--60 {
background-size: 60% 100%;
}
.line-green--70 {
background-size: 70% 100%;
}
.line-green--80 {
background-size: 80% 100%;
}
.line-green--90 {
background-size: 90% 100%;
}
.line-green--100 {
background-size: 100% 100%;
}
.master {
background-color:rgba(250, 250, 250, 0.5);
}
.field-right:hover {
background-color: #ff0000;
}
.field-right:hover::before {
content: "[X] ";
}
</style>
</head>
<body ng-app="haiku">
<div ng-controller="Ctrl" class="container">
<form class="form row">
<div class="col-xs-12 col-sm-12 col-md-2 col-lg-2">
<div class="btn-group" role="group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
File
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#" data-toggle="modal" data-target="#importModal">Import</a></li>
<li><a href="#" ng-click="download()">Export</a></li>
</ul>
</div>
<div class="radio">
<label>
<input type="radio" name="splitter" value="api" ng-model="splitSource">
Dictionary API
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="slitter" id="splitAlgo" value="algo" checked ng-model="splitSource">
Algorithm
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" ng-model="keepCountsOnSave"> Keep syllable counts
</label>
</div>
<button type="button" class="btn btn-primary" ng-click="newStanza();">New Stanza</button>
</div>
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-10 panel panel-default master">
<div class="panel-body">
<div ng-repeat="l in lines" class="form-group {{l.status()}}">
<div class="input-group" ng-if="!l.dummy">
<div class="input-group-addon">
<line-target line="l"></line-target>
</div>
<input type="text" class="form-control line-green line-green--{{l.percent()}}" ng-model="l.raw" ng-blur="onLineChange(l)">
<div class="input-group-addon field-right" ng-bind="l.runningCount" ng-click="deleteLine($index)"></div>
</div>
<p ng-if="l.dummy"> </p>
</div>
</div>
</div>
</form>
<!-- Modal -->
<div class="modal fade" id="importModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Import song</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label>Select .txt file</label>
<input type="file" accept="text/plain" id="importFileField">
<div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" ng-click="import()">Import</button>
</div>
</div>
</div>
</div>
</div>
</body>
</html>