misuzu/templates/errors/master.twig

22 lines
842 B
Twig

{% 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 %}