| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343 |
- <!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 {
- --toon-blue: #4FACFE;
- --toon-cloud: #FFFFFF;
- --toon-yellow: #FFD056;
- --toon-pink: #FF9A9E;
- --toon-green: #00E18F;
- --toon-black: #333333;
- --border-thick: 4px solid var(--toon-black);
- }
- * {
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- /* 卡通感圆体 */
- font-family: 'Comic Sans MS', 'Chalkboard SE', 'YouYuan', 'Microsoft YaHei', 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: linear-gradient(180deg, var(--toon-blue) 0%, #00F2FE 100%);
- border-radius: 20px;
- overflow: hidden;
- cursor: pointer;
- display: flex;
- flex-direction: column;
- align-items: center;
- /* 强制裁剪 */
- transform: translateZ(0);
- -webkit-mask-image: -webkit-radial-gradient(white, black);
- }
- /* 背景云层 */
- .cloud-bg {
- position: absolute;
- width: 100%; height: 100%;
- z-index: 0;
- }
-
- .cloud {
- position: absolute;
- background: rgba(255,255,255,0.4);
- border-radius: 50px;
- animation: floatCloud 20s infinite linear;
- }
- .c1 { top: 10%; left: -20%; width: 120px; height: 40px; animation-duration: 15s; }
- .c2 { top: 30%; right: -10%; width: 80px; height: 30px; animation-duration: 25s; animation-delay: -5s; }
- .c3 { bottom: 20%; left: 10%; width: 150px; height: 50px; animation-duration: 18s; animation-delay: -10s; }
- /* 装饰:彩虹 */
- .rainbow {
- position: absolute;
- top: -10%;
- right: -20%;
- width: 60vmin;
- height: 60vmin;
- border-radius: 50%;
- box-shadow:
- 0 0 0 20px var(--toon-pink),
- 0 0 0 40px var(--toon-yellow),
- 0 0 0 60px var(--toon-green);
- opacity: 0.6;
- z-index: 0;
- }
- /* 顶部年份:太阳徽章 */
- .year-badge {
- margin-top: 12%;
- z-index: 2;
- background: var(--toon-yellow);
- border: var(--border-thick);
- padding: 1vmin 4vmin;
- border-radius: 50px;
- font-size: 5vmin;
- font-weight: bold;
- color: var(--toon-black);
- box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
- transform: rotate(-3deg);
- display: flex;
- align-items: center;
- gap: 5px;
- animation: floatBadge 3s infinite ease-in-out;
- }
- .sun-icon {
- color: var(--toon-black);
- font-size: 4vmin;
- }
- /* 核心视觉:云朵上的月份 */
- .main-visual {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- z-index: 2;
- position: relative;
- }
- .month-bg {
- position: absolute;
- width: 55vmin;
- height: 50vmin;
- background: var(--toon-cloud);
- border: var(--border-thick);
- border-radius: 50%;
- /* 手绘感不规则圆 */
- border-radius: 54% 46% 42% 58% / 60% 54% 46% 40%;
- box-shadow: 8px 8px 0 rgba(0,0,0,0.15);
- animation: blob 6s infinite ease-in-out alternate;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .month-num {
- font-size: 35vmin;
- color: var(--toon-pink);
- font-weight: 900;
- /* 卡通描边字 */
- -webkit-text-stroke: 3px var(--toon-black);
- text-shadow: 5px 5px 0 rgba(0,0,0,0.1);
- position: relative;
- z-index: 3;
- }
- .month-tag {
- position: absolute;
- bottom: -10%;
- background: var(--toon-green);
- border: var(--border-thick);
- color: #fff;
- padding: 1vmin 3vmin;
- border-radius: 15px;
- font-size: 5vmin;
- font-weight: bold;
- transform: rotate(3deg);
- box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
- z-index: 4;
- -webkit-text-stroke: 1px var(--toon-black);
- }
- /* 底部按钮:巨大的游戏按钮 */
- .action-container {
- margin-bottom: 12%;
- z-index: 2;
- width: 100%;
- display: flex;
- justify-content: center;
- }
- .toon-btn {
- background: #FF6B6B;
- border: var(--border-thick);
- border-radius: 20px;
- padding: 3vmin 8vmin;
- color: #fff;
- font-size: 5vmin;
- font-weight: bold;
- display: flex;
- align-items: center;
- gap: 2vmin;
- box-shadow:
- inset 0 5px 0 rgba(255,255,255,0.3),
- 0 6px 0 var(--toon-black); /* 立体厚度 */
- transition: all 0.1s;
- position: relative;
- top: 0;
- }
- .toon-btn i {
- -webkit-text-stroke: 1px var(--toon-black);
- }
- /* 交互:按下扁平化 */
- .card-container:active .toon-btn {
- top: 6px;
- box-shadow:
- inset 0 5px 0 rgba(255,255,255,0.3),
- 0 0 0 var(--toon-black);
- }
- .card-container:active .month-bg {
- transform: scale(0.95) rotate(5deg);
- }
- /* 动画 */
- @keyframes floatCloud {
- from { transform: translateX(-150%); }
- to { transform: translateX(350%); }
- }
- @keyframes blob {
- 0% { border-radius: 54% 46% 42% 58% / 60% 54% 46% 40%; transform: rotate(0deg); }
- 100% { border-radius: 45% 55% 55% 45% / 50% 40% 60% 50%; transform: rotate(2deg); }
- }
- @keyframes floatBadge {
- 0%, 100% { transform: rotate(-3deg) translateY(0); }
- 50% { transform: rotate(-3deg) translateY(-5px); }
- }
- </style>
- </head>
- <body>
- <div class="card-container" onclick="redirectToDetail()">
- <div class="rainbow"></div>
- <div class="cloud-bg">
- <div class="cloud c1"></div>
- <div class="cloud c2"></div>
- <div class="cloud c3"></div>
- </div>
- <!-- 太阳年份徽章 -->
- <div class="year-badge">
- <i class="fa-solid fa-sun sun-icon"></i>
- <span class="year-text">2025年</span>
- </div>
- <!-- 中央视觉 -->
- <div class="main-visual">
- <div class="month-bg">
- <div class="month-num">12</div>
- <div class="month-tag">月挑战赛</div>
- </div>
- </div>
- <!-- 游戏感按钮 -->
- <div class="action-container">
- <div class="toon-btn">
- <i class="fa-solid fa-play"></i>
- <span>GO! 排行榜</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>
|