A self hosted livestreaming server.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 
satyr/templates/base.njk

69 lines
2.2 KiB

<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="/styles.css">
<link rel="stylesheet" type="text/css" href="/local.css">
<link rel="icon" type="image/svg" href="/logo.svg">
<title>{{ sitename }}</title>
<script>
//should check for and refresh login tokens on pageload..
if(document.cookie.match(/^(.*;)?\s*X-Auth-As\s*=\s*[^;]+(.*)?$/) !== null) {
var xhr = new XMLHttpRequest();
xhr.open("POST", "/api/login", true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.send("");
}
function makeRequest(method, url, payload) {
return new Promise(function (resolve, reject) {
let xhr = new XMLHttpRequest();
xhr.open(method, url);
xhr.onload = function () {
if (this.status >= 200 && this.status < 300) {
resolve(xhr.response);
} else {
reject({
status: this.status,
statusText: xhr.statusText
});
}
};
xhr.onerror = function () {
reject({
status: this.status,
statusText: xhr.statusText
});
};
!payload ? xhr.send() : xhr.send(payload);
});
}
</script>
{% block head %}
{% endblock %}
</head>
<body onload="startVideo()">
<div id="wrapper">
<div id="header">
<span style="float:left;"><h4><a href="/">{{ sitename }}</a> | <a href="/users">Users</a> <a href="/users/live">Live</a> <a href="/about">About</a></h4></span><span style="float:right;"><h4><a href="/help">Help</a> | {% if auth.is %}<a href="/profile">{{ auth.name }}{% else %}<a href="/login">Log In{% endif %}</a></h4></span>
</div>
<div id="content">
{% block content %}
{% endblock %}
</div>
<div id="footer">
<div>
<div>
<b>Satyr</b></br>
<a href="https://pond.waldn.net/git/knotteye/satyr">About</a></br>
<a href="https://pond.waldn.net/git/knotteye/satyr/releases">v{{ version }}</a>
</div>
<div>
<img src="/logo.svg" height="50" />
</div>
<div>
<b>{{ sitename }}</b></br>
<a href="/about">About</a></br>
<a href="mailto:{{ email }}">Contact</a>
</div>
</div>
</div>
</div>
</body>