2022-02-14 19:16:09 +09:00
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<style>
|
|
|
|
:root {
|
2022-02-15 19:11:53 +09:00
|
|
|
--link-color: #42a5d7;
|
2022-02-14 19:16:09 +09:00
|
|
|
--padding: 1ch;
|
|
|
|
}
|
|
|
|
body {
|
|
|
|
margin: 0;
|
|
|
|
height: 13ch;
|
|
|
|
color: white;
|
|
|
|
}
|
|
|
|
a {
|
2022-02-15 19:11:53 +09:00
|
|
|
color: var(--link-color);
|
2022-02-14 19:16:09 +09:00
|
|
|
}
|
2022-02-15 19:11:53 +09:00
|
|
|
.pseudolink {
|
|
|
|
color: var(--link-color);
|
2022-02-14 19:16:09 +09:00
|
|
|
cursor: pointer;
|
|
|
|
}
|
2022-02-15 19:11:53 +09:00
|
|
|
.pseudolink:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
2022-02-14 19:16:09 +09:00
|
|
|
.tripcode {
|
|
|
|
padding: 0 4px;
|
|
|
|
border-radius: 7px;
|
|
|
|
font-family: monospace;
|
2022-02-15 19:11:53 +09:00
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
#tripcode {
|
|
|
|
cursor: pointer;
|
|
|
|
margin-right: 4px;
|
2022-02-14 19:16:09 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
#notice {
|
2022-02-15 19:11:53 +09:00
|
|
|
display: grid;
|
|
|
|
padding: var(--padding);
|
2022-02-14 19:16:09 +09:00
|
|
|
text-align: center;
|
|
|
|
color: white;
|
|
|
|
text-decoration: none;
|
|
|
|
height: 100%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
#notice h1 {
|
|
|
|
font-size: 18pt;
|
|
|
|
margin: 0;
|
2022-02-15 19:11:53 +09:00
|
|
|
line-height: 1.25;
|
2022-02-14 19:16:09 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
#chat-form, #appearance-form {
|
|
|
|
padding: var(--padding);
|
|
|
|
height: 100%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
grid-gap: 0.75ch;
|
|
|
|
}
|
|
|
|
#chat-form {
|
|
|
|
display: grid;
|
|
|
|
grid: auto 2rem / auto 8ch;
|
|
|
|
grid-gap: 0.75ch;
|
|
|
|
}
|
2022-02-15 19:11:53 +09:00
|
|
|
#chat-form__comment {
|
2022-02-14 19:16:09 +09:00
|
|
|
resize: none;
|
|
|
|
grid-column: 1 / span 2;
|
|
|
|
background-color: #434347;
|
|
|
|
border-radius: 4px;
|
|
|
|
border: 2px solid transparent;
|
|
|
|
transition: 0.25s;
|
|
|
|
padding: 1.5ch;
|
|
|
|
color: #c3c3c7;
|
|
|
|
}
|
2022-02-15 19:11:53 +09:00
|
|
|
#chat-form__comment:not(:focus):hover {
|
2022-02-14 19:16:09 +09:00
|
|
|
border-color: #737377;
|
|
|
|
}
|
2022-02-15 19:11:53 +09:00
|
|
|
#chat-form__comment:focus {
|
2022-02-14 19:16:09 +09:00
|
|
|
background-color: black;
|
|
|
|
border-color: #3584e4;
|
|
|
|
}
|
|
|
|
|
|
|
|
#appearance-form {
|
|
|
|
grid-auto-rows: 1fr 1fr 2rem;
|
|
|
|
grid-auto-columns: min-content 1fr min-content;
|
|
|
|
}
|
|
|
|
#appearance-form__label-password,
|
|
|
|
#appearance-form__password,
|
|
|
|
#password-column,
|
|
|
|
#hide-password {
|
|
|
|
grid-row: 2;
|
|
|
|
}
|
|
|
|
#appearance-form__buttons {
|
|
|
|
grid-column: 1 / span 3;
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: auto 8ch;
|
|
|
|
}
|
|
|
|
|
|
|
|
#password-toggle,
|
|
|
|
#appearance-form__password {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
#hide-password {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
#password-toggle:checked + #cleared-toggle:not(:checked) ~ #appearance-form__password {
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
#password-toggle:checked + #cleared-toggle:not(:checked) ~ #hide-password {
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
#password-toggle:checked + #cleared-toggle:not(:checked) + #password-column {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
#cleared-toggle,
|
|
|
|
#cleared,
|
|
|
|
#hide-cleared {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
#cleared-toggle:checked + #password-column > #cleared,
|
|
|
|
#cleared-toggle:checked + #password-column > #hide-cleared {
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
#cleared-toggle:checked + #password-column > #tripcode,
|
|
|
|
#cleared-toggle:checked + #password-column > #show-cleared {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2022-02-15 19:11:53 +09:00
|
|
|
#appearance-form {
|
2022-02-14 19:16:09 +09:00
|
|
|
display: none;
|
|
|
|
}
|
2022-02-15 19:11:53 +09:00
|
|
|
#appearance:target ~ #appearance-form {
|
2022-02-14 19:16:09 +09:00
|
|
|
display: grid;
|
|
|
|
}
|
2022-02-15 19:11:53 +09:00
|
|
|
#appearance:target ~ #chat-form {
|
|
|
|
display: none;
|
2022-02-14 19:16:09 +09:00
|
|
|
}
|
2022-02-15 19:11:53 +09:00
|
|
|
#chat:target ~ #appearance-form {
|
2022-02-14 19:16:09 +09:00
|
|
|
display: none;
|
|
|
|
}
|
2022-02-15 19:11:53 +09:00
|
|
|
{% if notice != none %}
|
|
|
|
#chat-form {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
#chat:target ~ #chat-form {
|
|
|
|
display: grid;
|
|
|
|
}
|
|
|
|
#chat:target ~ #notice,
|
|
|
|
#appearance:target ~ #notice {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
{% endif %}
|
2022-02-14 19:16:09 +09:00
|
|
|
</style>
|
|
|
|
</head>
|
2022-02-15 19:11:53 +09:00
|
|
|
<body>
|
|
|
|
<div id="chat"></div>
|
|
|
|
<div id="appearance"></div>
|
|
|
|
{% if notice != none %}
|
|
|
|
<a id="notice" {% if prefer_chat_form %}href="#chat"{% else %}href="#appearance"{% endif %}>
|
|
|
|
<header><h1>{{ notice }}</h1></header>
|
|
|
|
<small>Click to dismiss</small>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
<form id="chat-form" action="{{ url_for('nojs_submit_message', token=user.token) }}" method="post">
|
|
|
|
<input type="hidden" name="nonce" value="{{ nonce }}">
|
|
|
|
<textarea id="chat-form__comment" name="comment" placeholder="Send a message..." required rows="1" tabindex="1"></textarea>
|
|
|
|
<div id="chat-form__exit"><a href="#appearance">Settings</a></div>
|
|
|
|
<input id="chat-form__submit" type="submit" value="Chat" tabindex="2">
|
2022-02-14 19:16:09 +09:00
|
|
|
</form>
|
2022-02-15 19:11:53 +09:00
|
|
|
<form id="appearance-form" action="/{{ url_for('nojs_submit_appearance', token=user.token) }}" method="post">
|
2022-02-14 19:16:09 +09:00
|
|
|
<label for="appearance-form__name">Name:</label>
|
|
|
|
<input id="appearance-form__name" name="name" value="{{ user.name or '' }}" placeholder="{{ user.name or default_name }}">
|
|
|
|
<label id="appearance-form__label-password" for="appearance-form__password">Tripcode:</label>
|
|
|
|
<input id="password-toggle" name="set-tripcode" type="checkbox">
|
|
|
|
<input id="cleared-toggle" name="clear-tripcode" type="checkbox">
|
|
|
|
<div id="password-column">
|
|
|
|
{% if user.tripcode == none %}
|
2022-02-15 19:11:53 +09:00
|
|
|
<span class="tripcode">(no tripcode)</span>
|
|
|
|
<label for="password-toggle" class="show-password pseudolink" accesskey="s">set</label>
|
2022-02-14 19:16:09 +09:00
|
|
|
{% else %}
|
2022-02-15 19:11:53 +09:00
|
|
|
<label id="tripcode" for="password-toggle" class="show-password tripcode" style="background-color:{{ user.tripcode.background }};color:{{ user.tripcode.foreground }};" accesskey="s">{{ user.tripcode.digest }}digest</label>
|
|
|
|
<label id="show-cleared" for="cleared-toggle" class="pseudolink" accesskey="c">✗</label>
|
2022-02-14 19:16:09 +09:00
|
|
|
<div id="cleared" class="tripcode">(cleared)</div>
|
2022-02-15 19:11:53 +09:00
|
|
|
<label id="hide-cleared" for="cleared-toggle" class="pseudolink" accesskey="c">undo</label>
|
2022-02-14 19:16:09 +09:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-02-15 19:11:53 +09:00
|
|
|
<input id="appearance-form__password" name="password" type="password" placeholder="(tripcode password)">
|
|
|
|
<label id="hide-password" for="password-toggle" class="pseudolink" accesskey="s">✗</label>
|
2022-02-14 19:16:09 +09:00
|
|
|
<div id="appearance-form__buttons">
|
2022-02-15 19:11:53 +09:00
|
|
|
<div><a href="#chat">Return to chat</a></div>
|
2022-02-14 19:16:09 +09:00
|
|
|
<input type="submit" value="Update">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</body>
|
|
|
|
</html>
|