diff --git a/anonstream/routes/nojs.py b/anonstream/routes/nojs.py index 1ba0dc3..981e3b4 100644 --- a/anonstream/routes/nojs.py +++ b/anonstream/routes/nojs.py @@ -45,12 +45,13 @@ async def nojs_chat_redirect(user): @with_user_from(request) async def nojs_users(user): users_by_presence = get_users_by_presence() - return await render_template( + return await render_template_with_etag( 'nojs_users.html', user=user, get_default_name=get_default_name, users_watching=users_by_presence[Presence.WATCHING], users_notwatching=users_by_presence[Presence.NOTWATCHING], + timeout=CONFIG['THRESHOLD_NOJS_CHAT_TIMEOUT'], ) @current_app.route('/chat/form.html') diff --git a/anonstream/templates/nojs_chat.html b/anonstream/templates/nojs_chat.html index 9b63799..35a8b28 100644 --- a/anonstream/templates/nojs_chat.html +++ b/anonstream/templates/nojs_chat.html @@ -33,7 +33,7 @@ text-decoration: none; transform: rotate(-180deg); } - #chat-timeout { + #timeout { z-index: 1; position: absolute; top: 0.5rem; @@ -41,15 +41,15 @@ visibility: hidden; animation: appear 0s {{ timeout }}s forwards; } - #chat-timeout header { + #timeout header { font-size: 20pt; } - #chat-timeout-dismiss { + #timeout-dismiss { position: absolute; bottom: 2px; width: calc(100% - 1rem); } - #chat-timeout-dismiss > .button { + #timeout-dismiss > .button { visibility: hidden; height: 0; padding: 0; @@ -58,12 +58,12 @@ appear 0s {{ timeout }}s forwards, unskinny 0s {{ timeout }}s forwards; } - #chat-timeout-alt { + #timeout-alt { padding: 4px 0 2px 0; } - #notimeout:target + #chat-timeout, - #notimeout:target ~ #chat-timeout-dismiss, - #notimeout:not(:target) ~ #chat-timeout-alt { + #notimeout:target + #timeout, + #notimeout:target ~ #timeout-dismiss, + #notimeout:not(:target) ~ #timeout-alt { display: none; } @keyframes appear { @@ -127,7 +127,7 @@
-