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