FossilRepo

Make 500 error page standalone (no base.html dependency, no DB needed)

lmata 2026-04-07 16:55 trunk
Commit 5700b4c84b717b4654a294039cd282f6e88b1f0ab2f425c973a71600da1a3f41
1 file changed +33 -16
+33 -16
--- templates/500.html
+++ templates/500.html
@@ -1,16 +1,33 @@
1
-{% extends "base.html" %}
2
-{% block title %}Server Error — Fossilrepo{% endblock %}
3
-
4
-{% block content %}
5
-<div class="flex flex-col items-center justify-center py-20">
6
- <div class="text-6xl font-bold text-brand mb-4">500</div>
7
- <h1 class="text-2xl font-bold text-gray-100 mb-2">Something Went Wrong</h1>
8
- <p class="text-gray-400 mb-6 text-center max-w-md">
9
- An unexpected error occurred. The team has been notified.
10
- </p>
11
- <div class="flex gap-3">
12
- <a href="/" class="rounded-md bg-brand px-4 py-2 text-sm font-semibold text-white hover:bg-brand-hover">Go to Dashboard</a>
13
- <button onclick="history.back()" class="rounded-md bg-gray-700 px-4 py-2 text-sm font-semibold text-gray-100 ring-1 ring-inset ring-gray-600 hover:bg-gray-600">Go Back</button>
14
- </div>
15
-</div>
16
-{% endblock %}
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+<head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Server Error — Fossilrepo</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <style>:root { --brand: #DC394C; }</style>
9
+</head>
10
+<body class="bg-gray-950 text-gray-100 min-h-screen flex items-center justify-center">
11
+ <div class="text-center px-6">
12
+ <div class="mb-6">
13
+ <svg class="h-12 w-12 mx-auto text-[var(--brand)] opacity-60" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
14
+ <circle cx="12" cy="12" r="10" stroke-opacity="0.6"/>
15
+ <circle cx="12" cy="12" r="4" fill="currentColor" fill-opacity="0.3"/>
16
+ <path d="M12 2v4M12 18v4M2 12h4M18 12h4" stroke-opacity="0.4"/>
17
+ </svg>
18
+ <div class="mt-2 text-sm font-bold tracking-tight">
19
+ <span class="text-gray-100">fossil</span><span class="text-[var(--brand)]">repo</span>
20
+ </div>
21
+ </div>
22
+ <div class="text-7xl font-bold text-[var(--brand)] mb-4">500</div>
23
+ <h1 class="text-2xl font-bold text-gray-100 mb-2">Something Went Wrong</h1>
24
+ <p class="text-gray-400 mb-8 max-w-md mx-auto">
25
+ An unexpected error occurred. If this keeps happening, please contact your administrator.
26
+ </p>
27
+ <div class="flex gap-3 justify-center">
28
+ <a href="/" class="rounded-md bg-[var(--brand)] px-5 py-2.5 text-sm font-semibold text-white hover:opacity-90 transition">Go Home</a>
29
+ <button onclick="history.back()" class="rounded-md bg-gray-800 px-5 py-2.5 text-sm font-semibold text-gray-300 ring-1 ring-gray-700 hover:bg-gray-700 transition">Go Back</button>
30
+ </div>
31
+ </div>
32
+</body>
33
+</html>
1734
--- templates/500.html
+++ templates/500.html
@@ -1,16 +1,33 @@
1 {% extends "base.html" %}
2 {% block title %}Server Error — Fossilrepo{% endblock %}
3
4 {% block content %}
5 <div class="flex flex-col items-center justify-center py-20">
6 <div class="text-6xl font-bold text-brand mb-4">500</div>
7 <h1 class="text-2xl font-bold text-gray-100 mb-2">Something Went Wrong</h1>
8 <p class="text-gray-400 mb-6 text-center max-w-md">
9 An unexpected error occurred. The team has been notified.
10 </p>
11 <div class="flex gap-3">
12 <a href="/" class="rounded-md bg-brand px-4 py-2 text-sm font-semibold text-white hover:bg-brand-hover">Go to Dashboard</a>
13 <button onclick="history.back()" class="rounded-md bg-gray-700 px-4 py-2 text-sm font-semibold text-gray-100 ring-1 ring-inset ring-gray-600 hover:bg-gray-600">Go Back</button>
14 </div>
15 </div>
16 {% endblock %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
--- templates/500.html
+++ templates/500.html
@@ -1,16 +1,33 @@
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>Server Error — Fossilrepo</title>
7 <script src="https://cdn.tailwindcss.com"></script>
8 <style>:root { --brand: #DC394C; }</style>
9 </head>
10 <body class="bg-gray-950 text-gray-100 min-h-screen flex items-center justify-center">
11 <div class="text-center px-6">
12 <div class="mb-6">
13 <svg class="h-12 w-12 mx-auto text-[var(--brand)] opacity-60" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
14 <circle cx="12" cy="12" r="10" stroke-opacity="0.6"/>
15 <circle cx="12" cy="12" r="4" fill="currentColor" fill-opacity="0.3"/>
16 <path d="M12 2v4M12 18v4M2 12h4M18 12h4" stroke-opacity="0.4"/>
17 </svg>
18 <div class="mt-2 text-sm font-bold tracking-tight">
19 <span class="text-gray-100">fossil</span><span class="text-[var(--brand)]">repo</span>
20 </div>
21 </div>
22 <div class="text-7xl font-bold text-[var(--brand)] mb-4">500</div>
23 <h1 class="text-2xl font-bold text-gray-100 mb-2">Something Went Wrong</h1>
24 <p class="text-gray-400 mb-8 max-w-md mx-auto">
25 An unexpected error occurred. If this keeps happening, please contact your administrator.
26 </p>
27 <div class="flex gap-3 justify-center">
28 <a href="/" class="rounded-md bg-[var(--brand)] px-5 py-2.5 text-sm font-semibold text-white hover:opacity-90 transition">Go Home</a>
29 <button onclick="history.back()" class="rounded-md bg-gray-800 px-5 py-2.5 text-sm font-semibold text-gray-300 ring-1 ring-gray-700 hover:bg-gray-700 transition">Go Back</button>
30 </div>
31 </div>
32 </body>
33 </html>
34

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button