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

View File

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

View File

@ -1,13 +1,10 @@
{% 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">
{% block error_page_content %}
<img class="hourglass-img" src="{{ static('images/errors/timeout_hourglass.png') }}" alt=""/>
<div class="errorbox">
<div class="errorcontent">
@ -15,7 +12,4 @@
<p>{{ _("Please contact your organization administrator for a new link.") }}</p>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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