-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
145 lines (128 loc) · 4.25 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>M3U to HTML</title>
<link href="https://unpkg.com/@primer/css/dist/primer.css" rel="stylesheet" />
<style>
body {
margin: auto 15px;
}
ul {
list-style: none;
}
.Box-row {
display: flex;
align-items: center;
justify-content: space-between;
}
/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
visibility: hidden;
position: fixed;
z-index: 1;
left: 50%;
bottom: 30px;
}
/* Show the snackbar when clicking on a button (class added with JavaScript) */
#snackbar.show {
visibility: visible;
-webkit-animation: fadein 0.5s, fadeout 0.5s 1s;
animation: fadein 0.5s, fadeout 0.5s 1s;
}
/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
from {
bottom: 0;
opacity: 0;
}
to {
bottom: 30px;
opacity: 1;
}
}
@keyframes fadein {
from {
bottom: 0;
opacity: 0;
}
to {
bottom: 30px;
opacity: 1;
}
}
@-webkit-keyframes fadeout {
from {
bottom: 30px;
opacity: 1;
}
to {
bottom: 0;
opacity: 0;
}
}
@keyframes fadeout {
from {
bottom: 30px;
opacity: 1;
}
to {
bottom: 0;
opacity: 0;
}
}
</style>
</head>
<body>
<div class="container-lg container-sm mt-4">
<h1>
Convert M3U file to HTML
</h1>
<div class="col-xs-12 col-md-6 mt-3">
<div class="Box box-shadow">
<div class="Box-row">
<label for="file-selector">Upload a M3U file</label>
<input type="file" id="file-selector">
</div>
</div>
</div>
<div class="col-xs-12 mt-2">
<div id="loader">
<span class="mt-2">Loading<span class="AnimatedEllipsis"></span></span>
</div>
<div id="main">
<input class="form-control input-block" type="text" id="search-input" onkeyup="search()"
placeholder="Search" title="Type in a keyword">
<div id="list" class="Box mt-2">
<div class="Box-header">
<select id="select" onchange="filterItems(this)" class="form-select">
<option value="all">All Visible</option>
</select>
</div>
</div>
<p id="status"></p>
</div>
<div class="mt-5">
You can use <a href="https://raw.githubusercontent.com/a133xz/m3u-to-html/master/example.m3u"
target="_blank">this file</a> as example.
<p> Learn more about the project <a href="https://github.com/a133xz/m3u-to-html">on github.</a> You can
also <a href="https://antonio-r.now.sh/" target="_blank">visit my site 🤷♂️</a> .</p>
</div>
<div id="snackbar">
<div class="Toast Toast--success">
<span class="Toast-icon">
<!-- <%= octicon "check" %> -->
<svg width="12" height="16" viewBox="0 0 12 16" class="octicon octicon-check"
aria-hidden="true">
<path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z" />
</svg>
</span>
<span class="Toast-content">Link copied</span>
</div>
</div>
</div>
</div>
<script src=" main.js"></script>
</body>
</html>