-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
176 lines (163 loc) · 5.93 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
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>PIDasGIF</title>
<link rel="icon" type="image/x-icon" href="./images/favicon.ico">
<link rel="stylesheet" href="stylesheet.css">
</head>
<body>
<header>
<h1>PIDasGIF</h1>
<div>Create an animated GIF to simulate a passenger information display.</div>
</header>
<main>
<h2>You can edit this table</h2>
<div class="grid-container">
<div class="grid-item" id="wrapper">
<table contenteditable="true" spellcheck="false" id="pidTable">
<colgroup>
<col id="lineColumn">
<col id="destinationColumn">
<col id="departureColumn">
</colgroup>
<tr id="tr1">
<td class="lineCell">8</td>
<td class="destinationCell">Elsa-Brändström-Str.</td>
<td>sofort</td>
</tr>
<tr id="tr2">
<td class="lineCell">351</td>
<td class="destinationCell">Starpark</td>
<td>2 min</td>
</tr>
<tr id="tr3">
<td class="lineCell">34</td>
<td class="destinationCell">Heide-Uniklinikum</td>
<td>12:32</td>
</tr>
<tr id="tr4">
<td> i </td>
<td colspan="2" id="infoText">*** Bauarbeiten im Bereich Marktplatz *** Bauarbeiten im Bereich Marktplatz
*** Bauarbeiten im Bereich Marktplatz ***</td>
</tr>
</table>
</div>
<div class="grid-item">
<table id="lineControls">
<tr>
<th>Departure</th>
<th>Text</th>
<th>Info</th>
<th>Font Size</th>
</tr>
<tr>
<td>
<input type="radio" id="departure1" name="line_one" value="departure" checked>
</td>
<td>
<input type="radio" id="textRow1" name="line_one" value="textRow">
</td>
<td></td>
<td>
<input type="number" id="fontSize1" value=64 style="width:50px" min="0" max="400">
</td>
</tr>
<tr>
<td>
<input type="radio" id="departure2" name="line_two" value="departure" checked>
</td>
<td>
<input type="radio" id="textRow2" name="line_two" value="textRow">
</td>
<td></td>
<td>
<input type="number" id="fontSize2" value=64 style="width:50px" min="0" max="400">
</td>
</tr>
<tr>
<td>
<input type="radio" id="departure3" name="line_three" value="departure" checked>
</td>
<td>
<input type="radio" id="textRow3" name="line_three" value="textRow">
</td>
<td></td>
<td>
<input type="number" id="fontSize3" value=64 style="width:50px" min="0" max="400">
</td>
</tr>
<tr>
<td>
<input type="radio" id="departure4" name="line_four" value="departure">
</td>
<td>
<input type="radio" id="textRow4" name="line_four" value="textRow">
</td>
<td>
<input type="radio" id="infoText4" name="line_four" value="infoText" checked>
</td>
<td>
<input type="number" id="fontSize4" value=64 style="width:50px" min="0" max="400">
</td>
</tr>
</table>
</div>
</div>
<div id="controls">
<div>
<button onClick="addCanvas()">Add Slide</button>
<span id="shiftButton">
<button onClick="shiftLine()">Shift Info Text</button>
<button onClick="shiftLineAddCanvas()">Shift Info Text <br>and Add Slide</button>
</span>
<button onClick="window.location.reload(true)">Reload Page</button>
</div>
<div id="animationContainer">
<button onClick="mergeCanvases()">Create Animation</button>
<div>
<input type="range" min="100" max="3000" step="50" value="1500" id="slider">
<label for="slider">Animation interval: <span id="intervalValue"></span><br></label>
</div>
</div>
</div>
<div id="gifAnimationContainer">
<h2>Animation Result</h2>
<div class="grid-container">
<div class="grid-item">
<img id="gifAnimation">
</div>
<div class="grid-item">
<button onclick="downloadCanvas()">💾 Download GIF</button>
<div id="gifSize"></div>
</div>
<div class="grid-item" id="video-container">
<video id="video" controls autoplay loop></video>
</div>
<div class="grid-item" id="video-download-container">
<a style="text-decoration: none; color:inherit" id="downloadVideo" download="video.webm">
<button>💾 Download Video</button>
<div id="videoSize"></div>
</a>
</div>
</div>
</div>
<div id="slidesContainer">
<h2>Slides:<span id="slides"></span></h2>
</div>
</main>
<div id="github">
<a class="nav-link" href="https://github.com/KristjanESPERANTO/PIDasGIF/"><span class="github">View on
GitHub </span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path
d="M8 0a8 8 0 0 0-2.5 15.6c.4 0 .5-.2.5-.4v-1.5c-2 .4-2.5-.5-2.7-1 0-.1-.5-.9-.8-1-.3-.2-.7-.6 0-.6.6 0 1 .6 1.2.8.7 1.2 1.9 1 2.4.7 0-.5.2-.9.5-1-1.8-.3-3.7-1-3.7-4 0-.9.3-1.6.8-2.2 0-.2-.3-1 .1-2 0 0 .7-.3 2.2.7a7.4 7.4 0 0 1 4 0c1.5-1 2.2-.8 2.2-.8.5 1.1.2 2 .1 2.1.5.6.8 1.3.8 2.2 0 3-1.9 3.7-3.6 4 .3.2.5.7.5 1.4v2.2c0 .2.1.5.5.4A8 8 0 0 0 16 8a8 8 0 0 0-8-8z" />
</svg>
</a>
</div>
<script src="./third-party/html2canvas/html2canvas.js"></script>
<script src="./third-party/gif-js/gif.js"></script>
<script src="./third-party/webm-writer-js/webm-writer-0.3.0.js"></script>
<script src="./app.js"></script>
</body>
</html>