Aevann 2023-12-04 15:58:00 +02:00
parent aeb3f76e7b
commit b1700f4f2f
4 changed files with 6 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@ -6,7 +6,7 @@ from flask import redirect, render_template, request, session, g
from files.helpers.config.const import *
from files.helpers.settings import get_setting
from files.routes.wrappers import rpath
from files.routes.wrappers import rpath, get_logged_in_user
from files.__main__ import app, limiter
@ -38,7 +38,8 @@ 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', err=True, title=title, msg=msg, details=details, img=img), e.code
v = get_logged_in_user()
return render_template('errors/error.html', title=title, msg=msg, details=details, img=img, v=v), e.code
@app.errorhandler(401)
def error_401(e):

View File

@ -8,7 +8,7 @@
{% endblock %}
{% block banner %}
{% include "modals/expanded_image.html" %}
{% if err or '@' not in request.path %}
{% if not request.path.startswith('/@') %}
{% if IS_FISTMAS() and not (hole and hole.bannerurls) %}
{% include 'events/fistmas/banner.html' %}
{% elif IS_HOMOWEEN() and not (hole and hole.bannerurls) %}
@ -16,9 +16,7 @@
{% else %}
{% set path = "files/assets/images/" ~ SITE_NAME %}
{% if err and SITE_NAME == 'rDrama' %}
{% set src = "banner_error.webp" | asset_siteimg %}
{% elif hole and hole.bannerurls %}
{% if hole and hole.bannerurls %}
{% set src = hole.random_banner %}
{% set alt = ['/h/', hole, ' banner']|join %}
{% set class = 'site-banner-hole' %}

View File

@ -169,7 +169,7 @@
{% if not request.path.startswith('/search/') %}
<div class="flex-grow-1 d-fl {% if not v %}pad{% endif %}">
<form class="form-inline search d-mob-none flex-nowrap mx-0 mx-lg-auto mb-0" {% if err %}style="margin-right:40rem!important"{% endif %} action="{% if request.path.startswith('/search') %}{{request.path}}{% else %}/search/posts/{% endif %}" method="get">
<form class="form-inline search d-mob-none flex-nowrap mx-0 mx-lg-auto mb-0" 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}}" 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">