]> git.ipfire.org Git - pbs.git/commitdiff
web: Refactor the error page
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 19 Oct 2022 02:39:54 +0000 (02:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 19 Oct 2022 02:39:54 +0000 (02:39 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/errors/error.html

index ab90f74b65b27fe743cb0f2058135287c2b9c7ac..726c47eb4e93f5a28fe500125885e77ec7029a0b 100644 (file)
@@ -1,55 +1,26 @@
 {% extends "../base.html" %}
 
 {% block body %}
-       <div class="hero-unit">
-               {% block bigbox %}
-                       <h1>
-                               {% block bigbox_headline %}
-                                       {{ _("Oops! Don't panic.") }}
-                               {% end block %}
-                               <br>
-
-                               {% block bigbox_subtitle %}
-                                       <small>{{ _("An unexpected error happened.") }}</small>
-                               {% end block %}
-                       </h1>
-
-                       {% block explanation %}
-                               <p>
-                                       {{ _("Stay calm and read the text below to find out what went wrong.") }}
+       <section class="hero is-large is-light">
+               <div class="hero-body">
+                       <div class="container">
+                               <p class="title">
+                                       {{ _("Oops, something is not right...") }}
                                </p>
-                       {% end block %}
-               {% end block %}
-       </div>
-
-       {% block message %}
-               <div class="row">
-                       <div class="span12">
-                               <table class="table">
-                                       <tbody>
-                                               <tr>
-                                                       <td>{{ _("Error code") }}</td>
-                                                       <td>{{ status_code }} - {{ status_message }}</td>
-                                               </tr>
-
-                                               {% if current_user and current_user.is_admin() and tb %}
-                                                       <tr>
-                                                               <td colspan="2">
-                                                                       {{ _("Exception (traceback):") }}
-                                                                       <br><br>
-                                                                       <pre>{{ "".join(tb) }}</pre>
-                                                               </td>
-                                                       </tr>
-                                               {% end %}
-                                       </tbody>
-                               </table>
-
-                               <hr>                            
-                               <p>
-                                       {{ _("Please try going back to the previous page and try the action you did again in a moment.") }}
-                                       {{ _("If the error persists, you should consider to get in touch with an administrator.") }}
+                               <p class="subtitle">
+                                       {{ status_code }} - {{ status_message }}
                                </p>
                        </div>
                </div>
-       {% end block %}
+       </section>
+
+       {% if current_user and current_user.is_admin() and tb %}
+               <section class="section">
+                       <div class="container">
+                               <h4 class="title is-4">{{ _("Exception (Traceback):") }}</h4>
+
+                               <pre>{{ "".join(tb) }}</pre>
+                       </div>
+               </section>
+       {% end %}
 {% end %}