misuzu/templates/errors/master.twig

23 lines
842 B
Twig
Raw Normal View History

2022-09-13 13:14:49 +00:00
{% extends 'master.twig' %}
{% from 'macros.twig' import container_title %}
{# fuck it #}
{% set http_code = http_code|default(error_code) %}
{% block content %}
<div class="container">
{{ container_title((title|default(error_code|default(http_code) >= 400 ? '<i class="fas fa-exclamation-circle fa-fw"></i> Error' : '<i class="fas fa-info-circle fa-fw"></i> Information')) ~ ' ' ~ (error_code|default(http_code >= 400 ? http_code : '')) ~ (error_text is defined ? ' - ' ~ error_text : '')) }}
<div class="container__content">
{% if message is defined %}
<p>{{ message }}</p>
{% else %}
{% block error_message %}
<p>Try again later, perhaps.</p>
{% endblock %}
{% endif %}
</div>
</div>
{% endblock %}