404.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /**
  3. * BCJD 导航 - 404 页面
  4. */
  5. require_once __DIR__ . '/../init.php';
  6. http_response_code(404);
  7. ?><!doctype html>
  8. <html lang="zh-CN">
  9. <head>
  10. <meta charset="utf-8" />
  11. <meta name="viewport" content="width=device-width,initial-scale=1" />
  12. <meta name="color-scheme" content="light dark" />
  13. <title><?= htmlspecialchars(APP_NAME, ENT_QUOTES, 'UTF-8') ?> - 页面未找到</title>
  14. <link rel="stylesheet" href="style.css" />
  15. <style>
  16. .error-wrap {
  17. text-align: center;
  18. padding: 80px 20px;
  19. }
  20. .error-code {
  21. font-size: 72px;
  22. font-weight: 800;
  23. line-height: 1;
  24. background: linear-gradient(135deg, var(--danger), var(--primary));
  25. -webkit-background-clip: text;
  26. -webkit-text-fill-color: transparent;
  27. background-clip: text;
  28. margin-bottom: 16px;
  29. }
  30. .error-msg {
  31. font-size: 18px;
  32. color: var(--muted);
  33. margin-bottom: 32px;
  34. }
  35. .error-link {
  36. display: inline-block;
  37. padding: 12px 28px;
  38. border-radius: 999px;
  39. background: var(--primary);
  40. color: #fff;
  41. text-decoration: none;
  42. font-size: 15px;
  43. transition: opacity .2s;
  44. }
  45. .error-link:hover {
  46. opacity: .85;
  47. }
  48. </style>
  49. </head>
  50. <body class="index-page">
  51. <div class="wrap">
  52. <header>
  53. <div class="brand">
  54. <h1><a href="index.php" style="color:inherit;text-decoration:none"><?= htmlspecialchars(APP_NAME, ENT_QUOTES, 'UTF-8') ?></a></h1>
  55. <div class="sub">统一入口 · 快速跳转</div>
  56. </div>
  57. </header>
  58. <div class="error-wrap">
  59. <div class="error-code">404</div>
  60. <div class="error-msg">你访问的页面不存在</div>
  61. <a href="index.php" class="error-link">← 返回首页</a>
  62. </div>
  63. <footer>
  64. <div class="mono">Updated (UTC+8): <span id="ts">--</span></div>
  65. </footer>
  66. </div>
  67. <script>
  68. (function(){
  69. 'use strict';
  70. const TZ = "Asia/Shanghai";
  71. const fmt = new Intl.DateTimeFormat("zh-CN", {
  72. timeZone: TZ, year: "numeric", month: "2-digit", day: "2-digit",
  73. hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false,
  74. });
  75. function tick(){
  76. document.getElementById("ts").textContent = fmt.format(new Date());
  77. }
  78. tick(); setInterval(tick, 1000);
  79. })();
  80. </script>
  81. </body>
  82. </html>