error.html 2.6 KB

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