93 行
3.6 KiB
HTML
93 行
3.6 KiB
HTML
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="conent-security-policy" content="default-src 'none'">
|
|
{% if not debug %}<meta http-equiv="refresh" content="8">{% endif %}
|
|
<style>
|
|
body {margin: 0.5em;margin-bottom: 0;min-height: calc(100vh - 1em);transform: scaleX(-1);}
|
|
.inline-block {display: inline-block;}
|
|
.rotate {transform: rotate(-180deg);}
|
|
.reverse {direction: rtl;}
|
|
|
|
.comment {color: white;margin-bottom:0.375em;overflow:hidden;}
|
|
|
|
.name {font-weight: bold;unicode-bidi: isolate;}
|
|
.tripcode {
|
|
margin-left: 0.5em;
|
|
padding: 0 5px;
|
|
border-radius: 6px;
|
|
font-size: 90%;
|
|
font-family: monospace;
|
|
vertical-align: middle;
|
|
}
|
|
.message {margin-left: 0.5em;overflow-wrap: break-word;unicode-bidi: isolate;}
|
|
.camera {transform: scaleX(-1);text-shadow: 0px 0px 6px #ff8280;cursor: help;margin-right:0.25em;}
|
|
.time {font-size: 80%;color: gray;vertical-align:middle;margin-right:0.5em;}
|
|
|
|
input[type="submit"] {padding: 0;margin-bottom: 0.5em;}
|
|
div#refresh {
|
|
color: white;
|
|
background-color: gray;
|
|
position: sticky;
|
|
/*top: 100vh;*/ /* placement is correct with top when there is no scrollbar */
|
|
bottom: 0; /* placement is correct with bottom when there is a scrollbar */
|
|
padding: 1em;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
border-radius: 4px;
|
|
box-shadow: 0px 2px 4px black;
|
|
}
|
|
div#refresh {
|
|
animation: unhide 0s forwards 30s;
|
|
height: 0;
|
|
padding: 0;
|
|
visibility: hidden;
|
|
}
|
|
@keyframes unhide {
|
|
to {
|
|
height: revert;
|
|
padding: 1em;
|
|
visibility: visible;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
{% if broadcaster %}
|
|
<form action="/mod" method="post">
|
|
<div class="reverse">
|
|
<input class="rotate" type="submit" name="ban" value="Ban">
|
|
<input class="rotate" type="submit" name="hide" value="Hide">
|
|
<input class="rotate" type="submit" name="ban_purge" value="Ban and hide all">
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% for message in messages %}
|
|
<div class="comment rotate">
|
|
{% if not message['hidden'] %}
|
|
{% if broadcaster %}
|
|
<input type="checkbox" name="message_id[]" value="{{ message['id'] }}">
|
|
{% endif %}
|
|
<span class="time" title="{{ message['date'] }}">{{ message['time'] }}</span
|
|
{% if message['viewer']['broadcaster'] %}
|
|
><span class="camera" title="Broadcaster">🎥</span
|
|
{% endif %}
|
|
><span class="name" style="color:#{{ message['viewer']['colour'].hex() }};">{{ message['viewer']['nickname'] }}</span
|
|
{% if message['viewer']['tripcode']['string'] %}
|
|
><span class="tripcode" style="background-color:#{{ message['viewer']['tripcode']['background_colour'].hex() }};color:#{{ message['viewer']['tripcode']['foreground_colour'].hex() }};">{{ message['viewer']['tripcode']['string'] }}</span
|
|
{% endif %}
|
|
><span class="message">{{ message['text'] }}</span>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if broadcaster %}
|
|
</form>
|
|
{% endif %}
|
|
|
|
<a href="" style="text-decoration: none;"><div id="refresh" class="rotate">Manual refresh required</div></a>
|
|
|
|
</body>
|
|
</html>
|