templates: Use a common template for error pages.

This commit is contained in:
Aman Agrawal 2024-05-31 05:21:14 +00:00 committed by Tim Abbott
parent 27d2b89412
commit dd70110166
17 changed files with 285 additions and 382 deletions

View File

@ -1,4 +1,4 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Error") }} | Zulip</title> <title>{{ _("Error") }} | Zulip</title>
@ -6,12 +6,9 @@
{% block portico_class_name %}error{% endblock %} {% block portico_class_name %}error{% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="container"> <div class="errorbox">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Page not found (404)") }}</h1> <h1 class="lead">{{ _("Page not found (404)") }}</h1>
<p> <p>
@ -21,8 +18,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Error") }} | Zulip</title> <title>{{ _("Error") }} | Zulip</title>
@ -6,11 +6,8 @@
{% block portico_class_name %}error{% endblock %} {% block portico_class_name %}error{% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <div class="errorbox">
<div class="container">
<div class="row-fluid">
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
{% if csrf_failure %} {% if csrf_failure %}
<h1 class="lead">{{ _("Access forbidden (403)") }}</h1> <h1 class="lead">{{ _("Access forbidden (403)") }}</h1>
@ -46,8 +43,5 @@
</p> </p>
{% endif %} {% endif %}
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Internal server error") }} | Zulip</title> <title>{{ _("Internal server error") }} | Zulip</title>
@ -11,12 +11,9 @@
{% block portico_class_name %}error{% endblock %} {% block portico_class_name %}error{% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="container"> <div class="errorbox">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Internal server error") }}</h1> <h1 class="lead">{{ _("Internal server error") }}</h1>
<p> <p>
@ -48,9 +45,5 @@
</p> </p>
{% endif %} {% endif %}
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,15 +1,12 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Confirmation link does not exist") }} | Zulip</title> <title>{{ _("Confirmation link does not exist") }} | Zulip</title>
{% endblock %} {% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="container"> <div class="errorbox">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Whoops. We couldn't find your confirmation link in the system.") }}</h1> <h1 class="lead">{{ _("Whoops. We couldn't find your confirmation link in the system.") }}</h1>
<p> <p>
@ -18,8 +15,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,21 +1,15 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Confirmation link expired or deactivated") }} | Zulip</title> <title>{{ _("Confirmation link expired or deactivated") }} | Zulip</title>
{% endblock %} {% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <img class="hourglass-img" src="{{ static('images/errors/timeout_hourglass.png') }}" alt=""/>
<div class="container"> <div class="errorbox">
<div class="row-fluid">
<img class="hourglass-img" src="{{ static('images/errors/timeout_hourglass.png') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Whoops. The confirmation link has expired or been deactivated.") }}</h1> <h1 class="lead">{{ _("Whoops. The confirmation link has expired or been deactivated.") }}</h1>
<p>{{ _("Please contact your organization administrator for a new link.") }}</p> <p>{{ _("Please contact your organization administrator for a new link.") }}</p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,15 +1,12 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Confirmation link malformed") }} | Zulip</title> <title>{{ _("Confirmation link malformed") }} | Zulip</title>
{% endblock %} {% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="container"> <div class="errorbox">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Whoops. The confirmation link is malformed.") }}</h1> <h1 class="lead">{{ _("Whoops. The confirmation link is malformed.") }}</h1>
<p>{{ _("Make sure you copied the link correctly in to your browser. If you're still encountering this page, it's probably our fault. We're sorry.") }}</p> <p>{{ _("Make sure you copied the link correctly in to your browser. If you're still encountering this page, it's probably our fault. We're sorry.") }}</p>
@ -19,8 +16,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Plan management not available") }} | Zulip</title> <title>{{ _("Plan management not available") }} | Zulip</title>
@ -6,12 +6,9 @@
{% block portico_class_name %}error{% endblock %} {% block portico_class_name %}error{% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="container"> <div class="errorbox">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Plan management not available") }}</h1> <h1 class="lead">{{ _("Plan management not available") }}</h1>
<p> <p>
@ -31,8 +28,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Plan management not available") }} | Zulip</title> <title>{{ _("Plan management not available") }} | Zulip</title>
@ -6,12 +6,9 @@
{% block portico_class_name %}error{% endblock %} {% block portico_class_name %}error{% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="container"> <div class="errorbox">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Plan management not available") }}</h1> <h1 class="lead">{{ _("Plan management not available") }}</h1>
<p> <p>
@ -27,8 +24,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,16 +1,12 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Rate limit exceeded") }} | Zulip</title> <title>{{ _("Rate limit exceeded") }} | Zulip</title>
{% endblock %} {% endblock %}
{% block portico_content %} {% block error_page_content %}
<img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="error_page"> <div class="errorbox">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Rate limit exceeded.") }}</h1> <h1 class="lead">{{ _("Rate limit exceeded.") }}</h1>
<p> <p>
@ -19,9 +15,5 @@
{% trans %}You can try again in {{retry_after}} seconds.{% endtrans %} {% trans %}You can try again in {{retry_after}} seconds.{% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,16 +1,12 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Authentication subdomain error") }} | Zulip</title> <title>{{ _("Authentication subdomain error") }} | Zulip</title>
{% endblock %} {% endblock %}
{% block portico_content %} {% block error_page_content %}
<img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="error_page"> <div class="errorbox">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Authentication subdomain") }}</h1> <h1 class="lead">{{ _("Authentication subdomain") }}</h1>
<p> <p>
@ -23,9 +19,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,16 +1,12 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Update required") }} | Zulip</title> <title>{{ _("Update required") }} | Zulip</title>
{% endblock %} {% endblock %}
{% block content %} {% block error_page_content%}
<img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="error_page"> <div class="errorbox config-error">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox config-error">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _('Update required') }}</h1> <h1 class="lead">{{ _('Update required') }}</h1>
<p> <p>
@ -35,10 +31,5 @@
</a> </a>
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -0,0 +1,12 @@
{% extends "zerver/portico.html" %}
{% block portico_content %}
<div class="error_page">
<div class="container">
<div class="row-fluid">
{% block error_page_content %}
{% endblock %}
</div>
</div>
</div>
{% endblock %}

View File

@ -1,16 +1,12 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Rate limit exceeded") }} | Zulip</title> <title>{{ _("Rate limit exceeded") }} | Zulip</title>
{% endblock %} {% endblock %}
{% block portico_content %} {% block error_page_content %}
<img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="error_page"> <div class="errorbox">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Rate limit exceeded.") }}</h1> <h1 class="lead">{{ _("Rate limit exceeded.") }}</h1>
<p> <p>
@ -19,9 +15,5 @@
{% trans %}You can try again in {{retry_after}} seconds.{% endtrans %} {% trans %}You can try again in {{retry_after}} seconds.{% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,15 +1,12 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Organization creation link required") }} | Zulip</title> <title>{{ _("Organization creation link required") }} | Zulip</title>
{% endblock %} {% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="container"> <div class="errorbox">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Organization creation link required") }}</h1> <h1 class="lead">{{ _("Organization creation link required") }}</h1>
<p> <p>
@ -19,8 +16,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,15 +1,12 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Organization creation link expired or invalid") }} | Zulip</title> <title>{{ _("Organization creation link expired or invalid") }} | Zulip</title>
{% endblock %} {% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <img class="hourglass-img" src="{{ static('images/errors/timeout_hourglass.png') }}" alt=""/>
<div class="container"> <div class="errorbox">
<div class="row-fluid">
<img class="hourglass-img" src="{{ static('images/errors/timeout_hourglass.png') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Organization creation link expired or invalid") }}</h1> <h1 class="lead">{{ _("Organization creation link expired or invalid") }}</h1>
<p> <p>
@ -18,8 +15,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Error") }} | Zulip</title> <title>{{ _("Error") }} | Zulip</title>
@ -6,12 +6,9 @@
{% block portico_class_name %}error{% endblock %} {% block portico_class_name %}error{% endblock %}
{% block portico_content %} {% block error_page_content %}
<div class="error_page"> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="container"> <div class="errorbox">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _("Unexpected Zulip server registration") }}</h1> <h1 class="lead">{{ _("Unexpected Zulip server registration") }}</h1>
<p> <p>
@ -24,8 +21,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,16 +1,12 @@
{% extends "zerver/portico.html" %} {% extends "zerver/portico_error_page.html" %}
{% block title %} {% block title %}
<title>{{ _("Unsupported browser") }} | Zulip</title> <title>{{ _("Unsupported browser") }} | Zulip</title>
{% endblock %} {% endblock %}
{% block portico_content %} {% block error_page_content %}
<img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="error_page"> <div class="errorbox config-error">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox config-error">
<div class="errorcontent"> <div class="errorcontent">
<h1 class="lead">{{ _('Unsupported browser') }}</h1> <h1 class="lead">{{ _('Unsupported browser') }}</h1>
<p> <p>
@ -30,10 +26,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}