anonstream/anonstream/templates/nojs_chat.html

147 行
3.9 KiB
HTML
Raw 通常表示 履歴

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="4">
<style>
html {
height: 100%;
}
body {
margin: 0;
padding: 0.5rem 0.5rem 0 0.5rem;
min-height: 100%;
box-sizing: border-box;
color: #ddd;
font-family: sans-serif;
font-size: 11pt;
transform: rotate(180deg);
}
.button {
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;
transform: rotate(-180deg);
}
#chat-timeout {
z-index: 1;
position: absolute;
top: 0.5rem;
width: calc(100% - 1rem);
visibility: hidden;
animation: appear 0s {{ timeout }}s forwards;
}
#chat-timeout header {
font-size: 20pt;
}
#chat-timeout-dismiss {
position: absolute;
bottom: 2px;
width: calc(100% - 1rem);
}
#chat-timeout-dismiss > .button {
visibility: hidden;
height: 0;
padding: 0;
border: none;
animation:
appear 0s {{ timeout }}s forwards,
unskinny 0s {{ timeout }}s forwards;
}
#chat-timeout-alt {
padding: 4px 0 2px 0;
}
#notimeout:target + #chat-timeout,
#notimeout:target ~ #chat-timeout-dismiss,
#notimeout:not(:target) ~ #chat-timeout-alt {
display: none;
}
@keyframes appear {
to {
visibility: visible;
}
}
@keyframes unskinny {
to {
height: auto;
padding: 1.25ch 0;
border: 4px outset #3584e4;
}
}
#chat-messages {
list-style: none;
margin: 0;
padding: 0;
min-height: 100%;
}
.chat-message {
padding: 0.5ch 0.75ch;
width: 100%;
box-sizing: border-box;
border-radius: 4px;
transform: rotate(-180deg);
}
.chat-message:hover {
background-color: #434347;
}
.chat-message__time {
color: #b2b2b3;
font-size: 10pt;
cursor: help;
}
.chat-message__name {
overflow-wrap: anywhere;
font-weight: bold;
/* color: attr("data-color"); */
2022-02-18 14:16:54 +09:00
cursor: default;
}
.chat-message__markup {
overflow-wrap: anywhere;
line-height: 1.3125;
}
2022-02-18 14:16:54 +09:00
.tripcode {
padding: 0 5px;
border-radius: 7px;
font-family: monospace;
font-size: 9pt;
cursor: default;
}
</style>
</head>
<body>
<div id="end"></div>
<div id="notimeout"></div>
<aside id="chat-timeout">
<a class="button" href="{{ url_for('nojs_chat_redirect') }}">
<header>Timed out</header>
<small>Click to refresh</small>
</a>
</aside>
<ol id="chat-messages">
{% for message in messages | reverse %}
<li class="chat-message" data-seq="{{ message.seq }}" data-token-hash="{{ user.token_hash }}">
2022-02-18 10:32:34 +09:00
{% with user = users_by_token[message.token] %}
<time class="chat-message__time" datetime="{{ message.date }}T{{ message.time_seconds }}Z" title="{{ message.date }} {{ message.time_seconds }}">{{ message.time_minutes }}</time>&nbsp;<span class="chat-message__name" style="color:{{ user.color }};">{{ user.name or get_default_name(user) }}</span>{% if user.tripcode %}<span class="for-tripcode">&nbsp;</span><span class="tripcode for-tripcode" style="background-color:{{ user.tripcode.background_color }};color:{{ user.tripcode.foreground_color }};">{{ user.tripcode.digest }}</span>{% endif %}:&nbsp;<span class="chat-message__markup">{{ message.markup }}</span>
{% endwith %}
</li>
{% endfor %}
</ol>
<aside id="chat-timeout-dismiss">
<a class="button" href="#notimeout">Hide timeout notice</a>
</aside>
<aside id="chat-timeout-alt">
<a class="button" href="{{ url_for('nojs_chat_redirect') }}">Click to refresh</a>
</aside>
</body>
</html>