index-style4.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  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>月度排行榜</title>
  7. <link href="./css/all.min.css" rel="stylesheet">
  8. <style>
  9. :root {
  10. --hud-bg: #050a14;
  11. --hud-cyan: #00f3ff;
  12. --hud-cyan-dim: rgba(0, 243, 255, 0.2);
  13. --hud-white: #e0f7fa;
  14. --hud-alert: #ff003c;
  15. }
  16. * {
  17. box-sizing: border-box;
  18. margin: 0;
  19. padding: 0;
  20. /* 科技感等宽字体 */
  21. font-family: 'Courier New', Courier, monospace;
  22. -webkit-tap-highlight-color: transparent;
  23. user-select: none;
  24. }
  25. html, body {
  26. width: 100%;
  27. height: 100%;
  28. overflow: hidden;
  29. background: transparent;
  30. display: flex;
  31. justify-content: center;
  32. align-items: center;
  33. }
  34. /* 主容器:科幻终端 */
  35. .card-container {
  36. width: 100%;
  37. height: 100%;
  38. position: relative;
  39. background-color: var(--hud-bg);
  40. border-radius: 20px; /* 保持圆角 */
  41. overflow: hidden;
  42. cursor: pointer;
  43. display: flex;
  44. flex-direction: column;
  45. align-items: center;
  46. border: 1px solid var(--hud-cyan-dim);
  47. box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
  48. }
  49. /* 背景网格系统 */
  50. .grid-bg {
  51. position: absolute;
  52. top: 0; left: 0; width: 100%; height: 100%;
  53. background-image:
  54. linear-gradient(var(--hud-cyan-dim) 1px, transparent 1px),
  55. linear-gradient(90deg, var(--hud-cyan-dim) 1px, transparent 1px);
  56. background-size: 40px 40px;
  57. opacity: 0.3;
  58. z-index: 0;
  59. }
  60. /* 扫描线动画 */
  61. .scan-line {
  62. position: absolute;
  63. top: 0; left: 0; width: 100%; height: 5px;
  64. background: var(--hud-cyan);
  65. box-shadow: 0 0 10px var(--hud-cyan);
  66. opacity: 0.5;
  67. animation: scan 4s infinite linear;
  68. z-index: 1;
  69. }
  70. /* 装饰角标 - 模拟HUD边角 */
  71. .hud-corner {
  72. position: absolute;
  73. width: 20px; height: 20px;
  74. border: 2px solid var(--hud-cyan);
  75. z-index: 2;
  76. }
  77. .tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
  78. .tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
  79. .bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
  80. .br { bottom: 10px; right: 10px; border-left: none; border-top: none; }
  81. /* 顶部系统状态 */
  82. .sys-status {
  83. margin-top: 15%;
  84. font-size: 3vmin;
  85. color: var(--hud-cyan);
  86. letter-spacing: 2px;
  87. z-index: 2;
  88. display: flex;
  89. align-items: center;
  90. gap: 10px;
  91. }
  92. .status-dot {
  93. width: 8px; height: 8px;
  94. background: var(--hud-alert);
  95. border-radius: 50%;
  96. animation: blink 1s infinite;
  97. }
  98. /* 年份数据条 */
  99. .year-bar {
  100. margin-top: 2vmin;
  101. background: var(--hud-cyan-dim);
  102. border: 1px solid var(--hud-cyan);
  103. padding: 0.5vmin 3vmin;
  104. color: var(--hud-white);
  105. font-size: 4vmin;
  106. font-weight: bold;
  107. z-index: 2;
  108. /* 切角效果 */
  109. clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%, 0% 40%);
  110. }
  111. /* 核心月份区:数据核心 */
  112. .core-display {
  113. flex: 1;
  114. display: flex;
  115. flex-direction: column;
  116. justify-content: center;
  117. align-items: center;
  118. position: relative;
  119. z-index: 2;
  120. width: 100%;
  121. }
  122. /* 旋转的数据环 */
  123. .data-ring {
  124. position: absolute;
  125. width: 60vmin; height: 60vmin;
  126. border: 2px dashed var(--hud-cyan-dim);
  127. border-radius: 50%;
  128. animation: rotate 20s infinite linear;
  129. }
  130. .data-ring::before {
  131. content: ''; position: absolute;
  132. top: -5px; left: 50%; transform: translateX(-50%);
  133. width: 10px; height: 10px; background: var(--hud-cyan);
  134. box-shadow: 0 0 10px var(--hud-cyan);
  135. }
  136. .month-val {
  137. font-size: 35vmin;
  138. color: var(--hud-white);
  139. text-shadow: 0 0 10px var(--hud-cyan), 0 0 20px var(--hud-cyan);
  140. font-weight: bold;
  141. line-height: 1;
  142. position: relative;
  143. }
  144. /* 故障效果的装饰字 */
  145. .month-val::after {
  146. content: attr(data-text); /* 动态读取属性 */
  147. position: absolute; left: 2px; top: 0;
  148. color: var(--hud-alert);
  149. opacity: 0.5;
  150. z-index: -1;
  151. animation: glitch 3s infinite;
  152. mix-blend-mode: screen;
  153. }
  154. .month-label {
  155. margin-top: 2vmin;
  156. font-size: 5vmin;
  157. color: var(--hud-cyan);
  158. text-transform: uppercase;
  159. letter-spacing: 1vmin;
  160. background: linear-gradient(90deg, transparent, var(--hud-cyan-dim), transparent);
  161. padding: 0 2vmin;
  162. }
  163. /* 底部操作区 */
  164. .action-zone {
  165. margin-bottom: 15%;
  166. z-index: 2;
  167. width: 70%;
  168. height: 12vmin;
  169. border: 1px solid var(--hud-cyan);
  170. display: flex;
  171. justify-content: space-between;
  172. align-items: center;
  173. padding: 0 5vmin;
  174. background: rgba(0,0,0,0.5);
  175. position: relative;
  176. transition: all 0.2s;
  177. }
  178. .action-zone::before {
  179. content: '';
  180. position: absolute;
  181. bottom: 0; right: 0;
  182. width: 15px; height: 15px;
  183. background: linear-gradient(135deg, transparent 50%, var(--hud-cyan) 50%);
  184. }
  185. .action-text {
  186. color: var(--hud-white);
  187. font-size: 4vmin;
  188. letter-spacing: 2px;
  189. }
  190. .action-icon {
  191. color: var(--hud-cyan);
  192. font-size: 5vmin;
  193. animation: pulse 2s infinite;
  194. }
  195. /* 交互:按下效果 */
  196. .card-container:active .action-zone {
  197. background: var(--hud-cyan-dim);
  198. box-shadow: 0 0 15px var(--hud-cyan);
  199. }
  200. /* 动画库 */
  201. @keyframes scan {
  202. 0% { transform: translateY(-100%); opacity: 0; }
  203. 50% { opacity: 0.5; }
  204. 100% { transform: translateY(800px); opacity: 0; }
  205. }
  206. @keyframes rotate {
  207. from { transform: rotate(0deg); }
  208. to { transform: rotate(360deg); }
  209. }
  210. @keyframes blink {
  211. 0%, 100% { opacity: 1; }
  212. 50% { opacity: 0.3; }
  213. }
  214. @keyframes pulse {
  215. 0%, 100% { transform: scale(1); text-shadow: 0 0 5px var(--hud-cyan); }
  216. 50% { transform: scale(1.2); text-shadow: 0 0 15px var(--hud-cyan); }
  217. }
  218. @keyframes glitch {
  219. 0% { transform: translate(0); }
  220. 20% { transform: translate(-2px, 2px); }
  221. 40% { transform: translate(-2px, -2px); }
  222. 60% { transform: translate(2px, 2px); }
  223. 80% { transform: translate(2px, -2px); }
  224. 100% { transform: translate(0); }
  225. }
  226. </style>
  227. </head>
  228. <body>
  229. <div class="card-container" onclick="redirectToDetail()">
  230. <!-- 背景层 -->
  231. <div class="grid-bg"></div>
  232. <div class="scan-line"></div>
  233. <!-- 装饰角标 -->
  234. <div class="hud-corner tl"></div>
  235. <div class="hud-corner tr"></div>
  236. <div class="hud-corner bl"></div>
  237. <div class="hud-corner br"></div>
  238. <!-- 顶部信息 -->
  239. <div class="sys-status">
  240. <div class="status-dot"></div>
  241. <span>SYSTEM: ONLINE</span>
  242. </div>
  243. <div class="year-bar">DATA: 2025</div>
  244. <!-- 核心视觉 -->
  245. <div class="core-display">
  246. <div class="data-ring"></div>
  247. <div class="month-val">12</div>
  248. <div class="month-label">月挑战赛</div>
  249. </div>
  250. <!-- 底部按钮 -->
  251. <div class="action-zone">
  252. <span class="action-text">指令: 显示排行榜</span>
  253. <i class="fa-solid fa-trophy action-icon"></i>
  254. </div>
  255. </div>
  256. <script src="./bridge.js"></script>
  257. <script src="./target_logic.js"></script>
  258. <script>
  259. // Auto-Update Date
  260. (function() {
  261. const now = new Date();
  262. const year = now.getFullYear();
  263. const month = now.getMonth() + 1;
  264. const yearEl = document.querySelector('.year-bar');
  265. const monthEl = document.querySelector('.month-val');
  266. if (yearEl) yearEl.innerText = 'DATA: ' + year;
  267. if (monthEl) {
  268. monthEl.innerText = month;
  269. monthEl.setAttribute('data-text', month); // 更新伪元素内容
  270. }
  271. })();
  272. // Logger Utility
  273. const Logger = {
  274. _isDev: false,
  275. init: function(isDev) {
  276. this._isDev = isDev;
  277. },
  278. log: function() {
  279. if (this._isDev) {
  280. console.log.apply(console, arguments);
  281. }
  282. },
  283. warn: function() {
  284. if (this._isDev) {
  285. console.warn.apply(console, arguments);
  286. }
  287. },
  288. error: function() {
  289. console.error.apply(console, arguments);
  290. }
  291. };
  292. function getQueryParam(name) {
  293. const params = new URLSearchParams(window.location.search);
  294. return params.get(name);
  295. }
  296. // Initialize Logger
  297. const env = (getQueryParam('env') || '').toLowerCase();
  298. Logger.init(env === 'mock'); // Only log if env=mock
  299. function redirectToDetail() {
  300. const token = getQueryParam('token');
  301. const id = getQueryParam('id');
  302. // Dynamic Target
  303. let detailUrl = getTargetDetail();
  304. const queryParams = [];
  305. if (token) {
  306. queryParams.push(`token=${encodeURIComponent(token)}`);
  307. }
  308. if (id) {
  309. queryParams.push(`id=${encodeURIComponent(id)}`);
  310. }
  311. if (queryParams.length > 0) {
  312. detailUrl += `?${queryParams.join('&')}`;
  313. }
  314. detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
  315. Logger.log("Navigating to:", detailUrl);
  316. if (window.Bridge && window.Bridge.appAction) {
  317. Bridge.appAction(detailUrl);
  318. } else {
  319. window.location.href = detailUrl;
  320. }
  321. }
  322. </script>
  323. </body>
  324. </html>