139 行
3.7 KiB
HTML
139 行
3.7 KiB
HTML
{##
|
|
# SPDX-FileCopyrightText: 2022 n9k <https://git.076.ne.jp/ninya9k>
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
##}
|
|
{% from 'macros/user.html' import appearance with context %}
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="content-security-policy" content="default-src 'none'; style-src 'nonce-{{ csp }}';">
|
|
<meta http-equiv="refresh" content="{{ refresh }}">
|
|
<style nonce="{{ csp }}">
|
|
html {
|
|
min-height: 100%;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
color: #ddd;
|
|
font-family: sans-serif;
|
|
background-color: #121214;
|
|
}
|
|
#timeout {
|
|
height: 0;
|
|
visibility: hidden;
|
|
animation: appear 0s {{ timeout }}s forwards;
|
|
}
|
|
#timeout > a {
|
|
display: block;
|
|
text-align: center;
|
|
background-color: #3674bf;
|
|
border: 4px outset #3584e4;
|
|
box-shadow: 0 0 5px #3584e4;
|
|
padding: 1.25ch 0;
|
|
box-sizing: border-box;
|
|
color: inherit;
|
|
font-size: 12pt;
|
|
font-weight: bold;
|
|
text-decoration: none;
|
|
animation: unskinny 0s {{ timeout }}s forwards;
|
|
}
|
|
#timeout header {
|
|
font-size: 20pt;
|
|
}
|
|
@keyframes appear {
|
|
to {
|
|
height: auto;
|
|
visibility: visible;
|
|
}
|
|
}
|
|
@keyframes unskinny {
|
|
to {
|
|
margin: 0.5rem;
|
|
}
|
|
}
|
|
#main {
|
|
margin: 0.5rem 0.75rem 0.875rem;
|
|
}
|
|
#main > h5 {
|
|
margin: 0;
|
|
}
|
|
#main > ul {
|
|
margin: 0;
|
|
padding-left: 0.75rem;
|
|
list-style: none;
|
|
}
|
|
.user {
|
|
line-height: 1.4375;
|
|
}
|
|
.user__insignia {
|
|
color: var(--chat-bg);
|
|
border: 1px outset #0000007f;
|
|
text-shadow: 0 0 1px var(--chat-bg-color);
|
|
background-color: orangered;
|
|
padding: 0 2px;
|
|
border-radius: 3px;
|
|
cursor: help;
|
|
}
|
|
.user__name {
|
|
font-weight: bold;
|
|
cursor: default;
|
|
}
|
|
.user__name__tag {
|
|
font-family: monospace;
|
|
font-size: 9pt;
|
|
vertical-align: top;
|
|
}
|
|
.tripcode {
|
|
padding: 0 5px;
|
|
border-radius: 7px;
|
|
font-family: monospace;
|
|
font-size: 9pt;
|
|
cursor: default;
|
|
}
|
|
|
|
{% for user_listed in users_watching + users_notwatching %}
|
|
[data-token-hash="{{ user_listed.token_hash }}"] > .user__name {
|
|
color: {{ user_listed.color }};
|
|
}
|
|
{% if user_listed.tripcode %}
|
|
[data-token-hash="{{ user_listed.token_hash }}"] > .tripcode {
|
|
background-color: {{ user_listed.tripcode.background_color }};
|
|
color: {{ user_listed.tripcode.foreground_color }};
|
|
}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<aside id="timeout">
|
|
<a href="">
|
|
<header>{{ locale.timed_out}} </header>
|
|
<small>{{ locale.click_to_refresh }}</small>
|
|
</a>
|
|
</aside>
|
|
<main id="main">
|
|
<h5>{{ locale.watching | format(users_watching | length) }}</h5>
|
|
<ul>
|
|
{% for user_listed in users_watching %}
|
|
<li class="user" data-token-hash="{{ user_listed.token_hash }}">
|
|
{{- appearance(user_listed, insignia_class='user__insignia', name_class='user__name', tag_class='user__name__tag') -}}
|
|
{%- if user.token == user_listed.token %}{{ locale.you }}{% endif -%}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<br>
|
|
<h5>{{ locale.not_watching | format(users_notwatching | length) }}</h5>
|
|
<ul>
|
|
{% for user_listed in users_notwatching %}
|
|
<li class="user" data-token-hash="{{ user_listed.token_hash }}">
|
|
{{- appearance(user_listed, insignia_class='user__insignia', name_class='user__name', tag_class='user__name__tag') -}}
|
|
{%- if user.token == user_listed.token %}{{ locale.you }}{% endif -%}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</main>
|
|
</body>
|
|
</html>
|