offline.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>离线模式 - Junma Show</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', 'Arial', sans-serif;
  15. background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  16. color: #fff;
  17. min-height: 100vh;
  18. display: flex;
  19. align-items: center;
  20. justify-content: center;
  21. padding: 20px;
  22. }
  23. .container {
  24. text-align: center;
  25. max-width: 500px;
  26. }
  27. .icon {
  28. width: 120px;
  29. height: 120px;
  30. margin: 0 auto 30px;
  31. background: rgba(16, 185, 129, 0.1);
  32. border-radius: 50%;
  33. display: flex;
  34. align-items: center;
  35. justify-content: center;
  36. }
  37. .icon svg {
  38. width: 60px;
  39. height: 60px;
  40. color: #10b981;
  41. }
  42. h1 {
  43. font-size: 28px;
  44. font-weight: 700;
  45. margin-bottom: 16px;
  46. color: #fff;
  47. }
  48. p {
  49. font-size: 16px;
  50. line-height: 1.6;
  51. color: rgba(255, 255, 255, 0.7);
  52. margin-bottom: 30px;
  53. }
  54. .features {
  55. background: rgba(255, 255, 255, 0.05);
  56. border-radius: 16px;
  57. padding: 24px;
  58. margin: 30px 0;
  59. text-align: left;
  60. }
  61. .feature-item {
  62. display: flex;
  63. align-items: flex-start;
  64. gap: 12px;
  65. margin-bottom: 16px;
  66. }
  67. .feature-item:last-child {
  68. margin-bottom: 0;
  69. }
  70. .feature-icon {
  71. flex-shrink: 0;
  72. width: 24px;
  73. height: 24px;
  74. color: #10b981;
  75. }
  76. .feature-text {
  77. flex: 1;
  78. font-size: 14px;
  79. line-height: 1.5;
  80. color: rgba(255, 255, 255, 0.8);
  81. }
  82. .btn {
  83. display: inline-block;
  84. padding: 12px 32px;
  85. background: #10b981;
  86. color: #fff;
  87. text-decoration: none;
  88. border-radius: 12px;
  89. font-weight: 600;
  90. transition: all 0.3s;
  91. border: none;
  92. cursor: pointer;
  93. font-size: 16px;
  94. }
  95. .btn:hover {
  96. background: #059669;
  97. transform: translateY(-2px);
  98. box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
  99. }
  100. @media (max-width: 768px) {
  101. h1 {
  102. font-size: 24px;
  103. }
  104. p {
  105. font-size: 14px;
  106. }
  107. .icon {
  108. width: 100px;
  109. height: 100px;
  110. margin-bottom: 24px;
  111. }
  112. .icon svg {
  113. width: 50px;
  114. height: 50px;
  115. }
  116. }
  117. </style>
  118. </head>
  119. <body>
  120. <div class="container">
  121. <div class="icon">
  122. <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
  123. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414"/>
  124. </svg>
  125. </div>
  126. <h1>您当前处于离线状态</h1>
  127. <p>看起来您的设备未连接到互联网。请检查网络连接后重试。</p>
  128. <div class="features">
  129. <div class="feature-item">
  130. <svg class="feature-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  131. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
  132. </svg>
  133. <div class="feature-text">
  134. <strong>已缓存的内容</strong>可以离线访问
  135. </div>
  136. </div>
  137. <div class="feature-item">
  138. <svg class="feature-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  139. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
  140. </svg>
  141. <div class="feature-text">
  142. 恢复网络连接后,应用将<strong>自动同步</strong>
  143. </div>
  144. </div>
  145. <div class="feature-item">
  146. <svg class="feature-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  147. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
  148. </svg>
  149. <div class="feature-text">
  150. 您的浏览记录和设置已<strong>安全保存</strong>
  151. </div>
  152. </div>
  153. </div>
  154. <button class="btn" onclick="window.location.reload()">
  155. 重新连接
  156. </button>
  157. </div>
  158. <script>
  159. // 每 5 秒检查一次网络连接
  160. setInterval(() => {
  161. if (navigator.onLine) {
  162. window.location.reload();
  163. }
  164. }, 5000);
  165. // 监听网络状态变化
  166. window.addEventListener('online', () => {
  167. window.location.reload();
  168. });
  169. </script>
  170. </body>
  171. </html>