mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-19 21:33:41 -05:00
add error templates
This commit is contained in:
parent
785273128d
commit
388bd29573
4 changed files with 21 additions and 0 deletions
4
templates/errors/404.html
Normal file
4
templates/errors/404.html
Normal 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.' %}
|
4
templates/errors/500.html
Normal file
4
templates/errors/500.html
Normal 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) %}
|
4
templates/errors/502.html
Normal file
4
templates/errors/502.html
Normal 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) %}
|
9
templates/errors/base.html
Normal file
9
templates/errors/base.html
Normal 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 %}
|
Loading…
Add table
Reference in a new issue