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,10 +6,7 @@
{% 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="container">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -22,7 +19,4 @@
</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,10 +6,7 @@
{% 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="container">
<div class="row-fluid">
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
{% if csrf_failure %} {% if csrf_failure %}
@ -47,7 +44,4 @@
{% 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,10 +11,7 @@
{% 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="container">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/> <img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -49,8 +46,4 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,13 +1,10 @@
{% 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">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -19,7 +16,4 @@
</p> </p>
</div> </div>
</div> </div>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,13 +1,10 @@
{% 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">
<div class="container">
<div class="row-fluid">
<img class="hourglass-img" src="{{ static('images/errors/timeout_hourglass.png') }}" alt=""/> <img class="hourglass-img" src="{{ static('images/errors/timeout_hourglass.png') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -15,7 +12,4 @@
<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,13 +1,10 @@
{% 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">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/> <img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -20,7 +17,4 @@
</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,10 +6,7 @@
{% 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="container">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -32,7 +29,4 @@
</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,10 +6,7 @@
{% 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="container">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -28,7 +25,4 @@
</p> </p>
</div> </div>
</div> </div>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,14 +1,10 @@
{% 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 %}
<div class="error_page">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/> <img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -20,8 +16,4 @@
</p> </p>
</div> </div>
</div> </div>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,14 +1,10 @@
{% 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 %}
<div class="error_page">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/> <img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -24,8 +20,4 @@
</p> </p>
</div> </div>
</div> </div>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,14 +1,10 @@
{% 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%}
<div class="error_page">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox config-error"> <div class="errorbox config-error">
<div class="errorcontent"> <div class="errorcontent">
@ -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,14 +1,10 @@
{% 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 %}
<div class="error_page">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/> <img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -20,8 +16,4 @@
</p> </p>
</div> </div>
</div> </div>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,13 +1,10 @@
{% 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">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/500art.svg') }}" alt=""/> <img src="{{ static('images/errors/500art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -20,7 +17,4 @@
</p> </p>
</div> </div>
</div> </div>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,13 +1,10 @@
{% 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">
<div class="container">
<div class="row-fluid">
<img class="hourglass-img" src="{{ static('images/errors/timeout_hourglass.png') }}" alt=""/> <img class="hourglass-img" src="{{ static('images/errors/timeout_hourglass.png') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -19,7 +16,4 @@
</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,10 +6,7 @@
{% 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="container">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox"> <div class="errorbox">
<div class="errorcontent"> <div class="errorcontent">
@ -25,7 +22,4 @@
</p> </p>
</div> </div>
</div> </div>
</div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -1,14 +1,10 @@
{% 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 %}
<div class="error_page">
<div class="container">
<div class="row-fluid">
<img src="{{ static('images/errors/400art.svg') }}" alt=""/> <img src="{{ static('images/errors/400art.svg') }}" alt=""/>
<div class="errorbox config-error"> <div class="errorbox config-error">
<div class="errorcontent"> <div class="errorcontent">
@ -30,10 +26,5 @@
{% endtrans %} {% endtrans %}
</p> </p>
</div> </div>
</div> </div>
</div>
</div>
</div>
{% endblock %} {% endblock %}