Aevann1 2022-12-02 00:37:50 +02:00
parent 27506b36c2
commit ecc32382b2
3 changed files with 18 additions and 6 deletions

View File

@ -36,7 +36,7 @@ def error(e):
if request.headers.get("Authorization") or request.headers.get("xhr"):
return {"error": title, "code": e.code, "description": msg, "details": details}, e.code
img = ERROR_MARSEYS.get(e.code, 'marseyl')
return render_template('errors/error.html', title=title, msg=msg, details=details, img=img), e.code
return render_template('errors/error.html', err=True, title=title, msg=msg, details=details, img=img), e.code
@app.errorhandler(401)
def error_401(e):

View File

@ -65,7 +65,7 @@
</div>
<script defer src="{{'js/vendor/lozad.js' | asset}}"></script>
<script defer src="{{'js/vendor/lite-youtube.js' | asset}}"></script>
{% if v and v.spider %}
{% if not err and v and v.spider %}
<script defer src="{{'js/vendor/critters.js' | asset}}"></script>
<script defer src="{{'js/spider.js' | asset}}"></script>
{% endif %}

View File

@ -13,6 +13,7 @@
}
</style>
{% if not err %}
<div class="srd">
{% if SITE_NAME == 'rDrama' %}
{% if range(1,5) | random == 1 %}
@ -45,7 +46,16 @@
{{loggedin_counter+loggedout_counter}} people here now ({{loggedin_counter}} logged in)
{% endif %}
</div>
{% else %}
<style>
body {padding-top: 54px !important}
@media (max-width: 767.98px) {
body {
padding-top: 44px !important
}
}
</style>
{% endif %}
<div class="navbar navbar-expand-md navbar-light" id="navbar">
<div class="container-fluid" style="padding:0;">
<a href="/" class="navbar-brand mr-auto {% if not has_logo and not sub %}flex-grow-1{% endif %}">
@ -76,7 +86,7 @@
{% if not request.path.startswith('/search/') %}
<div class="flex-grow-1 d-fl d-mob-none {% if not v %}pad{% endif %}">
<form class="form-inline search flex-nowrap mx-0 mx-lg-auto" action="{% if request.path.startswith('/search') %}{{request.path}}{% else %}/search/posts/{% endif %}" method="get">
<form class="form-inline search flex-nowrap mx-0 mx-lg-auto" {% if err %}style="margin-right:40rem!important"{% endif %} action="{% if request.path.startswith('/search') %}{{request.path}}{% else %}/search/posts/{% endif %}" method="get">
<input autocomplete="off" class="form-control w-100" type="search" placeholder="{{search_placeholder}}" aria-label="Search" name="q" value="{{request.values.get('q', '')}}">
<span class="input-group-append">
<span class="input-group-text border-0 bg-transparent" style="margin-left: -2.5rem;">
@ -103,6 +113,7 @@
{% endif %}
{% endif %}
{% if not err %}
{% if v and v.admin_level >= PERMS['ADMIN_HOME_VISIBLE'] %}
<a class="mobile-nav-icon d-md-none" href="/admin"><i class="fas fa-crown align-middle text-gray-500 black"></i></a>
{% endif %}
@ -335,11 +346,12 @@
</li>
</ul>
</div>
{% endif %}
</div>
</div>
</nav>
{% if v %}
{% if v and not err %}
<div id="formkey" class="d-none">{{v|formkey}}</div>
{% endif %}