index-style3.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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. --pop-bg: #ffffff;
  11. --pop-yellow: #FFD02F;
  12. --pop-blue: #2E86DE;
  13. --pop-red: #EE5253;
  14. --pop-black: #000000;
  15. --border-width: 3px;
  16. --shadow-offset: 6px;
  17. }
  18. * {
  19. box-sizing: border-box;
  20. margin: 0;
  21. padding: 0;
  22. font-family: 'Arial Black', 'Helvetica Neue', 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-color: var(--pop-bg);
  41. border-radius: 20px;
  42. overflow: hidden;
  43. cursor: pointer;
  44. display: flex;
  45. flex-direction: column;
  46. align-items: center;
  47. /* 漫画网点背景 */
  48. background-image: radial-gradient(var(--pop-blue) 15%, transparent 16%), radial-gradient(var(--pop-blue) 15%, transparent 16%);
  49. background-size: 20px 20px;
  50. background-position: 0 0, 10px 10px;
  51. /* 强边框 */
  52. border: var(--border-width) solid var(--pop-black);
  53. }
  54. /* 装饰图形:漂浮的几何体 */
  55. .shape {
  56. position: absolute;
  57. border: var(--border-width) solid var(--pop-black);
  58. z-index: 1;
  59. opacity: 0.8;
  60. }
  61. .shape-circle {
  62. width: 15vmin;
  63. height: 15vmin;
  64. border-radius: 50%;
  65. background: var(--pop-yellow);
  66. top: -5%;
  67. right: -5%;
  68. box-shadow: 4px 4px 0 var(--pop-black);
  69. animation: float 6s infinite ease-in-out;
  70. }
  71. .shape-rect {
  72. width: 10vmin;
  73. height: 10vmin;
  74. background: var(--pop-red);
  75. bottom: 10%;
  76. left: -2%;
  77. transform: rotate(15deg);
  78. box-shadow: 4px 4px 0 var(--pop-black);
  79. animation: float 8s infinite reverse ease-in-out;
  80. }
  81. /* 顶部标签 */
  82. .top-badge {
  83. margin-top: 12%;
  84. background: var(--pop-black);
  85. color: #fff;
  86. padding: 1vmin 4vmin;
  87. font-size: 6vmin;
  88. transform: rotate(-3deg); /* 俏皮的倾斜 */
  89. z-index: 2;
  90. box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
  91. border: 2px solid #fff;
  92. }
  93. /* 核心内容区域 */
  94. .main-content {
  95. flex: 1;
  96. display: flex;
  97. flex-direction: column;
  98. justify-content: center;
  99. align-items: center;
  100. z-index: 2;
  101. width: 100%;
  102. }
  103. /* 月份数字卡片 */
  104. .month-card {
  105. position: relative;
  106. background: #fff;
  107. border: var(--border-width) solid var(--pop-black);
  108. padding: 2vmin 8vmin;
  109. box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--pop-black);
  110. display: flex;
  111. flex-direction: column;
  112. align-items: center;
  113. transform: rotate(2deg); /* 反向倾斜 */
  114. transition: transform 0.1s;
  115. }
  116. .month-num {
  117. font-size: 40vmin;
  118. line-height: 0.9;
  119. color: var(--pop-blue);
  120. /* 描边文字效果 */
  121. text-shadow:
  122. 3px 3px 0 var(--pop-black),
  123. -1px -1px 0 var(--pop-black),
  124. 1px -1px 0 var(--pop-black),
  125. -1px 1px 0 var(--pop-black),
  126. 1px 1px 0 var(--pop-black);
  127. }
  128. .month-label {
  129. font-size: 8vmin;
  130. background: var(--pop-yellow);
  131. padding: 0 2vmin;
  132. border: 2px solid var(--pop-black);
  133. margin-top: -5vmin; /* 叠加效果 */
  134. margin-bottom: 2vmin;
  135. z-index: 3;
  136. box-shadow: 2px 2px 0 var(--pop-black);
  137. }
  138. /* 底部按钮区 */
  139. .cta-container {
  140. margin-bottom: 15%;
  141. z-index: 2;
  142. width: 80%;
  143. }
  144. .cta-btn {
  145. width: 100%;
  146. background: var(--pop-red);
  147. border: var(--border-width) solid var(--pop-black);
  148. padding: 3vmin 0;
  149. display: flex;
  150. justify-content: center;
  151. align-items: center;
  152. gap: 2vmin;
  153. color: #fff;
  154. font-size: 5vmin;
  155. box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--pop-black);
  156. transition: all 0.1s;
  157. }
  158. .cta-icon {
  159. font-size: 6vmin;
  160. animation: wiggle 2s infinite;
  161. }
  162. /* 交互状态:按下效果 */
  163. .card-container:active .cta-btn {
  164. transform: translate(var(--shadow-offset), var(--shadow-offset));
  165. box-shadow: 0 0 0 var(--pop-black);
  166. }
  167. .card-container:active .month-card {
  168. transform: rotate(2deg) scale(0.98);
  169. }
  170. /* 动画定义 */
  171. @keyframes float {
  172. 0%, 100% { transform: translateY(0) rotate(0deg); }
  173. 50% { transform: translateY(-15px) rotate(5deg); }
  174. }
  175. @keyframes wiggle {
  176. 0%, 100% { transform: rotate(-10deg); }
  177. 50% { transform: rotate(10deg); }
  178. }
  179. </style>
  180. </head>
  181. <body>
  182. <div class="card-container" onclick="redirectToDetail()">
  183. <!-- 装饰背景 -->
  184. <div class="shape shape-circle"></div>
  185. <div class="shape shape-rect"></div>
  186. <!-- 顶部年份 -->
  187. <div class="top-badge">2025年</div>
  188. <!-- 中间月份 -->
  189. <div class="main-content">
  190. <div class="month-card">
  191. <div class="month-num">12</div>
  192. <div class="month-label">月挑战赛</div>
  193. </div>
  194. </div>
  195. <!-- 底部按钮 -->
  196. <div class="cta-container">
  197. <div class="cta-btn">
  198. <i class="fa-solid fa-trophy cta-icon"></i>
  199. <span>查看排行榜</span>
  200. </div>
  201. </div>
  202. </div>
  203. <script src="./bridge.js"></script>
  204. <script src="./js/target_logic.js"></script>
  205. <script>
  206. // Auto-Update Date
  207. (function() {
  208. const now = new Date();
  209. const year = now.getFullYear();
  210. const month = now.getMonth() + 1;
  211. const yearEl = document.querySelector('.top-badge');
  212. const monthEl = document.querySelector('.month-num');
  213. if (yearEl) yearEl.innerText = year + '年';
  214. if (monthEl) monthEl.innerText = month;
  215. })();
  216. // Logger Utility
  217. const Logger = {
  218. _isDev: false,
  219. init: function(isDev) {
  220. this._isDev = isDev;
  221. },
  222. log: function() {
  223. if (this._isDev) {
  224. console.log.apply(console, arguments);
  225. }
  226. },
  227. warn: function() {
  228. if (this._isDev) {
  229. console.warn.apply(console, arguments);
  230. }
  231. },
  232. error: function() {
  233. console.error.apply(console, arguments);
  234. }
  235. };
  236. function getQueryParam(name) {
  237. const params = new URLSearchParams(window.location.search);
  238. return params.get(name);
  239. }
  240. // Initialize Logger
  241. const env = (getQueryParam('env') || '').toLowerCase();
  242. Logger.init(env === 'mock'); // Only log if env=mock
  243. function redirectToDetail() {
  244. const token = getQueryParam('token');
  245. const id = getQueryParam('id');
  246. // Dynamic Target
  247. let detailUrl = getTargetDetail();
  248. const queryParams = [];
  249. if (token) {
  250. queryParams.push(`token=${encodeURIComponent(token)}`);
  251. }
  252. if (id) {
  253. queryParams.push(`id=${encodeURIComponent(id)}`);
  254. }
  255. if (queryParams.length > 0) {
  256. detailUrl += `?${queryParams.join('&')}`;
  257. }
  258. detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
  259. Logger.log("Navigating to:", detailUrl);
  260. if (window.Bridge && window.Bridge.appAction) {
  261. Bridge.appAction(detailUrl);
  262. } else {
  263. window.location.href = detailUrl;
  264. }
  265. }
  266. </script>
  267. </body>
  268. </html>