-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
235 lines (205 loc) · 7.61 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<!DOCTYPE HTML>
<html>
<head>
<title>Cross-Platform AutoCue</title>
<!-- Mobile Specific Meta Tags -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="css/jquery-ui.css" />
<link rel="stylesheet" href="css/style.css?v=0.5">
<link rel="stylesheet" href="css/colors.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/settings.css">
<meta name="description" content="Web AutoCue">
<meta name="author" content="Stefan Lazic">
<style>
.custom-file-input::-webkit-file-upload-button {
visibility: hidden;
}
input[type=file] {
color: transparent;
}
.custom-file-input::after {
vertical-align: middle;
}
.custom-file-input::before {
/*content: 'Load a file';*/
display: inline-block;
border: 1px solid #999;
border-radius: 3px;
padding: 5px 8px;
outline: none;
white-space: nowrap;
-webkit-user-select: none;
cursor: pointer;
font-size: 1.5em;
color: #fff;
}
.custom-file-input:hover::before {
border-color: #02C3D9;
color: #02C3D9;
}
</style>
</head>
<script>
var nw = require('nw.gui');
var win = nw.Window.get();
win.isMaximized = false;
</script>
<body id="gui">
<header>
<ul>
<li>
<a href='#' title='Close' id='windowControlClose'></a>
</li>
<li>
<a href='#' title='Maximize' id='windowControlMaximize'></a>
</li>
<li>
<a href='#' title='Minimize' id='windowControlMinimize'></a>
</li>
</ul>
<nav>
<div class="buttons">
<div id="tools">
<div id="doc_opt">
<ul>
<li><span class="clock">00:00:00</span></li>
<li>
<a class="button icon-play play" href="#" onclick="return false;" title="Play"></a>
</li>
<li>
<a class="button icon-undo reset" href="#" onclick="return false;" title="Reset"></a>
</li>
<li>
<a class="button icon-text-width flipx" href="#" onclick="Flip()" title="Flip"></a>
</li>
<li>
<a class="button icon-adjust" href="#" onclick="Overlay()" title="Hide/Show Overlay"></a>
</li>
<li>
<select id="fontsize" onChange="fPX(value)">]
<option>Font Size</option>
<option value="10">10 px</option>
<option value="20">20 px</option>
<option value="30">30 px</option>
<option value="40">40 px</option>
<option value="50">50 px</option>
<option value="60">60 px</option>
<option value="70">70 px</option>
<option value="80">80 px</option>
<option value="90">90 px</option>
<option value="100">100 px</option>
</select>
</li>
<li>
<div class="image-upload">
<label for="file-input">
<i class="icon-file-text-alt custom-file-input"></i>
</label>
<input id="file-input" type="file" />
</div>
</li>
<!-- <li><a class="js-external-link button icon-github" onclick="javascript:gui.Shell.openExternal(https://github.com/oxhey)" href="#" target="_blank"></a></li> -->
</ul>
</div>
</div>
</div>
</nav>
</header>
<script>
// Min
document.getElementById('windowControlMinimize').onclick = function () {
win.minimize();
};
// Close
document.getElementById('windowControlClose').onclick = function () {
win.close();
gui.App.closeAllWindows();
};
// Max
document.getElementById('windowControlMaximize').onclick = function () {
if (win.isMaximized)
win.unmaximize();
else
win.maximize();
};
win.on('maximize', function () {
win.isMaximized = true;
});
win.on('unmaximize', function () {
win.isMaximized = false;
});
</script>
<script src="js/jquery-1.10.1.min.js"></script>
<article>
<div class="overlay">
<div class="top"></div>
<div class="bottom"></div>
</div>
<div class="teleprompter" id="teleprompter" contenteditable> Oh, hello there </div>
<i class="icon-play marker"></i> </article>
<script src="js/jquery-1.10.1.min.js"></script>
<script src="js/jquery-ui.js"></script>
<script src="js/jquery.timer.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src="js/script.js"></script>
<script>
function Flip() {
$(".teleprompter").toggleClass("flipy");
}
</script>
<script>
function Overlay() {
$(".overlay").toggleClass("hideme");
}
</script>
<script>
$(document).keyup(function (e) {
switch (e.which) {
case 37: // left
decreaseSpeed();
break;
case 38: // up
break;
case 39: // right
increaseSpeed();
break;
case 40: // down
break;
default:
return; // exit this handler for other keys
}
e.preventDefault(); // prevent the default action (scroll / move caret)
});
</script>
<script>
function fPX() {
var a = document.getElementById("fontsize");
var b = a.options[a.selectedIndex].value;
window.document.getElementById("teleprompter").style.fontSize = b + 'px';
}
</script>
<script language="javascript">
function readSingleFile(e) {
var file = e.target.files[0];
if (!file) {
return;
}
var reader = new FileReader();
reader.onload = function (e) {
var contents = e.target.result;
displayContents(contents);
};
reader.readAsText(file);
}
function displayContents(contents) {
var element = document.getElementById('teleprompter');
element.innerHTML = contents;
}
document.getElementById('file-input')
.addEventListener('change', readSingleFile, false);
</script>
</body>
</html>