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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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