index.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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">
  6. <title>月度排行榜 - Sporty Edition</title>
  7. <link href="./css/all.min.css" rel="stylesheet">
  8. <style>
  9. :root {
  10. --sport-bg: #0f0f0f;
  11. --sport-card: #1a1a1a;
  12. --sport-accent: #ccff00; /* Neon Green */
  13. --sport-text: #ffffff;
  14. --sport-dim: #444;
  15. }
  16. * {
  17. box-sizing: border-box;
  18. margin: 0;
  19. padding: 0;
  20. font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  21. -webkit-tap-highlight-color: transparent;
  22. user-select: none;
  23. }
  24. html, body {
  25. width: 100%;
  26. height: 100%;
  27. overflow: hidden;
  28. background: transparent; /* 恢复原版简写 */
  29. display: flex;
  30. justify-content: center;
  31. align-items: center;
  32. }
  33. /* 动态背景线现在放在 .card-container 上,并被其圆角裁剪 */
  34. .card-container::before {
  35. content: '';
  36. position: absolute;
  37. top: 0; left: 0; right: 0; bottom: 0;
  38. background: repeating-linear-gradient(
  39. 45deg,
  40. transparent,
  41. transparent 10px,
  42. rgba(255, 255, 255, 0.03) 10px,
  43. rgba(255, 255, 255, 0.03) 20px
  44. );
  45. z-index: -1; /* 确保在卡片内容下方 */
  46. }
  47. /* 动态背景线 */
  48. body::before { display: none; } /* 移除 body 上的伪元素 */
  49. .card-container {
  50. width: 100%; /* 填充整个视口 */
  51. height: 100%; /* 填充整个视口 */
  52. background: var(--sport-card); /* 卡片的主背景 */
  53. border-radius: 16px; /* 卡片的圆角 */
  54. position: relative;
  55. z-index: 1;
  56. overflow: hidden;
  57. display: flex;
  58. flex-direction: column;
  59. cursor: pointer;
  60. border: 1px solid #333;
  61. transition: transform 0.1s;
  62. }
  63. .card-container:active {
  64. transform: scale(0.98);
  65. }
  66. /* 装饰性斜切块 */
  67. .deco-slash {
  68. position: absolute;
  69. top: -50px;
  70. right: -100px;
  71. width: 300px;
  72. height: 300px;
  73. background: var(--sport-accent);
  74. transform: rotate(45deg);
  75. opacity: 0.1;
  76. pointer-events: none;
  77. z-index: 0; /* 放置在内容层下方,避免覆盖圆角 */
  78. }
  79. .content-layer {
  80. flex: 1;
  81. display: flex;
  82. flex-direction: column;
  83. align-items: center;
  84. justify-content: center;
  85. padding: 20px;
  86. padding-bottom: 40px; /* 增加底部填充,确保奖杯在内 */
  87. }
  88. .year-tag {
  89. font-size: 6vmin;
  90. color: #888;
  91. font-weight: 700;
  92. letter-spacing: 4px;
  93. font-style: italic;
  94. margin-bottom: 10px;
  95. }
  96. .month-wrapper {
  97. position: relative;
  98. display: flex;
  99. justify-content: center;
  100. align-items: center;
  101. }
  102. .month-num {
  103. font-size: 35vmin; /* 缩小月份字体 */
  104. font-weight: 900;
  105. line-height: 0.8;
  106. color: transparent;
  107. -webkit-text-stroke: 2px var(--sport-text);
  108. font-style: italic;
  109. transform: skewX(-10deg);
  110. position: relative;
  111. z-index: 2;
  112. }
  113. /* 月份背后的实心字,营造重影效果 */
  114. .month-num::after {
  115. content: attr(data-month);
  116. position: absolute;
  117. left: 10px;
  118. top: 10px;
  119. color: var(--sport-accent);
  120. -webkit-text-stroke: 0;
  121. z-index: -1;
  122. opacity: 0.6;
  123. }
  124. .label-tag {
  125. margin-top: 30px; /* 稍微上移标签 */
  126. background: var(--sport-accent);
  127. color: #000;
  128. font-weight: 900;
  129. padding: 8px 24px;
  130. font-size: 5vmin;
  131. text-transform: uppercase;
  132. transform: skewX(-15deg);
  133. box-shadow: 0 0 15px rgba(204, 255, 0, 0.4);
  134. }
  135. .label-tag span {
  136. display: block;
  137. transform: skewX(15deg); /* 反向纠正文字 */
  138. }
  139. .trophy-icon {
  140. margin-top: 30px; /* 调整上边距 */
  141. font-size: 10vmin;
  142. color: #fff;
  143. animation: bounce 2s infinite;
  144. }
  145. @keyframes bounce {
  146. 0%, 100% { transform: translateY(0); }
  147. 50% { transform: translateY(-10px); }
  148. }
  149. </style>
  150. </head>
  151. <body>
  152. <div class="card-container" onclick="redirectToDetail()">
  153. <div class="deco-slash"></div>
  154. <div class="content-layer">
  155. <div class="year-tag">2025 赛季</div>
  156. <div class="month-wrapper">
  157. <div class="month-num" data-month="12">12</div>
  158. </div>
  159. <div class="label-tag"><span>挑战赛</span></div>
  160. <div class="trophy-icon">
  161. <i class="fa-solid fa-trophy"></i>
  162. </div>
  163. </div>
  164. </div>
  165. <script src="./bridge.js"></script>
  166. <script>
  167. // Logger Utility
  168. const Logger = {
  169. _isDev: false,
  170. init: function(isDev) {
  171. this._isDev = isDev;
  172. },
  173. log: function() {
  174. if (this._isDev) {
  175. console.log.apply(console, arguments);
  176. }
  177. },
  178. warn: function() {
  179. if (this._isDev) {
  180. console.warn.apply(console, arguments);
  181. }
  182. },
  183. error: function() {
  184. console.error.apply(console, arguments);
  185. }
  186. };
  187. function getQueryParam(name) {
  188. const params = new URLSearchParams(window.location.search);
  189. return params.get(name);
  190. }
  191. // Initialize Logger
  192. const env = (getQueryParam('env') || '').toLowerCase();
  193. Logger.init(env === 'mock'); // Only log if env=mock
  194. function redirectToDetail() {
  195. const token = getQueryParam('token');
  196. const id = getQueryParam('id');
  197. let detailUrl = 'detail.html';
  198. const queryParams = [];
  199. if (token) {
  200. queryParams.push(`token=${encodeURIComponent(token)}`);
  201. }
  202. if (id) {
  203. queryParams.push(`id=${encodeURIComponent(id)}`);
  204. }
  205. if (queryParams.length > 0) {
  206. detailUrl += `?${queryParams.join('&')}`;
  207. }
  208. detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
  209. Logger.log("Navigating to:", detailUrl);
  210. if (window.Bridge && window.Bridge.appAction) {
  211. Bridge.appAction(detailUrl);
  212. } else {
  213. window.location.href = detailUrl;
  214. }
  215. }
  216. </script>
  217. </body>
  218. </html>