add error templates

This commit is contained in:
mst 2024-12-16 16:50:24 +03:00
parent 785273128d
commit 388bd29573
4 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,4 @@
{% extends 'errors/base.html' %}
{% set error_code = '404' %}
{% set error_title = 'Not Found' %}
{% set error_description = 'The requested resource could not be found.' %}

View file

@ -0,0 +1,4 @@
{% extends 'errors/base.html' %}
{% set error_code = '500' %}
{% set error_title = 'Internal Server Error' %}
{% set error_description = 'The server was unable to complete your request. Please try again later. If this problem persists, please contact the admin of this {} instance.'.format(const.appName) %}

View file

@ -0,0 +1,4 @@
{% extends 'errors/base.html' %}
{% set error_code = '502' %}
{% set error_title = 'Bad Gateway' %}
{% set error_description = 'The server was unable to complete your request. Please try again later. If this problem persists, please contact the admin of this {} instance.'.format(const.appName) %}

View file

@ -0,0 +1,9 @@
{% extends 'base.html' %}
{% block title %}{{ error_title }}{% endblock %}
{% block content %}
<div class="mx-auto mb-5 pb-5">
<h1 class="mt-5 pt-5 text-center display-1 text-body-secondary">{{ error_code }}</h1>
<h2 class="text-center fw-normal">{{ error_title }}</h2>
<p class="lead text-center">{{ error_description }}<br><br><a class="btn btn-primary px-5" href="{{ url_for('index') }}">Home</a></p>
</div>
{% endblock %}