跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
osm&bio
搜索
搜索
外观
创建账号
登录
个人工具
创建账号
登录
查看“︁模板:生物联赛倒计时”︁的源代码
模板
讨论
大陆简体
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
页面信息
外观
移至侧栏
隐藏
←
模板:生物联赛倒计时
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
<includeonly> <!-- 主容器 --> <div style="font-family: 'Segoe UI', system-ui, sans-serif; max-width: 500px; margin: 20px auto; text-align: center; background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: white; padding: 25px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1);"> <!-- 标题 --> <h1 style="margin: 0 0 15px; font-size: 1.8em; text-shadow: 1px 1px 3px rgba(0,0,0,0.2);">全国生物学竞赛倒计时</h1> <p style="margin: 0 0 20px; opacity: 0.9;">每年的五月第二个星期日</p> <!-- 倒计时显示 --> <div style="background: rgba(255,255,255,0.15); padding: 15px; border-radius: 10px; backdrop-filter: blur(5px);"> <div style="font-size: 0.9em; margin-bottom: 10px; opacity: 0.8;">距离{{#switch: {{CURRENTYEAR}} {{#ifexpr: {{#time: n}} > 5 or ({{#time: n}} = 5 and {{#time: j}} > {{#switch: {{CURRENTYEAR}} |2024=12 |2025=11 |2026=10 |2027=9 |2028=14 |2029=13 |2030=12 |#default=12 }})}} |{{#expr: {{CURRENTYEAR}} + 1}} |{{CURRENTYEAR}} {{/ifexpr}}}}年联赛还有</div> <div style="font-size: 2.5em; font-weight: bold; margin: 10px 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.3);"> {{#switch: {{CURRENTYEAR}} {{#ifexpr: {{#time: n}} > 5 or ({{#time: n}} = 5 and {{#time: j}} > {{#switch: {{CURRENTYEAR}} |2024=12 |2025=11 |2026=10 |2027=9 |2028=14 |2029=13 |2030=12 |#default=12 }})}} |{{Countdown|{{#switch: {{#expr: {{CURRENTYEAR}} + 1}} |2024=2024-05-12 |2025=2025-05-11 |2026=2026-05-10 |2027=2027-05-09 |2028=2028-05-14 |2029=2029-05-13 |2030=2030-05-12 |#default=2030-05-12 }}|text=天}} |{{Countdown|{{#switch: {{CURRENTYEAR}} |2024=2024-05-12 |2025=2025-05-11 |2026=2026-05-10 |2027=2027-05-09 |2028=2028-05-14 |2029=2029-05-13 |2030=2030-05-12 |#default=2030-05-12 }}|text=天}} {{/ifexpr}} </div> <div style="font-size: 0.9em; opacity: 0.8;"> {{#switch: {{CURRENTYEAR}} {{#ifexpr: {{#time: n}} > 5 or ({{#time: n}} = 5 and {{#time: j}} > {{#switch: {{CURRENTYEAR}} |2024=12 |2025=11 |2026=10 |2027=9 |2028=14 |2029=13 |2030=12 |#default=12 }})}} |比赛日期: {{#switch: {{#expr: {{CURRENTYEAR}} + 1}} |2024=2024年5月12日 |2025=2025年5月11日 |2026=2026年5月10日 |2027=2027年5月9日 |2028=2028年5月14日 |2029=2029年5月13日 |2030=2030年5月12日 |#default=2030年5月12日 }} |比赛日期: {{#switch: {{CURRENTYEAR}} |2024=2024年5月12日 |2025=2025年5月11日 |2026=2026年5月10日 |2027=2027年5月9日 |2028=2028年5月14日 |2029=2029年5月13日 |2030=2030年5月12日 |#default=2030年5月12日 }} {{/ifexpr}} </div> </div> <!-- 装饰元素 --> <div style="margin-top: 20px; display: flex; justify-content: center; gap: 8px;"> <span style="display: inline-block; width: 12px; height: 12px; background: rgba(255,255,255,0.5); border-radius: 50%;"></span> <span style="display: inline-block; width: 12px; height: 12px; background: rgba(255,255,255,0.5); border-radius: 50%;"></span> <span style="display: inline-block; width: 12px; height: 12px; background: rgba(255,255,255,0.5); border-radius: 50%;"></span> </div> </div> </includeonly> <noinclude> == 全国生物学竞赛倒计时模板 == 这是一个显示全国生物学竞赛倒计时的模板,比赛日期为每年的五月第二个星期日。 === 使用方法 === 只需在任意页面插入以下代码: <pre> {{全国生物学竞赛倒计时}} </pre> === 功能特点 === * 使用查表法预计算2024-2030年的比赛日期 * 自动判断今年是否已过比赛日期,显示下一年的比赛 * 使用现有的Countdown模板显示天数 * 美观的UI设计 === 维护说明 === 本模板内置了2024年至2030年的比赛日期,2030年之后需要更新模板。 [[Category:倒计时模板]] [[Category:教育模板]] </noinclude>
该页面嵌入的页面:
模板:Documentation
(
查看源代码
)(受保护)
模板:Documentation/docname
(
查看源代码
)
返回
模板:生物联赛倒计时
。
搜索
搜索
查看“︁模板:生物联赛倒计时”︁的源代码
添加话题