| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- <!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 {
- --ice-blue: #A5F2F3;
- --ice-deep: #006FBB;
- --ice-white: #FFFFFF;
- --glass-border: 1px solid rgba(255, 255, 255, 0.4);
- }
- * {
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, 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, #2980b9 0%, #2c3e50 100%);
- border-radius: 20px;
- overflow: hidden;
- cursor: pointer;
- display: flex;
- flex-direction: column;
- align-items: center;
- border: 2px solid rgba(165, 242, 243, 0.3);
- /* 移除昂贵的 box-shadow */
- /* box-shadow: 0 0 30px rgba(20, 136, 204, 0.5); */
- transform: translateZ(0);
- -webkit-mask-image: -webkit-radial-gradient(white, black);
- }
- /* 替代 SVG 滤镜的简单冰霜层 */
- .frost-overlay {
- position: absolute;
- top: 0; left: 0; width: 100%; height: 100%;
- /* 使用简单的径向渐变模拟光照 */
- background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.1) 0%, transparent 60%);
- pointer-events: none;
- z-index: 1;
- }
- /* 优化后的雪花:减少阴影,开启硬件加速 */
- .snowflakes {
- position: absolute;
- width: 100%; height: 100%;
- z-index: 0;
- pointer-events: none;
- }
- .snowflake {
- position: absolute;
- color: #fff;
- opacity: 0.6;
- font-size: 20px;
- will-change: transform; /* 关键优化 */
- animation: fall linear infinite;
- /* 移除 text-shadow 以提升性能 */
- }
- .s1 { top: -10%; left: 10%; font-size: 15px; animation-duration: 5s; }
- .s2 { top: -20%; left: 50%; font-size: 25px; animation-duration: 8s; animation-delay: 2s; }
- .s3 { top: -30%; left: 80%; font-size: 18px; animation-duration: 6s; animation-delay: 1s; }
-
- /* 皇冠图标 */
- .crown-icon {
- position: absolute;
- top: -35px;
- left: 50%;
- transform: translateX(-50%);
- font-size: 30px;
- color: #ffd700;
- /* 使用简单的 text-shadow 替代 filter: drop-shadow */
- text-shadow: 0 0 5px rgba(255,255,255,0.5);
- animation: floatCrown 3s infinite ease-in-out;
- will-change: transform;
- }
- /* 顶部年份 */
- .year-crystal {
- margin-top: 15%;
- position: relative;
- z-index: 2;
- padding: 1.5vmin 6vmin;
- /* 移除 backdrop-filter,使用纯半透明背景 */
- background: rgba(255, 255, 255, 0.2);
- border: var(--glass-border);
- border-radius: 30px;
- font-size: 5vmin;
- color: var(--ice-white);
- letter-spacing: 3px;
- /* 简化 text-shadow */
- text-shadow: 0 2px 4px rgba(0,0,0,0.3);
- }
- /* 核心视觉 */
- .magic-core {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- position: relative;
- z-index: 2;
- width: 100%;
- }
- /* 优化后的魔法圆环:使用 border 代替 box-shadow */
- .ice-fractal {
- position: absolute;
- width: 60vmin; height: 60vmin;
- display: flex;
- justify-content: center;
- align-items: center;
- }
-
- .fractal-ring {
- position: absolute;
- border: 1px solid rgba(165, 242, 243, 0.4);
- width: 100%; height: 100%;
- transform: rotate(45deg);
- /* 移除 box-shadow 动画 */
- animation: spinMagic 20s infinite linear;
- will-change: transform;
- }
- .month-num {
- font-size: 40vmin;
- font-weight: 100;
- color: #fff; /* 纯色文字性能最好,通过透明度模拟质感 */
- /* 简化渐变文字为简单的透明度渐变 */
- mask-image: linear-gradient(to bottom, black 30%, rgba(0,0,0,0.5) 100%);
- -webkit-mask-image: linear-gradient(to bottom, black 30%, rgba(0,0,0,0.5) 100%);
- /* 移除 filter: drop-shadow */
- text-shadow: 0 0 20px rgba(165, 242, 243, 0.4);
- position: relative;
- z-index: 3;
- }
- .month-title {
- font-size: 6vmin;
- color: var(--ice-blue);
- letter-spacing: 2px;
- text-transform: uppercase;
- margin-top: -2vmin;
- text-shadow: 0 2px 4px rgba(0,0,0,0.5);
- z-index: 3;
- }
- /* 水晶按钮 */
- .crystal-btn-area {
- margin-bottom: 15%;
- z-index: 2;
- width: 100%;
- display: flex;
- justify-content: center;
- }
- .crystal-btn {
- /* 移除 backdrop-filter */
- background: rgba(255, 255, 255, 0.15);
- border: 1px solid rgba(255,255,255,0.5);
- border-radius: 50px;
- padding: 2.5vmin 8vmin;
- color: #fff;
- font-size: 4.5vmin;
- letter-spacing: 1px;
- display: flex;
- align-items: center;
- gap: 10px;
- /* 简化 box-shadow */
- box-shadow: 0 4px 10px rgba(0,0,0,0.2);
- }
- /* 动画 */
- @keyframes fall {
- 0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
- 20% { opacity: 0.8; }
- 100% { transform: translateY(120vh) rotate(360deg); opacity: 0; }
- }
- @keyframes spinMagic {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
- }
- @keyframes floatCrown {
- 0%, 100% { transform: translateX(-50%) translateY(0); }
- 50% { transform: translateX(-50%) translateY(-5px); }
- }
- </style>
- </head>
- <body>
- <div class="card-container" onclick="redirectToDetail()">
- <div class="frost-overlay"></div>
-
- <!-- 减少雪花数量 -->
- <div class="snowflakes">
- <div class="snowflake s1">❄</div>
- <div class="snowflake s2">❅</div>
- <div class="snowflake s3">❆</div>
- </div>
- <!-- 冰晶年份 + 皇冠 -->
- <div class="year-crystal">
- <i class="fa-solid fa-crown crown-icon"></i>
- <span class="year-text">2025年</span>
- </div>
- <!-- 核心冰魔法 -->
- <div class="magic-core">
- <div class="ice-fractal">
- <div class="fractal-ring"></div>
- </div>
- <div class="month-num">12</div>
- <div class="month-title">月挑战赛</div>
- </div>
- <!-- 水晶按钮 -->
- <div class="crystal-btn-area">
- <div class="crystal-btn">
- <i class="fa-regular fa-gem"></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>
|