error.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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>Error - DarkFi Block Explorer</title>
  7. <link rel="stylesheet" href="/static/layout.css">
  8. </head>
  9. <body>
  10. <header class="header">
  11. <div class="container flex justify-between items-center">
  12. <div class="logo">>DarkFi {{ network }} Blocks</div>
  13. <nav class="nav">
  14. <a href="/">Explorer</a>
  15. <a href="#">Stats</a>
  16. <a href="https://dark.fi/book/">Docs</a>
  17. <a href="https://codeberg.org/darkrenaissance/darkfi/">Code</a>
  18. </nav>
  19. </div>
  20. </header>
  21. <main class="container section">
  22. <div class="error-page">
  23. <div class="error-content">
  24. <h1 class="error-title">{{ error_code|default('Error') }}</h1>
  25. <p class="error-message">{{ error|default('An unexpected error occurred') }}</p>
  26. {% if error_code == '404' or error_code == 404 %}
  27. <div class="error-image">
  28. <img src="/static/darkfi25.jpg">
  29. <p class="error-image-caption">Is this what you're looking for?</p>
  30. </div>
  31. {% elif error_code == '500' or error_code == 500 %}
  32. <div class="error-image">
  33. <img src="/static/darkfi05.jpg">
  34. <p class="error-image-caption">Reality fractured beyond repair!</p>
  35. </div>
  36. {% endif %}
  37. <div class="error-actions">
  38. <a href="/" class="btn">Return to Home</a>
  39. <a href="javascript:history.back()" class="btn btn-outline">Go Back</a>
  40. </div>
  41. </div>
  42. </div>
  43. </main>
  44. <footer class="footer">
  45. <div class="container">
  46. <a href="https://dark.fi">Let there be Dark</a> · Code licensed under AGPL-3
  47. </div>
  48. </footer>
  49. <style>
  50. .error-page {
  51. display: flex;
  52. justify-content: center;
  53. align-items: center;
  54. min-height: 50vh;
  55. text-align: center;
  56. }
  57. .error-content {
  58. max-width: 500px;
  59. }
  60. .error-title {
  61. font-size: 4rem;
  62. color: var(--color-accent);
  63. margin-bottom: 1rem;
  64. border-left: none;
  65. padding: 0;
  66. }
  67. .error-message {
  68. font-size: 1.6rem;
  69. color: var(--color-muted);
  70. margin-bottom: 2rem;
  71. }
  72. .error-image {
  73. margin-bottom: 2rem;
  74. }
  75. .error-image img {
  76. max-width: 100%;
  77. height: auto;
  78. border-radius: 8px;
  79. }
  80. .error-image-caption {
  81. margin-top: 1rem;
  82. font-size: 1.4rem;
  83. color: var(--color-muted);
  84. font-style: italic;
  85. }
  86. .error-actions {
  87. display: flex;
  88. gap: 1rem;
  89. justify-content: center;
  90. }
  91. </style>
  92. </body>
  93. </html>