index.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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. * {
  14. box-sizing: border-box;
  15. margin: 0;
  16. padding: 0;
  17. font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  18. -webkit-tap-highlight-color: transparent;
  19. user-select: none;
  20. }
  21. html, body {
  22. margin: 0;
  23. padding: 0;
  24. width: 100vw;
  25. height: 100vh;
  26. overflow: hidden;
  27. background-color: transparent !important;
  28. background: rgba(0, 0, 0, 0) !important;
  29. }
  30. body {
  31. display: flex;
  32. justify-content: center;
  33. align-items: center;
  34. }
  35. /* 2. 外层容器 */
  36. .card-container {
  37. width: 96%;
  38. height: 96%;
  39. /* 圆角也需要自适应:最大24px,或者视口最小边的6% */
  40. border-radius: min(24px, 6vmin);
  41. overflow: hidden;
  42. position: relative;
  43. cursor: pointer;
  44. background: linear-gradient(to bottom,
  45. rgba(162, 155, 254, 0.2) 0%,
  46. rgba(45, 52, 54, 0.95) 100%),
  47. url('./bg.jpg?w=800') center/cover no-repeat;
  48. box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  49. transform: translateZ(0);
  50. -webkit-mask-image: -webkit-radial-gradient(white, black);
  51. }
  52. /* 3. 内层毛玻璃 */
  53. .glass-layer {
  54. position: absolute;
  55. top: 4%; left: 4%; right: 4%; bottom: 4%;
  56. /* 圆角自适应 */
  57. border-radius: min(20px, 5vmin);
  58. border: 1.5px solid rgba(255, 255, 255, 0.3);
  59. border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
  60. background: linear-gradient(to bottom,
  61. rgba(255, 255, 255, 0.15) 0%,
  62. rgba(255, 255, 255, 0.02) 50%,
  63. rgba(0, 0, 0, 0.1) 100%
  64. );
  65. backdrop-filter: blur(6px);
  66. -webkit-backdrop-filter: blur(6px);
  67. display: flex;
  68. flex-direction: column;
  69. align-items: center;
  70. justify-content: flex-start;
  71. text-align: center;
  72. box-shadow: inset 0 0 15px rgba(255,255,255,0.05);
  73. }
  74. .card-container:active {
  75. transform: scale(0.98);
  76. transition: transform 0.1s;
  77. }
  78. /* 顶部年份 */
  79. .tag-year {
  80. /* 字体大小:最大20px,缩小时占视口最小边的5.5% */
  81. font-size: min(30px, 7.5vmin);
  82. font-weight: 400;
  83. letter-spacing: 1px;
  84. color: #fff;
  85. background: rgba(0, 0, 0, 0.2);
  86. /* Padding 使用 em 单位,随字体大小缩放 */
  87. padding: 0.2em 0.8em;
  88. border-radius: 16px;
  89. border: 1px solid rgba(255,255,255,0.2);
  90. position: absolute;
  91. /* 距离顶部的距离也自适应 */
  92. top: min(10px, 2vh);
  93. z-index: 10;
  94. }
  95. /* 核心数字:11 */
  96. .title-month {
  97. /* 字体大小:最大80px,缩小时占视口最小边的22% */
  98. font-size: min(140px, 32vmin);
  99. font-weight: 900;
  100. line-height: 1;
  101. background: linear-gradient(to bottom, #ffffff 10%, #ffd700 50%, #ff9f43 100%);
  102. -webkit-background-clip: text;
  103. -webkit-text-fill-color: transparent;
  104. filter: drop-shadow(0 4px 0px rgba(0, 0, 0, 0.2));
  105. /* 顶部间距:最大55px,缩小时占视口高度的12% */
  106. margin-top: min(75px, 16vh);
  107. z-index: 2;
  108. }
  109. /* 月度挑战赛 */
  110. .title-sub {
  111. /* 字体大小:最大16px,缩小时占视口最小边的4.5% */
  112. font-size: min(20px, 6.5vmin);
  113. font-weight: 800;
  114. color: rgba(255, 255, 255, 0.95);
  115. letter-spacing: 2px;
  116. text-transform: uppercase;
  117. text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  118. margin-top: min(5px, 1vh);
  119. margin-bottom: auto;
  120. }
  121. /* 奖杯图标 */
  122. .deco-icon {
  123. /* 底部间距:最大22px,缩小时占视口高度的4% */
  124. margin-bottom: min(22px, 8vh);
  125. /* 宽高:最大40px,缩小时占视口最小边的11% */
  126. width: min(40px, 11vmin);
  127. height: min(40px, 11vmin);
  128. border-radius: 50%;
  129. display: flex; justify-content: center; align-items: center;
  130. background: rgba(255,255,255,0.1);
  131. border: 1px solid rgba(255,255,255,0.2);
  132. box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  133. animation: trophy-pulse 2s infinite ease-in-out;
  134. }
  135. .deco-icon i {
  136. /* 图标大小:最大20px,随容器缩小 */
  137. font-size: min(20px, 5.5vmin);
  138. color: #ffd700;
  139. filter: drop-shadow(0 0 5px rgba(253, 203, 110, 0.8));
  140. }
  141. /* 查看排行按钮 */
  142. .action-btn {
  143. /* 底部间距:最大20px,缩小时自适应 */
  144. margin-bottom: min(30px, 6vh);
  145. /* 宽度:最大110px,缩小时占视口宽度的30% */
  146. width: min(180px, 50vmin);
  147. padding: min(8px, 2vh) 0;
  148. border-radius: 25px;
  149. border: none;
  150. background: linear-gradient(90deg, #ffeaa7 0%, #fab1a0 100%);
  151. color: #593259;
  152. /* 字体:最大12px */
  153. font-size: min(18px, 5.5vmin);
  154. font-weight: 900;
  155. box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  156. display: flex;
  157. align-items: center;
  158. justify-content: center;
  159. gap: 4px;
  160. z-index: 10;
  161. }
  162. .action-btn i { font-size: 0.8em; }
  163. @keyframes trophy-pulse {
  164. 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(253, 203, 110, 0.2); }
  165. 50% { transform: scale(1.15); box-shadow: 0 0 15px 5px rgba(253, 203, 110, 0.4); }
  166. 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(253, 203, 110, 0); }
  167. }
  168. /* 顶部反光 */
  169. .shine {
  170. position: absolute;
  171. top: -20px; left: -20px;
  172. width: 150px; height: 100px;
  173. background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  174. z-index: 3;
  175. pointer-events: none;
  176. filter: blur(20px);
  177. }
  178. </style>
  179. </head>
  180. <body>
  181. <!-- 外层容器 -->
  182. <div class="card-container" onclick="redirectToDetail()">
  183. <!-- 内层容器 -->
  184. <div class="glass-layer">
  185. <div class="shine"></div>
  186. <div class="tag-year">2025 年</div>
  187. <div class="title-month">11</div>
  188. <div class="title-sub">月度挑战赛</div>
  189. <div class="deco-icon">
  190. <i class="fa-solid fa-trophy"></i>
  191. </div>
  192. <button class="action-btn" onclick="redirectToDetail()">
  193. 查看排行 <i class="fa-solid fa-arrow-right"></i>
  194. </button>
  195. </div>
  196. </div>
  197. <script src="./bridge.js"></script>
  198. <script>
  199. function getQueryParam(name) {
  200. const params = new URLSearchParams(window.location.search);
  201. return params.get(name);
  202. }
  203. function redirectToDetail() {
  204. const token = getQueryParam('token');
  205. const id = getQueryParam('id');
  206. let detailUrl = 'detail.html';
  207. const queryParams = [];
  208. if (token) {
  209. queryParams.push(`token=${encodeURIComponent(token)}`);
  210. }
  211. if (id) {
  212. queryParams.push(`id=${encodeURIComponent(id)}`);
  213. }
  214. if (queryParams.length > 0) {
  215. detailUrl += `?${queryParams.join('&')}`;
  216. }
  217. detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
  218. console.log("Navigating to:", detailUrl);
  219. if (window.Bridge && window.Bridge.appAction) {
  220. Bridge.appAction(detailUrl);
  221. } else {
  222. window.location.href = detailUrl;
  223. }
  224. }
  225. </script>
  226. </body>
  227. </html>