forked from MarseyWorld/MarseyWorld
82 lines
3.0 KiB
HTML
82 lines
3.0 KiB
HTML
{% extends "default.html" %}
|
|
|
|
{% block title %}
|
|
<title>{{SITE_NAME}} - Live</title>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<style>
|
|
tr:hover {
|
|
border: 2.5px solid var(--primary);
|
|
}
|
|
img.thumb {
|
|
border-radius: 4px;
|
|
}
|
|
</style>
|
|
<script>
|
|
function go_to(e, link) {
|
|
if (e.target.type != "submit")
|
|
window.open('{{link}}', '_blank');
|
|
}
|
|
</script>
|
|
<div class="px-2">
|
|
<h1 class="py-3"><i class="fas fa-circle mr-3" style="color:red"></i>Live</h1>
|
|
<div class="overflow-x-auto">
|
|
<table class="table table-striped mb-5">
|
|
<tbody>
|
|
{% for id, link, thumb, name, title, viewers in live %}
|
|
<tr onclick="go_to(event,'{{link}}')">
|
|
<td width="48"><img class="thumb" src="{{thumb}}" alt="{{name}} thumbnail" referrerpolicy="no-referrer" width="48"></td>
|
|
<td>{{name}}</td>
|
|
<td>{{title}}</td>
|
|
<td>{{viewers}}</td>
|
|
{% if v and v.admin_level > 1 %}
|
|
<td>
|
|
<form action="/live/remove" method="post">
|
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
|
<input type="hidden" name="id" value="{{id}}">
|
|
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Remove Channel">
|
|
</form>
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<h1 class="py-3"><i class="fas fa-circle mr-3" style="color:gray"></i>Offline</h1>
|
|
<div class="overflow-x-auto">
|
|
<table class="table table-striped mb-5">
|
|
<tbody>
|
|
{% for id, link, thumb, name in offline %}
|
|
<tr onclick="go_to(event,'{{link}}')">
|
|
<td width="48"><img class="thumb" src="{{thumb}}" alt="{{name}} thumbnail" referrerpolicy="no-referrer" width="48"></td>
|
|
<td>{{name}}</td>
|
|
<td></td>
|
|
<td></td>
|
|
{% if v and v.admin_level > 1 %}
|
|
<td>
|
|
<form action="/live/remove" method="post">
|
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
|
<input type="hidden" name="id" value="{{id}}">
|
|
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Remove Channel">
|
|
</form>
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{% if v and v.admin_level > 1 %}
|
|
<form action="/live/add" method="post">
|
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
|
<input class="form-control" style="display:inline;width:350px" autocomplete="off" type="text" name="id" class="form-control" placeholder="Enter channel id..">
|
|
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Add Youtube Channel" style="margin-top:-5px">
|
|
</form>
|
|
<p class="mt-3">you can get the channel id using this site <a href="https://streamweasels.com/tools/youtube-channel-id-and-user-id-convertor" rel="nofollow noopener noreferrer" target="_blank">https://streamweasels.com/tools/youtube-channel-id-and-user-id-convertor</a></p>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %} |