| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
- <title>月度排行榜</title>
- <link href="./css/all.min.css" rel="stylesheet">
- <style>
- :root {
- --ogre-light: #C5E063; /* 史莱克皮肤绿 */
- --ogre-dark: #748c27;
- --swamp-mud: #3E2723; /* 泥巴棕 */
- --wood-light: #8D6E63;
- --wood-dark: #4E342E;
- --parchment: #F3E5AB; /* 羊皮纸 */
- }
- * {
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- /* 粗犷的中世纪字体风格 */
- font-family: 'Impact', 'Haettenschweiler', 'Arial Narrow Bold', sans-serif;
- -webkit-tap-highlight-color: transparent;
- user-select: none;
- }
- html, body {
- width: 100%;
- height: 100%;
- overflow: hidden;
- background: transparent;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- /* 主容器:木板框 */
- .card-container {
- width: 100%;
- height: 100%;
- position: relative;
- background: radial-gradient(circle at center, #2c3e50 0%, #000000 100%); /* 深夜沼泽背景 */
- border-radius: 20px;
- overflow: hidden;
- cursor: pointer;
- display: flex;
- flex-direction: column;
- align-items: center;
-
- /* 木纹边框 */
- border: 12px solid var(--wood-dark);
- box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
-
- /* 强制硬件加速 & 圆角修复 */
- transform: translateZ(0);
- -webkit-mask-image: -webkit-radial-gradient(white, black);
- }
- /* 萤火虫动画背景 */
- .fireflies {
- position: absolute;
- width: 100%; height: 100%;
- z-index: 0;
- pointer-events: none;
- }
- .fly {
- position: absolute;
- width: 4px; height: 4px;
- background: #fff9c4;
- border-radius: 50%;
- box-shadow: 0 0 10px #fff9c4, 0 0 20px #ffeb3b;
- animation: flyAround 10s infinite linear;
- opacity: 0;
- }
- .f1 { top: 50%; left: 50%; animation-duration: 8s; animation-delay: 0s; }
- .f2 { top: 20%; left: 20%; animation-duration: 12s; animation-delay: 2s; }
- .f3 { top: 80%; left: 80%; animation-duration: 15s; animation-delay: 4s; }
- .f4 { top: 30%; left: 70%; animation-duration: 10s; animation-delay: 1s; }
- /* 顶部年份:悬挂木牌 */
- .hanging-sign {
- margin-top: 8%;
- position: relative;
- z-index: 2;
- animation: swing 3s infinite ease-in-out alternate;
- transform-origin: top center;
- }
- .chains {
- display: flex;
- justify-content: space-between;
- width: 60%;
- margin: 0 auto -5px;
- height: 20px;
- }
- .chain-link {
- width: 4px; height: 100%; background: #555;
- }
- .wood-plank {
- background: repeating-linear-gradient(90deg, var(--wood-dark) 0, var(--wood-dark) 2%, var(--wood-light) 5%, var(--wood-dark) 10%);
- padding: 1vmin 4vmin;
- border: 2px solid #222;
- border-radius: 4px;
- color: var(--parchment);
- font-size: 6vmin;
- text-shadow: 2px 2px 0 #000;
- box-shadow: 0 5px 10px rgba(0,0,0,0.5);
- position: relative;
- }
- /* 钉子 */
- .nail {
- position: absolute; width: 6px; height: 6px; background: #111; border-radius: 50%; top: 50%; transform: translateY(-50%);
- }
- .n-left { left: 5px; }
- .n-right { right: 5px; }
- /* 核心视觉:史莱克粘液 */
- .ooze-container {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- position: relative;
- z-index: 2;
- width: 100%;
- }
- .slime-blob {
- width: 55vmin;
- height: 55vmin;
- background: radial-gradient(circle at 30% 30%, var(--ogre-light), var(--ogre-dark));
- border-radius: 50%;
- /* 粘液形状 */
- box-shadow:
- inset -10px -10px 20px rgba(0,0,0,0.3),
- inset 10px 10px 20px rgba(255,255,255,0.4),
- 0 10px 0 var(--ogre-dark); /* 厚度 */
- display: flex;
- justify-content: center;
- align-items: center;
- animation: squish 4s infinite ease-in-out;
- position: relative;
- }
- /* 泥点装饰 */
- .mud-spot {
- position: absolute;
- background: var(--swamp-mud);
- border-radius: 50%;
- opacity: 0.8;
- }
- .m1 { width: 10px; height: 10px; top: 20%; right: 20%; }
- .m2 { width: 6px; height: 6px; bottom: 30%; left: 15%; }
- .month-num {
- font-size: 35vmin;
- color: var(--swamp-mud);
- font-family: 'Georgia', serif;
- font-weight: 900;
- text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
- position: relative;
- z-index: 3;
- }
- /* 月份标签:破旧羊皮纸 */
- .scroll-paper {
- position: absolute;
- bottom: 0;
- background: var(--parchment);
- padding: 1vmin 4vmin;
- color: var(--swamp-mud);
- font-size: 5vmin;
- font-weight: bold;
- transform: rotate(-2deg);
- box-shadow: 3px 3px 5px rgba(0,0,0,0.4);
- /* 撕裂边缘效果 - 简化版 */
- clip-path: polygon(0% 0%, 100% 2%, 98% 100%, 2% 98%);
- }
- /* 底部按钮:粗木棍 */
- .swamp-btn-area {
- margin-bottom: 15%;
- z-index: 2;
- width: 80%;
- display: flex;
- justify-content: center;
- }
- .log-btn {
- background: var(--wood-dark);
- color: #fff; /* 浅色文字 */
- border: 2px solid #2a1b15;
- border-radius: 10px;
- padding: 2vmin 6vmin;
- font-size: 5vmin;
- display: flex;
- align-items: center;
- gap: 10px;
- box-shadow: 0 5px 0 #2a1b15, 0 10px 10px rgba(0,0,0,0.5);
- transition: all 0.1s;
- background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 2px, transparent 5px);
- }
- .card-container:active .log-btn {
- transform: translateY(5px);
- box-shadow: 0 0 0 #2a1b15, inset 0 3px 5px rgba(0,0,0,0.5);
- }
- /* 动画 */
- @keyframes flyAround {
- 0% { transform: translate(0, 0); opacity: 0; }
- 20% { opacity: 1; }
- 80% { opacity: 1; }
- 100% { transform: translate(100px, -100px); opacity: 0; }
- }
- @keyframes swing {
- from { transform: rotate(-2deg); }
- to { transform: rotate(2deg); }
- }
- @keyframes squish {
- 0%, 100% { transform: scale(1, 1); border-radius: 50%; }
- 50% { transform: scale(1.1, 0.9); border-radius: 55% 45% 50% 50% / 50% 50% 55% 45%; }
- }
- </style>
- </head>
- <body>
- <div class="card-container" onclick="redirectToDetail()">
- <!-- 萤火虫 -->
- <div class="fireflies">
- <div class="fly f1"></div>
- <div class="fly f2"></div>
- <div class="fly f3"></div>
- <div class="fly f4"></div>
- </div>
- <!-- 悬挂年份木牌 -->
- <div class="hanging-sign">
- <div class="chains">
- <div class="chain-link"></div>
- <div class="chain-link"></div>
- </div>
- <div class="wood-plank">
- <div class="nail n-left"></div>
- <span class="year-text">2025年</span>
- <div class="nail n-right"></div>
- </div>
- </div>
- <!-- 史莱克粘液 -->
- <div class="ooze-container">
- <div class="slime-blob">
- <div class="mud-spot m1"></div>
- <div class="mud-spot m2"></div>
- <div class="month-num">12</div>
- </div>
- <div class="scroll-paper">月挑战赛</div>
- </div>
- <!-- 木头按钮 -->
- <div class="swamp-btn-area">
- <div class="log-btn">
- <i class="fa-solid fa-crown"></i>
- <span>查看排行榜</span>
- </div>
- </div>
- </div>
- <script src="./bridge.js"></script>
- <script src="./js/target_logic.js"></script>
- <script>
- // Auto-Update Date
- (function() {
- const now = new Date();
- const year = now.getFullYear();
- const month = now.getMonth() + 1;
-
- const yearEl = document.querySelector('.year-text');
- const monthEl = document.querySelector('.month-num');
-
- if (yearEl) yearEl.innerText = year + '年';
- if (monthEl) monthEl.innerText = month;
- })();
- // Logger Utility
- const Logger = {
- _isDev: false,
- init: function(isDev) {
- this._isDev = isDev;
- },
- log: function() {
- if (this._isDev) {
- console.log.apply(console, arguments);
- }
- },
- warn: function() {
- if (this._isDev) {
- console.warn.apply(console, arguments);
- }
- },
- error: function() {
- console.error.apply(console, arguments);
- }
- };
- function getQueryParam(name) {
- const params = new URLSearchParams(window.location.search);
- return params.get(name);
- }
- // Initialize Logger
- const env = (getQueryParam('env') || '').toLowerCase();
- Logger.init(env === 'mock'); // Only log if env=mock
- function redirectToDetail() {
- const token = getQueryParam('token');
- const id = getQueryParam('id');
-
- // Use centralized logic
- let detailUrl = getTargetDetail();
- const queryParams = [];
- if (token) {
- queryParams.push(`token=${encodeURIComponent(token)}`);
- }
- if (id) {
- queryParams.push(`id=${encodeURIComponent(id)}`);
- }
- if (queryParams.length > 0) {
- detailUrl += `?${queryParams.join('&')}`;
- }
-
- detailUrl += (detailUrl.includes('?') ? '&' : '?') + 'full=true';
- Logger.log("Navigating to:", detailUrl);
-
- if (window.Bridge && window.Bridge.appAction) {
- Bridge.appAction(detailUrl);
- } else {
- window.location.href = detailUrl;
- }
- }
- </script>
- </body>
- </html>
|