index-style7.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  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. --ogre-light: #C5E063; /* 史莱克皮肤绿 */
  11. --ogre-dark: #748c27;
  12. --swamp-mud: #3E2723; /* 泥巴棕 */
  13. --wood-light: #8D6E63;
  14. --wood-dark: #4E342E;
  15. --parchment: #F3E5AB; /* 羊皮纸 */
  16. }
  17. * {
  18. box-sizing: border-box;
  19. margin: 0;
  20. padding: 0;
  21. /* 粗犷的中世纪字体风格 */
  22. font-family: 'Impact', 'Haettenschweiler', 'Arial Narrow Bold', sans-serif;
  23. -webkit-tap-highlight-color: transparent;
  24. user-select: none;
  25. }
  26. html, body {
  27. width: 100%;
  28. height: 100%;
  29. overflow: hidden;
  30. background: transparent;
  31. display: flex;
  32. justify-content: center;
  33. align-items: center;
  34. }
  35. /* 主容器:木板框 */
  36. .card-container {
  37. width: 100%;
  38. height: 100%;
  39. position: relative;
  40. background: radial-gradient(circle at center, #2c3e50 0%, #000000 100%); /* 深夜沼泽背景 */
  41. border-radius: 20px;
  42. overflow: hidden;
  43. cursor: pointer;
  44. display: flex;
  45. flex-direction: column;
  46. align-items: center;
  47. /* 木纹边框 */
  48. border: 12px solid var(--wood-dark);
  49. box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
  50. /* 强制硬件加速 & 圆角修复 */
  51. transform: translateZ(0);
  52. -webkit-mask-image: -webkit-radial-gradient(white, black);
  53. }
  54. /* 萤火虫动画背景 */
  55. .fireflies {
  56. position: absolute;
  57. width: 100%; height: 100%;
  58. z-index: 0;
  59. pointer-events: none;
  60. }
  61. .fly {
  62. position: absolute;
  63. width: 4px; height: 4px;
  64. background: #fff9c4;
  65. border-radius: 50%;
  66. box-shadow: 0 0 10px #fff9c4, 0 0 20px #ffeb3b;
  67. animation: flyAround 10s infinite linear;
  68. opacity: 0;
  69. }
  70. .f1 { top: 50%; left: 50%; animation-duration: 8s; animation-delay: 0s; }
  71. .f2 { top: 20%; left: 20%; animation-duration: 12s; animation-delay: 2s; }
  72. .f3 { top: 80%; left: 80%; animation-duration: 15s; animation-delay: 4s; }
  73. .f4 { top: 30%; left: 70%; animation-duration: 10s; animation-delay: 1s; }
  74. /* 顶部年份:悬挂木牌 */
  75. .hanging-sign {
  76. margin-top: 8%;
  77. position: relative;
  78. z-index: 2;
  79. animation: swing 3s infinite ease-in-out alternate;
  80. transform-origin: top center;
  81. }
  82. .chains {
  83. display: flex;
  84. justify-content: space-between;
  85. width: 60%;
  86. margin: 0 auto -5px;
  87. height: 20px;
  88. }
  89. .chain-link {
  90. width: 4px; height: 100%; background: #555;
  91. }
  92. .wood-plank {
  93. background: repeating-linear-gradient(90deg, var(--wood-dark) 0, var(--wood-dark) 2%, var(--wood-light) 5%, var(--wood-dark) 10%);
  94. padding: 1vmin 4vmin;
  95. border: 2px solid #222;
  96. border-radius: 4px;
  97. color: var(--parchment);
  98. font-size: 6vmin;
  99. text-shadow: 2px 2px 0 #000;
  100. box-shadow: 0 5px 10px rgba(0,0,0,0.5);
  101. position: relative;
  102. }
  103. /* 钉子 */
  104. .nail {
  105. position: absolute; width: 6px; height: 6px; background: #111; border-radius: 50%; top: 50%; transform: translateY(-50%);
  106. }
  107. .n-left { left: 5px; }
  108. .n-right { right: 5px; }
  109. /* 核心视觉:史莱克粘液 */
  110. .ooze-container {
  111. flex: 1;
  112. display: flex;
  113. flex-direction: column;
  114. justify-content: center;
  115. align-items: center;
  116. position: relative;
  117. z-index: 2;
  118. width: 100%;
  119. }
  120. .slime-blob {
  121. width: 55vmin;
  122. height: 55vmin;
  123. background: radial-gradient(circle at 30% 30%, var(--ogre-light), var(--ogre-dark));
  124. border-radius: 50%;
  125. /* 粘液形状 */
  126. box-shadow:
  127. inset -10px -10px 20px rgba(0,0,0,0.3),
  128. inset 10px 10px 20px rgba(255,255,255,0.4),
  129. 0 10px 0 var(--ogre-dark); /* 厚度 */
  130. display: flex;
  131. justify-content: center;
  132. align-items: center;
  133. animation: squish 4s infinite ease-in-out;
  134. position: relative;
  135. }
  136. /* 泥点装饰 */
  137. .mud-spot {
  138. position: absolute;
  139. background: var(--swamp-mud);
  140. border-radius: 50%;
  141. opacity: 0.8;
  142. }
  143. .m1 { width: 10px; height: 10px; top: 20%; right: 20%; }
  144. .m2 { width: 6px; height: 6px; bottom: 30%; left: 15%; }
  145. .month-num {
  146. font-size: 35vmin;
  147. color: var(--swamp-mud);
  148. font-family: 'Georgia', serif;
  149. font-weight: 900;
  150. text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
  151. position: relative;
  152. z-index: 3;
  153. }
  154. /* 月份标签:破旧羊皮纸 */
  155. .scroll-paper {
  156. position: absolute;
  157. bottom: 0;
  158. background: var(--parchment);
  159. padding: 1vmin 4vmin;
  160. color: var(--swamp-mud);
  161. font-size: 5vmin;
  162. font-weight: bold;
  163. transform: rotate(-2deg);
  164. box-shadow: 3px 3px 5px rgba(0,0,0,0.4);
  165. /* 撕裂边缘效果 - 简化版 */
  166. clip-path: polygon(0% 0%, 100% 2%, 98% 100%, 2% 98%);
  167. }
  168. /* 底部按钮:粗木棍 */
  169. .swamp-btn-area {
  170. margin-bottom: 15%;
  171. z-index: 2;
  172. width: 80%;
  173. display: flex;
  174. justify-content: center;
  175. }
  176. .log-btn {
  177. background: var(--wood-dark);
  178. color: #fff; /* 浅色文字 */
  179. border: 2px solid #2a1b15;
  180. border-radius: 10px;
  181. padding: 2vmin 6vmin;
  182. font-size: 5vmin;
  183. display: flex;
  184. align-items: center;
  185. gap: 10px;
  186. box-shadow: 0 5px 0 #2a1b15, 0 10px 10px rgba(0,0,0,0.5);
  187. transition: all 0.1s;
  188. background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 2px, transparent 5px);
  189. }
  190. .card-container:active .log-btn {
  191. transform: translateY(5px);
  192. box-shadow: 0 0 0 #2a1b15, inset 0 3px 5px rgba(0,0,0,0.5);
  193. }
  194. /* 动画 */
  195. @keyframes flyAround {
  196. 0% { transform: translate(0, 0); opacity: 0; }
  197. 20% { opacity: 1; }
  198. 80% { opacity: 1; }
  199. 100% { transform: translate(100px, -100px); opacity: 0; }
  200. }
  201. @keyframes swing {
  202. from { transform: rotate(-2deg); }
  203. to { transform: rotate(2deg); }
  204. }
  205. @keyframes squish {
  206. 0%, 100% { transform: scale(1, 1); border-radius: 50%; }
  207. 50% { transform: scale(1.1, 0.9); border-radius: 55% 45% 50% 50% / 50% 50% 55% 45%; }
  208. }
  209. </style>
  210. </head>
  211. <body>
  212. <div class="card-container" onclick="redirectToDetail()">
  213. <!-- 萤火虫 -->
  214. <div class="fireflies">
  215. <div class="fly f1"></div>
  216. <div class="fly f2"></div>
  217. <div class="fly f3"></div>
  218. <div class="fly f4"></div>
  219. </div>
  220. <!-- 悬挂年份木牌 -->
  221. <div class="hanging-sign">
  222. <div class="chains">
  223. <div class="chain-link"></div>
  224. <div class="chain-link"></div>
  225. </div>
  226. <div class="wood-plank">
  227. <div class="nail n-left"></div>
  228. <span class="year-text">2025年</span>
  229. <div class="nail n-right"></div>
  230. </div>
  231. </div>
  232. <!-- 史莱克粘液 -->
  233. <div class="ooze-container">
  234. <div class="slime-blob">
  235. <div class="mud-spot m1"></div>
  236. <div class="mud-spot m2"></div>
  237. <div class="month-num">12</div>
  238. </div>
  239. <div class="scroll-paper">月挑战赛</div>
  240. </div>
  241. <!-- 木头按钮 -->
  242. <div class="swamp-btn-area">
  243. <div class="log-btn">
  244. <i class="fa-solid fa-crown"></i>
  245. <span>查看排行榜</span>
  246. </div>
  247. </div>
  248. </div>
  249. <script src="./bridge.js"></script>
  250. <script src="./js/target_logic.js"></script>
  251. <script>
  252. // Auto-Update Date
  253. (function() {
  254. const now = new Date();
  255. const year = now.getFullYear();
  256. const month = now.getMonth() + 1;
  257. const yearEl = document.querySelector('.year-text');
  258. const monthEl = document.querySelector('.month-num');
  259. if (yearEl) yearEl.innerText = year + '年';
  260. if (monthEl) monthEl.innerText = month;
  261. })();
  262. // Logger Utility
  263. const Logger = {
  264. _isDev: false,
  265. init: function(isDev) {
  266. this._isDev = isDev;
  267. },
  268. log: function() {
  269. if (this._isDev) {
  270. console.log.apply(console, arguments);
  271. }
  272. },
  273. warn: function() {
  274. if (this._isDev) {
  275. console.warn.apply(console, arguments);
  276. }
  277. },
  278. error: function() {
  279. console.error.apply(console, arguments);
  280. }
  281. };
  282. function getQueryParam(name) {
  283. const params = new URLSearchParams(window.location.search);
  284. return params.get(name);
  285. }
  286. // Initialize Logger
  287. const env = (getQueryParam('env') || '').toLowerCase();
  288. Logger.init(env === 'mock'); // Only log if env=mock
  289. function redirectToDetail() {
  290. const token = getQueryParam('token');
  291. const id = getQueryParam('id');
  292. // Use centralized logic
  293. let detailUrl = getTargetDetail();
  294. const queryParams = [];
  295. if (token) {
  296. queryParams.push(`token=${encodeURIComponent(token)}`);
  297. }
  298. if (id) {
  299. queryParams.push(`id=${encodeURIComponent(id)}`);
  300. }
  301. if (queryParams.length > 0) {
  302. detailUrl += `?${queryParams.join('&')}`;
  303. }
  304. detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
  305. Logger.log("Navigating to:", detailUrl);
  306. if (window.Bridge && window.Bridge.appAction) {
  307. Bridge.appAction(detailUrl);
  308. } else {
  309. window.location.href = detailUrl;
  310. }
  311. }
  312. </script>
  313. </body>
  314. </html>