You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_offline.html 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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>Dify - Offline</title>
  7. <style>
  8. * {
  9. margin: 0;
  10. padding: 0;
  11. box-sizing: border-box;
  12. }
  13. body {
  14. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  15. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  16. min-height: 100vh;
  17. display: flex;
  18. align-items: center;
  19. justify-content: center;
  20. color: white;
  21. text-align: center;
  22. padding: 20px;
  23. }
  24. .container {
  25. max-width: 600px;
  26. background: rgba(255, 255, 255, 0.1);
  27. backdrop-filter: blur(10px);
  28. border-radius: 20px;
  29. padding: 40px;
  30. box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  31. }
  32. .icon {
  33. width: 100px;
  34. height: 100px;
  35. margin: 0 auto 30px;
  36. background: rgba(255, 255, 255, 0.2);
  37. border-radius: 20px;
  38. display: flex;
  39. align-items: center;
  40. justify-content: center;
  41. font-size: 48px;
  42. }
  43. h1 {
  44. font-size: 32px;
  45. font-weight: 600;
  46. margin-bottom: 15px;
  47. }
  48. p {
  49. font-size: 18px;
  50. line-height: 1.6;
  51. opacity: 0.9;
  52. margin-bottom: 30px;
  53. }
  54. button {
  55. background: white;
  56. color: #764ba2;
  57. border: none;
  58. padding: 15px 30px;
  59. font-size: 16px;
  60. font-weight: 600;
  61. border-radius: 50px;
  62. cursor: pointer;
  63. transition: transform 0.2s, box-shadow 0.2s;
  64. }
  65. button:hover {
  66. transform: translateY(-2px);
  67. box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  68. }
  69. button:active {
  70. transform: translateY(0);
  71. }
  72. @media (max-width: 640px) {
  73. .container {
  74. padding: 30px;
  75. }
  76. h1 {
  77. font-size: 24px;
  78. }
  79. p {
  80. font-size: 16px;
  81. }
  82. }
  83. </style>
  84. </head>
  85. <body>
  86. <div class="container">
  87. <div class="icon">
  88. </div>
  89. <h1>You're Offline</h1>
  90. <p>
  91. It looks like you've lost your internet connection.
  92. Some features may not be available until you're back online.
  93. </p>
  94. <button onclick="window.location.reload()">
  95. Try Again
  96. </button>
  97. </div>
  98. <script>
  99. // Check for connection status changes
  100. window.addEventListener('online', function() {
  101. window.location.reload();
  102. });
  103. // Periodically check if online
  104. setInterval(function() {
  105. fetch(window.location.origin, { method: 'HEAD' })
  106. .then(function() {
  107. window.location.reload();
  108. })
  109. .catch(function() {
  110. // Still offline
  111. });
  112. }, 5000);
  113. </script>
  114. </body>
  115. </html>