index.html 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  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, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
  6. <title>11月挑战赛 - 最终封面</title>
  7. <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
  8. <style>
  9. :root {
  10. --primary-purple: #593259;
  11. --primary-orange: #ffeaa7;
  12. }
  13. html, body { /* Ensure html also covers full height */
  14. height: 100%;
  15. width: 100%;
  16. }
  17. * {
  18. box-sizing: border-box;
  19. margin: 0;
  20. padding: 0;
  21. font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  22. -webkit-tap-highlight-color: transparent;
  23. user-select: none;
  24. }
  25. /* 1. 背景层:全屏铺满 */
  26. html, body {
  27. margin: 0;
  28. padding: 0;
  29. height: 100%;
  30. width: 100%;
  31. /* 确保背景透明,显示 WebView 底色 */
  32. background: transparent !important;
  33. }
  34. body {
  35. display: flex;
  36. justify-content: center;
  37. align-items: center;
  38. overflow: hidden; /* 禁止滚动 */
  39. }
  40. /* 2. 毛玻璃卡片层:作为页面主体内容,处理圆角和背景 */
  41. .glass-card {
  42. width: 100%;
  43. height: 100%;
  44. /* 核心:在这里设置圆角 */
  45. border-radius: 40px;
  46. /* 核心:裁剪溢出内容,确保圆角生效 */
  47. overflow: hidden;
  48. /* 背景样式 */
  49. background: linear-gradient(to bottom, rgba(162, 155, 254, 0.2) 0%, rgba(45, 52, 54, 0.95) 100%),
  50. url('https://img.freepik.com/free-vector/silhouette-trail-runner-running-forest-at-night_105940-705.jpg?w=800') center/cover no-repeat;
  51. background-color: #2d3436;
  52. /* 边框和阴影 */
  53. border: 2px solid rgba(255, 255, 255, 0.25);
  54. border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  55. box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  56. position: relative;
  57. display: flex;
  58. flex-direction: column;
  59. align-items: center;
  60. justify-content: center;
  61. text-align: center;
  62. cursor: pointer;
  63. backdrop-filter: blur(10px);
  64. -webkit-backdrop-filter: blur(10px);
  65. }
  66. .glass-card:active {
  67. transform: scale(0.99);
  68. transition: transform 0.1s;
  69. }
  70. /* 顶部年份 */
  71. .tag-year {
  72. font-size: 4vmin;
  73. font-weight: 800;
  74. letter-spacing: 0.5vmin;
  75. color: #fff;
  76. margin-bottom: 2vh;
  77. background: rgba(255, 255, 255, 0.2);
  78. padding: 1.5vmin 4vmin;
  79. border-radius: 6vmin;
  80. text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  81. border: 1px solid rgba(255,255,255,0.3);
  82. box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  83. }
  84. /* 月份数字 - 超大号金色 */
  85. .title-month {
  86. font-size: 35vmin;
  87. font-weight: 900;
  88. line-height: 1;
  89. /* 金色金属渐变 */
  90. background: linear-gradient(to bottom,
  91. #ffffff 10%,
  92. #ffd700 50%,
  93. #ff9f43 100%
  94. );
  95. -webkit-background-clip: text;
  96. -webkit-text-fill-color: transparent;
  97. filter: drop-shadow(0 4px 0px rgba(255, 215, 0, 0.3));
  98. margin: 1vh 0;
  99. z-index: 2;
  100. }
  101. .title-sub {
  102. font-size: 4.5vmin;
  103. font-weight: 800;
  104. color: rgba(255, 255, 255, 0.95);
  105. letter-spacing: 1vmin;
  106. text-transform: uppercase;
  107. margin-top: -1vh;
  108. text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  109. }
  110. /* 底部图标容器 */
  111. .deco-icon {
  112. margin-top: 5vh;
  113. width: 18vmin; height: 18vmin;
  114. border-radius: 50%;
  115. display: flex; justify-content: center; align-items: center;
  116. background: rgba(255,255,255,0.1);
  117. border: 1px solid rgba(255,255,255,0.2);
  118. box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  119. animation: trophy-pulse 2s infinite ease-in-out;
  120. }
  121. .deco-icon i {
  122. font-size: 9vmin;
  123. color: #ffd700;
  124. filter: drop-shadow(0 0 5px rgba(253, 203, 110, 0.8));
  125. }
  126. /* ================= 新增:查看排行按钮 ================= */
  127. .action-btn {
  128. position: absolute;
  129. bottom: 8%; /* 距离底部的位置 */
  130. /* 按钮尺寸与样式 */
  131. padding: 3vmin 8vmin;
  132. border-radius: 10vmin;
  133. border: none;
  134. /* 渐变背景:浅金 -> 珊瑚色 */
  135. background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
  136. /* 文字样式:深紫色,高对比度 */
  137. color: #593259;
  138. font-size: 4vmin;
  139. font-weight: 900;
  140. letter-spacing: 1px;
  141. /* 阴影与光泽 */
  142. box-shadow: 0 10px 25px rgba(255, 118, 117, 0.4),
  143. inset 0 1px 0 rgba(255,255,255,0.4);
  144. display: flex;
  145. align-items: center;
  146. gap: 2vmin;
  147. z-index: 10;
  148. animation: btn-float 3s infinite ease-in-out;
  149. }
  150. /* 按钮悬浮动画 */
  151. @keyframes btn-float {
  152. 0%, 100% { transform: translateY(0); }
  153. 50% { transform: translateY(-5px); }
  154. }
  155. @keyframes trophy-pulse {
  156. 0% { transform: scale(1) translateY(0); box-shadow: 0 0 0 0 rgba(253, 203, 110, 0.2); }
  157. 50% { transform: scale(1.1) translateY(-5px); box-shadow: 0 0 30px 10px rgba(253, 203, 110, 0.4); }
  158. 100% { transform: scale(1) translateY(0); box-shadow: 0 0 0 0 rgba(253, 203, 110, 0); }
  159. }
  160. /* 顶部反光效果 */
  161. .shine {
  162. position: absolute;
  163. top: -15%; left: -15%;
  164. width: 60%; height: 40%;
  165. background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
  166. z-index: 3;
  167. pointer-events: none;
  168. filter: blur(30px);
  169. opacity: 0.6;
  170. }
  171. </style>
  172. </head>
  173. <body>
  174. <!-- 点击整个区域都能跳转 -->
  175. <div class="glass-card" onclick="redirectToDetail()">
  176. <div class="shine"></div>
  177. <div class="tag-year">2025 年</div>
  178. <div class="title-month">11</div>
  179. <div class="title-sub">月度挑战赛</div>
  180. <div class="deco-icon">
  181. <i class="fa-solid fa-trophy"></i>
  182. </div>
  183. <!-- 替代原来的文字提示,使用显眼的按钮 -->
  184. <button class="action-btn">
  185. 查看排行 <i class="fa-solid fa-arrow-right"></i>
  186. </button>
  187. </div>
  188. <!-- 本地调试保留 mock_flutter.js,正式接入时移除 -->
  189. <script src="./mock_flutter.js"></script>
  190. <script src="./bridge.js"></script>
  191. <script>
  192. function getQueryParam(name) {
  193. const params = new URLSearchParams(window.location.search);
  194. return params.get(name);
  195. }
  196. function redirectToDetail() {
  197. const token = getQueryParam('token');
  198. const id = getQueryParam('id');
  199. let detailUrl = 'detail.html';
  200. const queryParams = [];
  201. if (token) {
  202. queryParams.push(`token=${encodeURIComponent(token)}`);
  203. }
  204. if (id) {
  205. queryParams.push(`id=${encodeURIComponent(id)}`);
  206. }
  207. if (queryParams.length > 0) {
  208. detailUrl += `?${queryParams.join('&')}`;
  209. }
  210. // Add full=true for Flutter interception
  211. detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
  212. console.log("Navigating from sdk/index.html to:", detailUrl);
  213. // Use Bridge.appAction for navigation
  214. if (window.Bridge && window.Bridge.appAction) {
  215. Bridge.appAction(detailUrl);
  216. } else {
  217. console.error("Bridge or Bridge.appAction is not defined. Falling back to window.location.href.");
  218. window.location.href = detailUrl; // Fallback for pure browser environment
  219. }
  220. }
  221. </script>
  222. </body>
  223. </html>