| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310 |
- <!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 {
- --pop-bg: #ffffff;
- --pop-yellow: #FFD02F;
- --pop-blue: #2E86DE;
- --pop-red: #EE5253;
- --pop-black: #000000;
- --border-width: 3px;
- --shadow-offset: 6px;
- }
- * {
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- font-family: 'Arial Black', 'Helvetica Neue', 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-color: var(--pop-bg);
- border-radius: 20px;
- overflow: hidden;
- cursor: pointer;
- display: flex;
- flex-direction: column;
- align-items: center;
- /* 漫画网点背景 */
- background-image: radial-gradient(var(--pop-blue) 15%, transparent 16%), radial-gradient(var(--pop-blue) 15%, transparent 16%);
- background-size: 20px 20px;
- background-position: 0 0, 10px 10px;
- /* 强边框 */
- border: var(--border-width) solid var(--pop-black);
- }
- /* 装饰图形:漂浮的几何体 */
- .shape {
- position: absolute;
- border: var(--border-width) solid var(--pop-black);
- z-index: 1;
- opacity: 0.8;
- }
- .shape-circle {
- width: 15vmin;
- height: 15vmin;
- border-radius: 50%;
- background: var(--pop-yellow);
- top: -5%;
- right: -5%;
- box-shadow: 4px 4px 0 var(--pop-black);
- animation: float 6s infinite ease-in-out;
- }
- .shape-rect {
- width: 10vmin;
- height: 10vmin;
- background: var(--pop-red);
- bottom: 10%;
- left: -2%;
- transform: rotate(15deg);
- box-shadow: 4px 4px 0 var(--pop-black);
- animation: float 8s infinite reverse ease-in-out;
- }
- /* 顶部标签 */
- .top-badge {
- margin-top: 12%;
- background: var(--pop-black);
- color: #fff;
- padding: 1vmin 4vmin;
- font-size: 6vmin;
- transform: rotate(-3deg); /* 俏皮的倾斜 */
- z-index: 2;
- box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
- border: 2px solid #fff;
- }
- /* 核心内容区域 */
- .main-content {
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- z-index: 2;
- width: 100%;
- }
- /* 月份数字卡片 */
- .month-card {
- position: relative;
- background: #fff;
- border: var(--border-width) solid var(--pop-black);
- padding: 2vmin 8vmin;
- box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--pop-black);
- display: flex;
- flex-direction: column;
- align-items: center;
- transform: rotate(2deg); /* 反向倾斜 */
- transition: transform 0.1s;
- }
- .month-num {
- font-size: 40vmin;
- line-height: 0.9;
- color: var(--pop-blue);
- /* 描边文字效果 */
- text-shadow:
- 3px 3px 0 var(--pop-black),
- -1px -1px 0 var(--pop-black),
- 1px -1px 0 var(--pop-black),
- -1px 1px 0 var(--pop-black),
- 1px 1px 0 var(--pop-black);
- }
- .month-label {
- font-size: 8vmin;
- background: var(--pop-yellow);
- padding: 0 2vmin;
- border: 2px solid var(--pop-black);
- margin-top: -5vmin; /* 叠加效果 */
- margin-bottom: 2vmin;
- z-index: 3;
- box-shadow: 2px 2px 0 var(--pop-black);
- }
- /* 底部按钮区 */
- .cta-container {
- margin-bottom: 15%;
- z-index: 2;
- width: 80%;
- }
- .cta-btn {
- width: 100%;
- background: var(--pop-red);
- border: var(--border-width) solid var(--pop-black);
- padding: 3vmin 0;
- display: flex;
- justify-content: center;
- align-items: center;
- gap: 2vmin;
- color: #fff;
- font-size: 5vmin;
- box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--pop-black);
- transition: all 0.1s;
- }
-
- .cta-icon {
- font-size: 6vmin;
- animation: wiggle 2s infinite;
- }
- /* 交互状态:按下效果 */
- .card-container:active .cta-btn {
- transform: translate(var(--shadow-offset), var(--shadow-offset));
- box-shadow: 0 0 0 var(--pop-black);
- }
- .card-container:active .month-card {
- transform: rotate(2deg) scale(0.98);
- }
- /* 动画定义 */
- @keyframes float {
- 0%, 100% { transform: translateY(0) rotate(0deg); }
- 50% { transform: translateY(-15px) rotate(5deg); }
- }
- @keyframes wiggle {
- 0%, 100% { transform: rotate(-10deg); }
- 50% { transform: rotate(10deg); }
- }
- </style>
- </head>
- <body>
- <div class="card-container" onclick="redirectToDetail()">
- <!-- 装饰背景 -->
- <div class="shape shape-circle"></div>
- <div class="shape shape-rect"></div>
- <!-- 顶部年份 -->
- <div class="top-badge">2025年</div>
- <!-- 中间月份 -->
- <div class="main-content">
- <div class="month-card">
- <div class="month-num">12</div>
- <div class="month-label">月挑战赛</div>
- </div>
- </div>
- <!-- 底部按钮 -->
- <div class="cta-container">
- <div class="cta-btn">
- <i class="fa-solid fa-trophy cta-icon"></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('.top-badge');
- 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');
-
- // Dynamic Target
- 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>
|