index.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. * {
  10. box-sizing: border-box;
  11. margin: 0;
  12. padding: 0;
  13. font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  14. -webkit-tap-highlight-color: transparent;
  15. user-select: none;
  16. }
  17. html, body {
  18. width: 100%;
  19. height: 100%;
  20. overflow: hidden;
  21. background: transparent;
  22. display: flex;
  23. justify-content: center;
  24. align-items: center;
  25. }
  26. /* 容器:100% 充满嵌入框 */
  27. .card-container {
  28. width: 100%;
  29. height: 100%;
  30. border-radius: 20px;
  31. overflow: hidden;
  32. position: relative;
  33. cursor: pointer;
  34. /* 背景图 */
  35. background: url('./card.png') center/cover no-repeat;
  36. }
  37. .card-container:active {
  38. transform: scale(0.98);
  39. transition: transform 0.1s;
  40. }
  41. .content-layer {
  42. position: absolute;
  43. top: 0; left: 0; width: 100%; height: 100%;
  44. display: flex;
  45. flex-direction: column;
  46. align-items: center;
  47. z-index: 2;
  48. }
  49. /* 1. 年份标签 - 修改:去背景、放大字体、单位改 vmin */
  50. .year-tag {
  51. /* 距离顶部约 14% */
  52. margin-top: 13%;
  53. /* vmin 单位:确保随容器大小自动缩放 */
  54. font-size: 8vmin; /* 字体加大 */
  55. font-weight: 800;
  56. color: #fff;
  57. letter-spacing: 2px;
  58. /* 去掉背景和边框 */
  59. background: none;
  60. border: none;
  61. padding: 0;
  62. /* 增加投影以保证清晰度 */
  63. text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  64. }
  65. /* 2. 月份数字 - 修改:单位改 vmin */
  66. .month-num {
  67. /* 字体极大,随容器缩放 */
  68. font-size: 32vmin;
  69. font-weight: 900;
  70. line-height: 1;
  71. margin-top: 9%;
  72. /* 金色渐变字 */
  73. background: linear-gradient(to bottom, #ffffff 20%, #ffd700 60%, #ff9f43 100%);
  74. -webkit-background-clip: text;
  75. -webkit-text-fill-color: transparent;
  76. filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  77. }
  78. /* 3. 奖杯动画图标 - 修改:大幅下移 */
  79. .trophy-icon {
  80. /* 修改:往下移动 (从原来的 4% 增加到 15%) */
  81. margin-top: 13%;
  82. /* 图标大小也随容器缩放 */
  83. width: 15vmin;
  84. height: 15vmin;
  85. display: flex; justify-content: center; align-items: center;
  86. animation: trophy-pulse 2s infinite ease-in-out;
  87. }
  88. .trophy-icon i {
  89. /* 图标字体大小随容器缩放 */
  90. font-size: 10vmin;
  91. color: #ffd700;
  92. filter: drop-shadow(0 0 5px rgba(253, 203, 110, 0.8));
  93. }
  94. @keyframes trophy-pulse {
  95. 0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(253, 203, 110, 0)); }
  96. 50% { transform: scale(1.2); filter: drop-shadow(0 0 8px rgba(253, 203, 110, 0.6)); }
  97. 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(253, 203, 110, 0)); }
  98. }
  99. </style>
  100. </head>
  101. <body>
  102. <div class="card-container" onclick="redirectToDetail()">
  103. <div class="content-layer">
  104. <div class="year-tag">2025年</div>
  105. <div class="month-num">12</div>
  106. <div class="trophy-icon">
  107. <i class="fa-solid fa-trophy"></i>
  108. </div>
  109. </div>
  110. </div>
  111. <script src="./bridge.js"></script>
  112. <script>
  113. function getQueryParam(name) {
  114. const params = new URLSearchParams(window.location.search);
  115. return params.get(name);
  116. }
  117. function redirectToDetail() {
  118. const token = getQueryParam('token');
  119. const id = getQueryParam('id');
  120. let detailUrl = 'detail.html';
  121. const queryParams = [];
  122. if (token) {
  123. queryParams.push(`token=${encodeURIComponent(token)}`);
  124. }
  125. if (id) {
  126. queryParams.push(`id=${encodeURIComponent(id)}`);
  127. }
  128. if (queryParams.length > 0) {
  129. detailUrl += `?${queryParams.join('&')}`;
  130. }
  131. detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
  132. console.log("Navigating to:", detailUrl);
  133. if (window.Bridge && window.Bridge.appAction) {
  134. Bridge.appAction(detailUrl);
  135. } else {
  136. window.location.href = detailUrl;
  137. }
  138. }
  139. </script>
  140. </body>
  141. </html>