satyr/templates/base.njk
knotteye 25cf8a37a2 Big Commit!
Seriously, this one is pretty massive. Satyr now has proper sessions in the browser (like a real website), and a lot of changes were made.

API Endpoints were changed from requiring a username and password to requiring a valid JsonWebToken, obtained from /api/login
Satyr will generate a PEM format key for JWT signing and verification on startup if it can't find one at config/jwt.pem
This file was added to .gitignore
Two new depencies: cookie-parser and jose, for reading and signing JWTs.

Refactored http.ts into mutiple functions, with a couple helper functions related to cookies and JWT decoding and verification. Socket.IO chat will also automatically log in users with a valid JWT.

Refactor api.ts to reflect new requirements from endpoints.

Minor bugfix in server.ts so we don't throw an uncaught exception when rejecting a stream with an invalid key.

Transcode options readded to default.toml. They do nothing and they are not sane defaults. Both of those things are in the todo list.
2019-12-03 19:51:14 -06:00

36 lines
1.1 KiB
Plaintext

<!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>
</head>
<body>
<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://gitlab.com/knotteye/satyr">About</a></br>
<a href="https://gitlab.com/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>