| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="https://cdn.tailwindcss.com"></script>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
- <script>
- tailwind.config = {
- theme: {
- extend: {
- colors: {
- primary: '#3372ac',
- }
- }
- }
- }
- </script>
- <style>
- @import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800&display=swap');
- body { font-family: 'Nunito', sans-serif; }
- .no-scrollbar::-webkit-scrollbar { display: none; }
- .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
- .snap-mandatory { scroll-behavior: smooth; }
-
- .dropdown-enter {
- opacity: 0;
- transform: translateY(-10px) scale(0.95);
- }
- .dropdown-enter-active {
- opacity: 1;
- transform: translateY(0) scale(1);
- transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
- }
- </style>
- </head>
- <body class="bg-slate-50 relative pb-24" onclick="closeDropdownOnClickOutside(event)">
- <!-- 1. 顶部 Header -->
- <div class="relative w-full h-[260px]">
- <img src="https://orienteering.beswell.com/card/nanning/cardtop1122-2.jpg"
- class="w-full h-full object-cover shadow-md" alt="Header BG">
- <div class="absolute inset-0 bg-gradient-to-b from-primary/60 via-transparent to-black/5"></div>
- <div class="absolute top-0 w-full pt-10 px-5 flex justify-between items-center z-10 text-white">
- <button class="bg-black/20 backdrop-blur-sm p-2 rounded-full w-9 h-9 flex items-center justify-center active:scale-90 transition">
- <i class="fas fa-chevron-left"></i>
- </button>
- <h1 class="text-lg font-bold tracking-wider shadow-sm">赛事报名</h1>
- <button onclick="openModal()" class="bg-black/20 backdrop-blur-sm px-3 py-1.5 rounded-full text-xs font-semibold flex items-center gap-1 active:scale-90 transition">
- <i class="fas fa-question-circle"></i> 说明
- </button>
- </div>
- </div>
- <!-- 2. 主体内容 -->
- <div class="relative z-20 px-4">
-
- <!-- A. 比赛时间 (字体已放大 text-xs -> text-sm) -->
- <div class="bg-white rounded-full shadow-lg py-2 px-4 -mt-6 mb-5 mx-2 flex items-center justify-between border border-white/60 relative z-30">
- <!-- 这里将 text-xs 改为了 text-sm -->
- <div class="flex items-center gap-2 w-full text-sm overflow-hidden whitespace-nowrap">
- <div class="bg-blue-50 text-primary w-6 h-6 rounded-full flex items-center justify-center shrink-0">
- <i class="fas fa-clock text-xs"></i>
- </div>
- <!-- 删除了 scale-90,保持原大 -->
- <span class="text-gray-400 font-bold uppercase origin-left shrink-0">比赛时间</span>
- <span class="text-gray-300">|</span>
- <span class="font-bold text-gray-800 font-mono truncate">11.28 08:00 - 11.30 18:00</span>
- </div>
- </div>
- <!-- B. 报名表单 -->
- <div class="bg-white rounded-xl shadow-sm p-5 mb-5 space-y-5 relative z-40">
- <!-- 昵称行 -->
- <div class="flex items-center gap-3">
- <label class="w-16 text-sm font-bold text-gray-500 text-right">报名昵称</label>
- <input type="text" id="userName" placeholder="请输入您的昵称"
- class="flex-1 bg-slate-50 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:bg-blue-50 focus:ring-1 focus:ring-primary/50 transition-all text-gray-800 font-bold placeholder-gray-400">
- </div>
- <!-- 战队行 -->
- <div class="flex items-center gap-3 relative">
- <label class="w-16 text-sm font-bold text-gray-500 text-right">选择战队</label>
-
- <div class="relative flex-1 group">
- <button type="button" id="dropdownBtn" onclick="toggleDropdown(event)"
- class="w-full bg-slate-50 rounded-lg px-3 py-2.5 text-sm font-bold text-left flex items-center justify-between focus:outline-none focus:ring-1 focus:ring-primary/50 transition-all active:bg-blue-50">
- <span id="selectedText" class="text-gray-400 font-normal flex items-center">
- 请选择或搜索...
- </span>
- <i class="fas fa-chevron-circle-down text-primary/70 transition-transform duration-300" id="dropdownArrow"></i>
- </button>
- <input type="hidden" id="teamSelect" value="">
- <div id="dropdownMenu" class="hidden absolute top-[110%] left-0 w-full bg-white rounded-xl shadow-2xl border border-gray-100 overflow-hidden origin-top z-50 dropdown-enter">
- <ul class="text-sm text-gray-700 max-h-48 overflow-y-auto no-scrollbar">
- <li onclick="selectOption('飞虎队', '飞虎队')" class="px-4 py-3 hover:bg-blue-50 cursor-pointer flex items-center justify-between border-b border-gray-50 last:border-0 transition-colors group/item">
- <div class="flex items-center">
- <i class="fas fa-user-friends text-blue-200 mr-2 group-hover/item:text-primary transition-colors"></i>
- <span class="font-bold">飞虎队 (兴隆山)</span>
- </div>
- <i class="fas fa-check text-primary opacity-0 check-icon"></i>
- </li>
- <li onclick="selectOption('火箭队', '火箭队')" class="px-4 py-3 hover:bg-blue-50 cursor-pointer flex items-center justify-between border-b border-gray-50 last:border-0 transition-colors group/item">
- <div class="flex items-center">
- <i class="fas fa-user-friends text-blue-200 mr-2 group-hover/item:text-primary transition-colors"></i>
- <span class="font-bold">火箭队 (中心校区)</span>
- </div>
- <i class="fas fa-check text-primary opacity-0 check-icon"></i>
- </li>
- <li onclick="selectOption('摸鱼队', '摸鱼队')" class="px-4 py-3 hover:bg-blue-50 cursor-pointer flex items-center justify-between border-b border-gray-50 last:border-0 transition-colors group/item">
- <div class="flex items-center">
- <i class="fas fa-user-friends text-blue-200 mr-2 group-hover/item:text-primary transition-colors"></i>
- <span class="font-bold">摸鱼队 (快乐组)</span>
- </div>
- <i class="fas fa-check text-primary opacity-0 check-icon"></i>
- </li>
- <li onclick="selectOption('汪汪队', '汪汪队')" class="px-4 py-3 hover:bg-blue-50 cursor-pointer flex items-center justify-between transition-colors group/item">
- <div class="flex items-center">
- <i class="fas fa-user-friends text-blue-200 mr-2 group-hover/item:text-primary transition-colors"></i>
- <span class="font-bold">汪汪队 (教职工)</span>
- </div>
- <i class="fas fa-check text-primary opacity-0 check-icon"></i>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- C. 赛事介绍 -->
- <div class="bg-white rounded-xl shadow-sm p-5 pb-8 relative z-10">
- <h3 class="font-bold text-base text-primary mb-4 flex items-center gap-2">
- <span class="w-1 h-4 bg-primary rounded-full"></span> 赛事介绍
- </h3>
-
- <div class="text-xs text-gray-600 space-y-3 leading-relaxed">
- <p class="font-bold text-sm text-gray-900 border-b border-gray-100 pb-2">
- 南宁学院40周年校庆 (暨「智跑南院」数字定向赛)
- </p>
- <div class="space-y-2">
- <div class="flex flex-col sm:flex-row gap-1">
- <span class="font-bold text-primary shrink-0">一、主办单位 /</span>
- <span class="text-gray-700">共青团南宁学院委员会、教育学院</span>
- </div>
- <div class="flex flex-col sm:flex-row gap-1">
- <span class="font-bold text-primary shrink-0">二、承办单位 /</span>
- <span class="text-gray-700">各二级学院团委</span>
- </div>
- <div class="flex flex-col sm:flex-row gap-1">
- <span class="font-bold text-primary shrink-0">三、协办单位 /</span>
- <span class="text-gray-700">南宁学院学生会、青年志愿者协会、教育学院大学生竞技中心、教育学院大学生运动健康促进中心</span>
- </div>
- <div class="flex flex-col sm:flex-row gap-1">
- <span class="font-bold text-primary shrink-0">四、参赛人员 /</span>
- <span class="text-gray-700">全校在校学生</span>
- </div>
- <div class="flex flex-col sm:flex-row gap-1">
- <span class="font-bold text-primary shrink-0">五、赞助单位 /</span>
- <span class="text-gray-700">一食堂三楼广西桂师傅餐饮管理有限公司</span>
- </div>
- </div>
- <div class="text-right mt-4 pt-2 font-bold text-primary opacity-90">
- 共青团南宁学院委员会
- </div>
- </div>
- </div>
- </div>
- <!-- 底部按钮 -->
- <div class="fixed bottom-0 w-full bg-white px-4 py-3 shadow-[0_-4px_15px_rgba(0,0,0,0.05)] z-50">
- <button onclick="openConfirm()" class="w-full bg-gradient-to-r from-orange-500 to-red-600 text-white font-bold text-lg py-2.5 rounded-full shadow-lg shadow-orange-100 active:scale-[0.98] transition-transform flex items-center justify-center gap-2">
- 立即报名 <i class="fas fa-paper-plane text-sm"></i>
- </button>
- </div>
- <!-- 说明模态框 -->
- <div id="infoModal" class="fixed inset-0 z-50 hidden transition-opacity duration-300">
- <div class="absolute inset-0 bg-slate-900/70 backdrop-blur-sm" onclick="closeModal()"></div>
- <div class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[90%] bg-white rounded-3xl p-6 shadow-2xl">
- <button onclick="closeModal()" class="absolute -top-12 right-0 text-white/80 hover:text-white w-10 h-10 border border-white/30 rounded-full flex items-center justify-center">
- <i class="fas fa-times text-lg"></i>
- </button>
- <h3 class="text-center font-bold text-xl mb-4 text-primary border-b border-gray-100 pb-3">
- <i class="fas fa-book-open mr-2"></i>比赛规则说明
- </h3>
- <div id="modalSlider" class="overflow-x-auto flex snap-x snap-mandatory no-scrollbar space-x-4 pb-2" onscroll="updateDots()">
- <!-- Slides... -->
- <div class="snap-center shrink-0 w-full bg-blue-50 rounded-2xl p-5 text-center border border-blue-100">
- <div class="w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3">
- <i class="fas fa-map-marker-alt text-xl text-primary"></i>
- </div>
- <h4 class="font-bold text-base text-gray-800 mb-1">1. 定向寻宝</h4>
- <p class="text-gray-600 text-xs leading-relaxed">比赛设置12个隐藏打卡点,根据地图指引,规划最佳路线。</p>
- </div>
- <div class="snap-center shrink-0 w-full bg-blue-50 rounded-2xl p-5 text-center border border-blue-100">
- <div class="w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3">
- <i class="fas fa-mobile-alt text-xl text-primary"></i>
- </div>
- <h4 class="font-bold text-base text-gray-800 mb-1">2. 扫码打卡</h4>
- <p class="text-gray-600 text-xs leading-relaxed">到达点位后,使用APP扫描二维码,系统自动记录时间。</p>
- </div>
- <div class="snap-center shrink-0 w-full bg-blue-50 rounded-2xl p-5 text-center border border-blue-100">
- <div class="w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3">
- <i class="fas fa-medal text-xl text-primary"></i>
- </div>
- <h4 class="font-bold text-base text-gray-800 mb-1">3. 完赛奖励</h4>
- <p class="text-gray-600 text-xs leading-relaxed">规定时间内完赛,前50名有精美礼品!加油!</p>
- </div>
- </div>
- <div class="flex justify-center gap-2 mt-4" id="dotsContainer">
- <div class="dot w-6 h-1.5 rounded-full bg-primary transition-all duration-300"></div>
- <div class="dot w-1.5 h-1.5 rounded-full bg-gray-300 transition-all duration-300"></div>
- <div class="dot w-1.5 h-1.5 rounded-full bg-gray-300 transition-all duration-300"></div>
- </div>
- </div>
- </div>
- <!-- 确认模态框 -->
- <div id="confirmModal" class="fixed inset-0 z-50 hidden flex items-center justify-center">
- <div class="absolute inset-0 bg-slate-900/60 backdrop-blur-sm" onclick="closeConfirm()"></div>
- <div class="bg-white w-[80%] rounded-2xl p-6 relative z-10 text-center shadow-xl">
- <div class="w-14 h-14 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
- <i class="fas fa-check text-2xl text-green-600"></i>
- </div>
- <h3 class="font-bold text-lg mb-2 text-gray-800">确认提交报名?</h3>
- <div class="bg-slate-50 rounded-lg p-4 mb-6 text-left border border-slate-100">
- <p class="mb-2"><span class="text-gray-500 text-sm">昵称:</span><span class="font-bold text-gray-800 ml-2" id="confirmName"></span></p>
- <p><span class="text-gray-500 text-sm">战队:</span><span class="font-bold text-primary ml-2" id="confirmTeamText"></span></p>
- </div>
- <div class="flex gap-3">
- <button onclick="closeConfirm()" class="flex-1 py-2.5 rounded-lg border border-gray-200 text-gray-600 font-bold text-sm">再想想</button>
- <button onclick="location.href='#'" class="flex-1 py-2.5 rounded-lg bg-gradient-to-r from-orange-500 to-red-600 text-white font-bold text-sm shadow-md">确认提交</button>
- </div>
- </div>
- </div>
- <script>
- const dropdownMenu = document.getElementById('dropdownMenu');
- const dropdownArrow = document.getElementById('dropdownArrow');
- const selectedText = document.getElementById('selectedText');
- const teamInput = document.getElementById('teamSelect');
- const checkIcons = document.querySelectorAll('.check-icon');
- function toggleDropdown(event) {
- event.stopPropagation();
- const isHidden = dropdownMenu.classList.contains('hidden');
- if (isHidden) {
- dropdownMenu.classList.remove('hidden');
- setTimeout(() => dropdownMenu.classList.add('dropdown-enter-active'), 10);
- dropdownArrow.style.transform = 'rotate(180deg)';
- } else {
- closeDropdown();
- }
- }
- function closeDropdown() {
- dropdownMenu.classList.remove('dropdown-enter-active');
- dropdownArrow.style.transform = 'rotate(0deg)';
- setTimeout(() => dropdownMenu.classList.add('hidden'), 200);
- }
- function selectOption(value, text) {
- teamInput.value = value;
- selectedText.innerHTML = '<i class="fas fa-user-friends text-primary mr-2"></i>' + text;
- selectedText.classList.remove('text-gray-400', 'font-normal');
- selectedText.classList.add('text-gray-800', 'font-bold');
-
- checkIcons.forEach(icon => icon.classList.add('opacity-0'));
- event.currentTarget.querySelector('.check-icon').classList.remove('opacity-0');
- closeDropdown();
- }
- function closeDropdownOnClickOutside(event) {
- if (!dropdownMenu.contains(event.target) && event.target.id !== 'dropdownBtn') {
- closeDropdown();
- }
- }
- function openModal() { document.getElementById('infoModal').classList.remove('hidden'); }
- function closeModal() { document.getElementById('infoModal').classList.add('hidden'); }
-
- function openConfirm() {
- const name = document.getElementById('userName').value || "未填写";
- const team = document.getElementById('teamSelect').value || "";
- const teamDisplay = document.getElementById('selectedText').innerText;
- document.getElementById('confirmName').innerText = name;
- document.getElementById('confirmTeamText').innerText = team === "" ? "未选择" : teamDisplay;
- document.getElementById('confirmModal').classList.remove('hidden');
- }
- function closeConfirm() { document.getElementById('confirmModal').classList.add('hidden'); }
- const slider = document.getElementById('modalSlider');
- const dots = document.querySelectorAll('.dot');
- function updateDots() {
- const index = Math.round(slider.scrollLeft / slider.offsetWidth);
- dots.forEach((dot, i) => {
- if (i === index) {
- dot.classList.remove('w-1.5', 'bg-gray-300');
- dot.classList.add('w-6', 'bg-primary');
- } else {
- dot.classList.remove('w-6', 'bg-primary');
- dot.classList.add('w-1.5', 'bg-gray-300');
- }
- });
- }
- </script>
- </body>
- </html>
|