-
Notifications
You must be signed in to change notification settings - Fork 1
/
cover.html
77 lines (65 loc) · 2.1 KB
/
cover.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
<!--
~ Copyright © 2018 Valentin Sickert
~ This work is free. You can redistribute it and/or modify it under the
~ terms of the Do What The Fuck You Want To Public License, Version 2,
~ as published by Sam Hocevar. See the LICENSE file or http://www.wtfpl.net/
~ for more details.
-->
<!--
~ Created by: Valentin Sickert
~ Date: 29.10.18 23:41
~ Project: cover-display
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="Valentin Sickert">
<link rel="stylesheet" type="text/css" href="./assets/css/cover.min.css">
<link rel="stylesheet" type="text/css" href="https://use.fontawesome.com/releases/v5.4.2/css/all.css">
<title>Title</title>
<style>
* {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div style="position: relative; display: inline-block">
<img id="image" src="" alt="">
<div id="live" class="hidden in"><p><i class="fas fa-circle notLive"></i> <span>Off Air</span></p></div>
</div>
<script src="./assets/js/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="./assets/js/functions.js" type="text/javascript"></script>
<script>
let station = $_GET('station');
let station_url = "https://api.laut.fm/station/" + station;
let song_url = "https://api.laut.fm/station/" + station + "/current_song";
let show_onair = $_GET('onair');
let onair_display = $_GET('position');
let width = $_GET('width');
let height;
if ($_GET('height') == null) {
height = width
} else {
height = $_GET('height');
}
let live = false;
let song_str;
let station_img_url;
$('#live').css('width', width);
if (show_onair == 'true') {
$('#live').removeClass('hidden');
if (onair_display == 'bottom'){
$('#live').removeClass('in').addClass('bottom')
}
}
$.getJSON(station_url, function (station) {
station_img_url = station.images.station;
getCover(song_url, station_img_url);
coverLoop(song_url, station_img_url);
});
</script>
</body>
</html>