+error.svelte 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <script lang="ts">
  2. const isZh = localStorage.getItem('lang') === 'zh_CN';
  3. </script>
  4. <div class="flex h-screen flex-col items-center justify-center">
  5. <div class="flex flex-col items-center">
  6. <div class="flex items-center gap-1">
  7. <div class="text-primary dark:text-dark mb-4 text-9xl font-bold">4</div>
  8. <div>
  9. <svg viewBox="0 0 100 100" class="svg-spin size-20">
  10. <path
  11. fill-rule="evenodd"
  12. clip-rule="evenodd"
  13. d="M50 0V100C22.3858 100 0 77.6142 0 50C0 22.3858 22.3858 0 50 0Z"
  14. class="fill-dark"
  15. />
  16. <path
  17. fill-rule="evenodd"
  18. clip-rule="evenodd"
  19. d="M50 100V0C77.6142 0 100 22.3858 100 50C100 77.6142 77.6142 100 50 100Z"
  20. class="fill-primary"
  21. />
  22. <circle cx="50" cy="25" r="25" class="fill-primary" />
  23. <circle cx="50" cy="75" r="25" class="fill-dark" />
  24. <circle cx="50.25" cy="25.25" r="6.25" class="fill-dark" />
  25. <circle cx="50.25" cy="75.25" r="6.25" class="fill-primary" />
  26. </svg>
  27. </div>
  28. <div class="text-primary dark:text-dark mb-4 text-9xl font-bold">4</div>
  29. </div>
  30. <p class="mb-8 text-black/60 dark:text-white/60">{isZh ? '抱歉,页面未找到' : 'Sorry, page not found'}</p>
  31. <a href="/" class="bg-primary dark:bg-dark rounded px-6 py-2 text-white hover:opacity-90 dark:text-black">
  32. {isZh ? '返回首页' : 'Back to home'}
  33. </a>
  34. </div>
  35. </div>
  36. <style>
  37. @keyframes svg-spin {
  38. 0% {
  39. transform: rotate(360deg);
  40. }
  41. 100% {
  42. transform: rotate(0deg);
  43. }
  44. }
  45. .svg-spin {
  46. animation: svg-spin 8s linear infinite;
  47. }
  48. </style>