hide user counter on other sites when num of users is under 100

master
Aevann1 2022-07-13 10:19:21 +02:00
parent dcc63c7834
commit 05fb4168e4
2 changed files with 33 additions and 24 deletions

View File

@ -13,21 +13,30 @@
}
</style>
{% if SITE_NAME == 'rDrama' %}
<div class="srd">
{% if SITE_NAME == 'rDrama' %}
{% include "journoid_banner.html" %}
{%- elif SITE_NAME == 'LGBDropTheT' -%}
LGB Drop The T
{%- elif not err -%}
<img src="/e/marseylowpoly.webp" height=18 width=28>
{% if v and v.admin_level > 1 and g.loggedin_counter %}
People here now: <a href="/admin/loggedin">{{g.loggedin_counter}} logged in</a>, <a href="/admin/loggedout">{{g.loggedout_counter}} logged out</a>
{% elif g.loggedout_counter %}
People here now: {{g.loggedin_counter}} logged in, {{g.loggedout_counter}} logged out
{% endif %}
{%- endif -%}
{% include "journoid_banner.html" %}
</div>
{% elif g.loggedout_counter+g.loggedin_counter > 100 and not err %}
<div class="srd">
<img src="/e/marseylowpoly.webp" height=18 width=28>
{% if v and v.admin_level > 1 %}
People here now: <a href="/admin/loggedin">{{g.loggedin_counter}} logged in</a>, <a href="/admin/loggedout">{{g.loggedout_counter}} logged out</a>
{% else %}
People here now: {{g.loggedin_counter}} logged in, {{g.loggedout_counter}} logged out
{% endif %}
</div>
{% else %}
<style>
body {padding-top: 54.62px !important}
@media (max-width: 767.98px) {
body {
padding-top: 44.05px !important
}
}
</style>
{% endif %}
<div class="navbar navbar-expand-md navbar-light" id="navbar">
<div class="container-fluid" style="padding:0;">

View File

@ -10,18 +10,18 @@
<img class="mb-4" alt="sidebar image" role="button" onclick="expandDesktopImage()" loading="lazy" src="{{image}}" width=100%>
</a>
<p class="mt-1 ml-2 mb-4 text-center">
{% if g.loggedin_counter %}
{% if g.loggedout_counter+g.loggedin_counter > 100 %}
<p class="mt-1 ml-2 mb-4 text-center">
<span id="sidebar--counter--total">{{ g.loggedin_counter + g.loggedout_counter }}</span>
{% endif %}
<span id="sidebar--counter--flavor"> people here now</span>
<span id="sidebar--counter--loggedin">({{ g.loggedin_counter }} logged in)</span>
{% if v and v.admin_level >= 2 -%}
<span id="sidebar--counter--admin">
<a href="/admin/loggedin">Logged In</a> | <a href="/admin/loggedout">Logged Out</a>
</span>
{%- endif %}
</p>
<span id="sidebar--counter--flavor"> people here now</span>
<span id="sidebar--counter--loggedin">({{ g.loggedin_counter }} logged in)</span>
{% if v and v.admin_level >= 2 -%}
<span id="sidebar--counter--admin">
<a href="/admin/loggedin">Logged In</a> | <a href="/admin/loggedout">Logged Out</a>
</span>
{%- endif %}
</p>
{% endif %}
<p class="text-center text-md mb-4">
<a class="sidebar-link" href="/badges" data-bs-toggle="tooltip" data-bs-placement="top" title="Badges"><i class="fas fa-hexagon"></i></a>