index-new.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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. --bg-dark: #050505;
  11. --gold-light: #FFE5A0;
  12. --gold-mid: #D4AF37;
  13. --gold-dark: #8A6E2F;
  14. --accent-glow: rgba(212, 175, 55, 0.4);
  15. }
  16. * {
  17. box-sizing: border-box;
  18. margin: 0;
  19. padding: 0;
  20. font-family: 'Helvetica Neue', Helvetica, Arial, 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. /* body 背景现在透明,让嵌入环境透传,或者统一由 card-container 接管 */
  29. background-color: 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. z-index: 2;
  40. display: flex;
  41. flex-direction: column;
  42. align-items: center;
  43. justify-content: center;
  44. cursor: pointer;
  45. border-radius: 20px; /* 核心圆角 */
  46. overflow: hidden; /* 核心裁剪 */
  47. background-color: var(--bg-dark); /* 背景色移到这里 */
  48. }
  49. /* 背景动态流体 - 现在在 card-container 内部 */
  50. .ambient-bg {
  51. position: absolute;
  52. top: 0; left: 0; width: 100%; height: 100%;
  53. z-index: 0;
  54. background: radial-gradient(circle at 50% 120%, #1a1a1a, #000000);
  55. }
  56. /* 动态光斑 1 */
  57. .orb-1 {
  58. position: absolute;
  59. width: 80vmin;
  60. height: 80vmin;
  61. background: radial-gradient(closest-side, var(--gold-dark) 0%, transparent 100%);
  62. top: -20%;
  63. left: -20%;
  64. opacity: 0.3;
  65. will-change: transform;
  66. transform: translateZ(0);
  67. animation: floatOrb1 10s infinite alternate ease-in-out;
  68. }
  69. .orb-2 {
  70. position: absolute;
  71. width: 60vmin;
  72. height: 60vmin;
  73. background: radial-gradient(closest-side, #43300b 0%, transparent 100%);
  74. bottom: -10%;
  75. right: -10%;
  76. opacity: 0.4;
  77. will-change: transform;
  78. transform: translateZ(0);
  79. animation: floatOrb2 8s infinite alternate-reverse ease-in-out;
  80. }
  81. /* 顶部年份 */
  82. .header {
  83. position: absolute;
  84. top: 8%;
  85. display: flex;
  86. flex-direction: column;
  87. align-items: center;
  88. opacity: 0;
  89. animation: fadeInDown 1s ease-out 0.2s forwards;
  90. z-index: 3;
  91. }
  92. .year-label {
  93. font-size: 7vmin;
  94. color: rgba(255,255,255,0.6);
  95. letter-spacing: 0.5em;
  96. margin-bottom: 1vmin;
  97. font-weight: 300;
  98. }
  99. .divider-line {
  100. width: 10vmin;
  101. height: 2px;
  102. background: linear-gradient(90deg, transparent, var(--gold-mid), transparent);
  103. }
  104. /* 核心内容:月份 */
  105. .main-visual {
  106. position: relative;
  107. display: flex;
  108. flex-direction: column;
  109. align-items: center;
  110. justify-content: center;
  111. z-index: 3;
  112. }
  113. .month-wrapper {
  114. position: relative;
  115. }
  116. .month-num {
  117. font-size: 45vmin;
  118. font-weight: 800;
  119. line-height: 0.85;
  120. letter-spacing: -2vmin;
  121. color: transparent;
  122. background: linear-gradient(135deg, var(--gold-light) 10%, #fff 25%, var(--gold-mid) 50%, var(--gold-dark) 80%);
  123. -webkit-background-clip: text;
  124. filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
  125. transform: scale(0.8);
  126. opacity: 0;
  127. animation: zoomIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s forwards;
  128. position: relative;
  129. z-index: 2;
  130. }
  131. .glow-behind {
  132. position: absolute;
  133. top: 50%; left: 50%;
  134. transform: translate(-50%, -50%);
  135. width: 40vmin;
  136. height: 40vmin;
  137. background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, transparent 70%);
  138. z-index: 1;
  139. filter: blur(20px);
  140. animation: pulseGlow 3s infinite ease-in-out;
  141. }
  142. .month-text {
  143. font-size: 9vmin;
  144. color: var(--gold-mid);
  145. letter-spacing: 1vmin;
  146. margin-top: 2vmin;
  147. text-transform: uppercase;
  148. font-weight: 600;
  149. opacity: 0;
  150. animation: fadeInUp 1s ease-out 0.6s forwards;
  151. }
  152. /* 底部奖杯区 */
  153. .trophy-area {
  154. position: absolute;
  155. bottom: 12%;
  156. display: flex;
  157. flex-direction: column;
  158. align-items: center;
  159. opacity: 0;
  160. animation: fadeInUp 1s ease-out 0.8s forwards;
  161. z-index: 3;
  162. }
  163. .trophy-circle {
  164. width: 14vmin;
  165. height: 14vmin;
  166. border-radius: 50%;
  167. border: 1px solid rgba(255, 255, 255, 0.1);
  168. background: rgba(255, 255, 255, 0.03); /* Fallback */
  169. background: rgba(30, 30, 30, 0.6); /* Performance optimized replacement for blur */
  170. display: flex;
  171. justify-content: center;
  172. align-items: center;
  173. /* backdrop-filter removed for performance */
  174. margin-bottom: 2vmin;
  175. box-shadow: 0 0 20px rgba(0,0,0,0.3), inset 0 0 10px rgba(255,215,0,0.1);
  176. transition: transform 0.1s ease;
  177. }
  178. .trophy-icon {
  179. font-size: 6vmin;
  180. color: var(--gold-light);
  181. filter: drop-shadow(0 0 5px var(--gold-mid));
  182. }
  183. .cta-text {
  184. font-size: 5.5vmin;
  185. color: rgba(255,255,255,0.4);
  186. letter-spacing: 2px;
  187. }
  188. /* 交互动画 */
  189. .card-container:active .month-num {
  190. transform: scale(0.95);
  191. transition: transform 0.1s;
  192. filter: drop-shadow(0 5px 15px rgba(0,0,0,0.6));
  193. }
  194. .card-container:active .trophy-circle {
  195. background: rgba(255, 215, 0, 0.1);
  196. transform: scale(1.1);
  197. }
  198. /* 关键帧优化 */
  199. @keyframes floatOrb1 {
  200. 0% { transform: translate3d(0, 0, 0); }
  201. 100% { transform: translate3d(10%, 10%, 0); }
  202. }
  203. @keyframes floatOrb2 {
  204. 0% { transform: translate3d(0, 0, 0); }
  205. 100% { transform: translate3d(-10%, -10%, 0); }
  206. }
  207. @keyframes fadeInDown {
  208. from { opacity: 0; transform: translateY(-20px); }
  209. to { opacity: 1; transform: translateY(0); }
  210. }
  211. @keyframes fadeInUp {
  212. from { opacity: 0; transform: translateY(20px); }
  213. to { opacity: 1; transform: translateY(0); }
  214. }
  215. @keyframes zoomIn {
  216. from { opacity: 0; transform: scale(0.5); }
  217. to { opacity: 1; transform: scale(1); }
  218. }
  219. @keyframes pulseGlow {
  220. 0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  221. 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  222. }
  223. </style>
  224. </head>
  225. <body>
  226. <!-- 将背景元素移入 card-container -->
  227. <div class="card-container" onclick="redirectToDetail()">
  228. <div class="ambient-bg">
  229. <div class="orb-1"></div>
  230. <div class="orb-2"></div>
  231. </div>
  232. <div class="header">
  233. <div class="year-label">2025年</div>
  234. <div class="divider-line"></div>
  235. </div>
  236. <div class="main-visual">
  237. <div class="month-wrapper">
  238. <div class="glow-behind"></div>
  239. <div class="month-num">12</div>
  240. </div>
  241. <div class="month-text">月挑战赛</div>
  242. </div>
  243. <div class="trophy-area">
  244. <div class="trophy-circle">
  245. <i class="fa-solid fa-trophy trophy-icon"></i>
  246. </div>
  247. <div class="cta-text">点击查看排行榜</div>
  248. </div>
  249. </div>
  250. <script src="./bridge.js"></script>
  251. <script src="./js/target_logic.js"></script>
  252. <script>
  253. // Auto-Update Date
  254. (function() {
  255. const now = new Date();
  256. const year = now.getFullYear();
  257. const month = now.getMonth() + 1;
  258. const yearEl = document.querySelector('.year-label');
  259. const monthEl = document.querySelector('.month-num');
  260. if (yearEl) yearEl.innerText = year + '年';
  261. if (monthEl) monthEl.innerText = month;
  262. })();
  263. // Logger Utility
  264. const Logger = {
  265. _isDev: false,
  266. init: function(isDev) {
  267. this._isDev = isDev;
  268. },
  269. log: function() {
  270. if (this._isDev) {
  271. console.log.apply(console, arguments);
  272. }
  273. },
  274. warn: function() {
  275. if (this._isDev) {
  276. console.warn.apply(console, arguments);
  277. }
  278. },
  279. error: function() {
  280. console.error.apply(console, arguments);
  281. }
  282. };
  283. function getQueryParam(name) {
  284. const params = new URLSearchParams(window.location.search);
  285. return params.get(name);
  286. }
  287. // Initialize Logger
  288. const env = (getQueryParam('env') || '').toLowerCase();
  289. Logger.init(env === 'mock'); // Only log if env=mock
  290. function redirectToDetail() {
  291. const token = getQueryParam('token');
  292. const id = getQueryParam('id');
  293. // Dynamic Target
  294. let detailUrl = getTargetDetail();
  295. const queryParams = [];
  296. if (token) {
  297. queryParams.push(`token=${encodeURIComponent(token)}`);
  298. }
  299. if (id) {
  300. queryParams.push(`id=${encodeURIComponent(id)}`);
  301. }
  302. if (queryParams.length > 0) {
  303. detailUrl += `?${queryParams.join('&')}`;
  304. }
  305. detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
  306. Logger.log("Navigating to:", detailUrl);
  307. if (window.Bridge && window.Bridge.appAction) {
  308. Bridge.appAction(detailUrl);
  309. } else {
  310. window.location.href = detailUrl;
  311. }
  312. }
  313. </script>
  314. </body>
  315. </html>