-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobscuriTV.html
397 lines (332 loc) · 10.6 KB
/
obscuriTV.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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
<html>
<body>
<!--contains everything-->
<div class="TV-and-box-container">
<h1>obscuri-tv</h1>
<!--invisible; mirrors opposite box-wrapper div in order to centre TV-->
<div class="box-wrapper" id="box-wrapper-left">
</div>
<!--contains whole TV, but not control box-->
<div id="TV-holder">
<div id="TV" class="TV-design">
<iframe id="TV-screen" src="" frameborder="0"></iframe>
</div>
<div id="TV-stalk" class="TV-design"></div>
<div id="TV-base" class="TV-design"></div>
</div>
<div class="box-wrapper" id="box-wrapper-right">
<div class="control-box TV-design">
<!--change-channel button-->
<button class="controls" id="button">change channel</button>
<!--middle box with three divs for scrolling texts-->
<div id="marquee-box" class="remove-on-phones">
<!--three divs, one for each scrolling text-->
<div class="marquee-holder">
<p id="marquee1"></p>
</div>
<div class="marquee-holder">
<p id="marquee2"></p>
</div>
<div class="marquee-holder">
<p id="marquee3"></p>
</div>
</div>
<!--button to submit new clip; via email-->
<form action="mailto:patrickdavies655@hotmail.com?subject=obscuri-TV clip suggestion" method="post" enctype="text/plain">
<button class="controls remove-on-phones" id="submit-new" type="submit" value="Submit new clip" onClick="submitForm(this.form1);">submit new clip</button>
</form>
</div>
</div>
</div>
</body>
</html>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
h1 {
text-align: center;
font-family: sans-serif;
}
.TV-and-box-container {
text-align: center;
width: 99%;
margin: 0 auto;
margin-bottom: 20px;
padding: 10% 3% 0 3%;
white-space:nowrap;
}
.TV-design {
background: url("https://s5.postimg.cc/droiw7g7b/kusama_fireflies-w500h333.jpg") no-repeat center;
}
#TV-holder {
width: 40%;
max-width: 350px;
margin: 1% 7% 0 7%;
border-radius: 4px;
display: inline-block;
text-align: center;
}
#TV {
border-radius: 4px;
position: relative;
padding-top: 54%;
}
#TV iframe {
position:absolute;
top:0;
left:0;
width:89.5%;
height:93%;
margin: 1.9% 3% 1.3% 5.3%;
background-color: black;
}
#TV-stalk{
width: 2.5%;
padding-top: 15%;
margin: auto;
border-bottom-left-radius: 50% -50%;
border-bottom-right-radius: 50% -50%;
}
#TV-base{
width: 20%;
padding-top: 4%;
margin: auto;
border-radius: 90px 90px 0px 0px;
}
.box-wrapper {
display: inline-block;
width: 19%;
padding-top: 2em;
max-width: 150px;
vertical-align: top;
}
.control-box {
border-radius: 4px;
width: 100%;
padding-top: 100%;
padding: 5px 5px 0 5px;
}
.controls {
position: relative;
padding-top: 30%;
width: 100%;
border-radius: 4px;
margin-bottom: 5px;
font-family: Lekton;
text-transform: uppercase;
background-color: white;
}
.controls:hover {
border-color: #FF8B2B;
cursor: pointer;
}
#button {
background: url("https://s5.postimg.cc/4wnolq9fb/l_orange_invert.jpg");
background-size: cover;
color: #FF4FF0;
letter-spacing: 1px;
}
#submit-new {
background: url("https://s5.postimg.cc/rlcvledzb/muck_black_paint_2.jpg");
background-size: cover;
color: #36FFFF;
letter-spacing: 1px;
}
#marquee-box {
width: 100%;
border-radius: 4px;
margin-bottom: 5px;
font-family: Lekton;
position: relative;
}
.marquee-holder {
padding-top: 15%;
width: 100%;
overflow: hidden;
position: relative;
background: black;
color: #D9D9D9;
}
/*--animates the scrolling text--*/
.marquee-holder p {
text-transform: lowercase;
position: absolute;
top: 7%;
left: 0;
width: auto;
height: 30%;
margin: 2% 0 0 0;
white-space: nowrap;
text-align: center;
/* Starting position */
-moz-transform:translateX(0%);
-webkit-transform:translateX(0%);
transform:translateX(0%);
/* Apply animation to this element */
-moz-animation: scroll-left 5000s linear infinite;
-webkit-animation: scroll-left 5000s linear infinite;
animation: scroll-left 5000s linear infinite;
}
/* Move it (define the animation) */
@-moz-keyframes scroll-left {
0% { -moz-transform: translateX(0%); }
100% { -moz-transform: translateX(-100%); }
}
@-webkit-keyframes scroll-left {
0% { -webkit-transform: translateX(0%); }
100% { -webkit-transform: translateX(-100%); }
}
@keyframes scroll-left {
0% {
-moz-transform: translateX(0%); /* Browser bug fix */
-webkit-transform: translateX(0%); /* Browser bug fix */
transform: translateX(0%);
}
100% {
-moz-transform: translateX(-100%); /* Browser bug fix */
-webkit-transform: translateX(-100%); /* Browser bug fix */
transform: translateX(-100%);
}
}
/*font sizes and media queries*/
html {
font-size: 18px;
}
.control-box {
font-size: .6rem;
}
.controls {
font-size: .6rem;
}
h1 {
font-size: 1.6em;
}
@media(max-width: 800px) {
html {
font-size: 16px;
}
}
/*removes the invisible left div and moves the control box underneath the TV, then resizes both*/
@media(max-width: 670px) {
html {
font-size: 18px;
}
#box-wrapper-left {
display: none;
}
#box-wrapper-right {
display: block;
width: 40%;
margin: auto;
}
#TV-holder {
width: 70%;
margin-top: 0;
}
}
@media(max-width: 400px) {
html {
font-size: 16px;
}
}
/*removes the scrolling texts and the submit-new-clip button, as these don't work on phones, yet...*/
@media(max-width: 350px) {
html {
font-size: 14px;
}
.remove-on-phones {
display: none;
}
}
</style>
<script>
//list of clips
var clipList = {
1:"https://streamable.com/s/kgasi/nansgm?autoplay=1",
2:"https://streamable.com/s/k1a1y/bzbys?autoplay=1",
3:"https://streamable.com/s/uwvgh/ilyzjv?autoplay=1",
4:"https://streamable.com/s/lo277/zrqzy?autoplay=1",
5:"https://streamable.com/s/2ti2g/nifrhi?autoplay=1",
6:"https://streamable.com/s/eszaa/fbueiw?autoplay=1",
7:"https://streamable.com/s/y5ews/ahiout?autoplay=1",
8:"https://streamable.com/s/gmy3s/idropf?autoplay=1",
9:"https://streamable.com/s/wutc2/ldqdqq?autoplay=1",
10:"https://streamable.com/s/6xxry/urxnzz?autoplay=1",
11:"https://streamable.com/s/3ad11/tniije?autoplay=1",
12:"https://streamable.com/s/az3l2/ztxcqt?autoplay=1",
13:"https://streamable.com/s/1mkk2/krucez?autoplay=1",
14:"https://streamable.com/s/6bqpm/mjngxh?autoplay=1",
15:"https://streamable.com/s/2iwcz/ezrbza?autoplay=1",
16:"https://streamable.com/s/kjvzw/qxowmi?autoplay=1",
17:"https://streamable.com/s/i3nae/maxcps?autoplay=1",
18:"https://streamable.com/s/xofs7/oceqpj?autoplay=1",
19:"https://streamable.com/s/cr54x/uglkkk?autoplay=1",
20:"https://streamable.com/s/heegb/nlicdy?autoplay=1",
21:"https://streamable.com/s/k5wmi/epdqpq?autoplay=1",
22:"https://streamable.com/s/esa3f/syatqd?autoplay=1",
23:"https://streamable.com/s/4hrpx/xxesaf?autoplay=1",
24:"https://streamable.com/s/t2rp4/kescf?autoplay=1",
25:"https://streamable.com/s/b7gs2/ipzohy?autoplay=1",
26:"https://streamable.com/s/o3xw6/nmxwt?autoplay=1",
27:"https://streamable.com/s/ynhpm/qlyuya?autoplay=1",
28:"https://streamable.com/s/s09h6/svaqwh?autoplay=1",
29:"https://streamable.com/s/61fvr/qdqcym?autoplay=1",
30:"https://streamable.com/s/c3rkr/pnrvif?autoplay=1",
31:"https://streamable.com/s/kl2lo/nwgrte?autoplay=1",
32:"https://streamable.com/s/cdxss/papt?autoplay=1",
33:"https://streamable.com/s/ay92n/fkisyd?autoplay=1",
34:"https://streamable.com/s/fq9c4/obaglv?autoplay=1",
35:"https://streamable.com/s/kyg7e/oeuoft?autoplay=1",
36:"https://streamable.com/s/1i40s/doiaox?autoplay=1",
37:"https://streamable.com/s/r78kv/kluauz?autoplay=1",
38:"https://streamable.com/s/pv52l/vsgghx?autoplay=1",
39:"https://streamable.com/s/8w2ef/mfftbk?autoplay=1",
40:"https://streamable.com/s/5urg1/oronyj?autoplay=1",
41:"https://streamable.com/s/gesoq/zffhaq?autoplay=1",
42:"https://streamable.com/s/419tw/mvziow?autoplay=1",
43:"https://streamable.com/s/djcng/xfehdv?autoplay=1",
44:"https://streamable.com/s/2ie0c/byvnri?autoplay=1",
45:"https://streamable.com/s/ibnpf/ngkigc?autoplay=1",
46:"https://streamable.com/s/oa7vs/brryjr?autoplay=1"
};
//selects random clip from clipList
var clipSelector = Math.floor(Math.random() * (Object.keys(clipList).length)) + 1;
//on page loading, sets the .src of the TV as the random clip selected above
document.getElementById("TV-screen").src = clipList[clipSelector];
//on button click, reloads .src of the TV with a new random clip from clipList
document.getElementById('button').onclick = function(){
var notSame = clipSelector;
//makes sure the selected clip is not the same as the current clip
while (clipSelector === notSame) {
clipSelector = Math.floor(Math.random() * (Object.keys(clipList).length)) + 1;
}
document.getElementById("TV-screen").src = clipList[clipSelector];
}
//the below sets texts in marquee to repeat 150/2000/200 times, so that they're very long
//this stops there being gaps on the screen after the single text has finishes
//as the texts are set to different lengths (150/2000/200), this makes them run at different speeds
var textsArray=['the endless generation and dissolution of expression, non-stop transformation of each expression into somethings else, operation consist in transcending what it themselves have produced, voiding expressively. ', 'the endless generation and dissolution of expression, non-stop transformation of each expression into somethings else, operation consist in transcending what it themselves have produced, void expressively. ', 'it affects only the new, what is produced under the condition of default and by the intermediary of metamorphosis. But it causes neither the condition nor the agent to return: on the contrary, it repudiates these and expels them with all its centrifugal force. '];
function makeLongTexts(texts) {
var longTextsArray = [];
for (var b=0; b<3; b++) {
var longText = "";
var lengths = [150, 2000, 200];
for (var i=0; i<lengths[b]; i++) {
longText+=texts[b];
}
longTextsArray.push(longText);
}
return longTextsArray;
}
var longTexts = makeLongTexts(textsArray);
var marquees = ["marquee1", "marquee2", "marquee3"];
//cycles through both marquees and longTexts, setting the three marquees as 1st, 2nd, 3rd texts, respectively
for (var j = 0; j < marquees.length; j++) {
var marqueeSelector = marquees[j];
document.getElementById(marqueeSelector).innerHTML = longTexts[j];
}
</script>