跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
osm&bio
搜索
搜索
外观
创建账号
登录
个人工具
创建账号
登录
查看“︁模板:示例模板A”︁的源代码
模板
讨论
大陆简体
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
页面信息
外观
移至侧栏
隐藏
←
模板:示例模板A
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
<includeonly> <!-- 主容器 --> <div class="mw-tech-showcase" style="font-family: 'Segoe UI', system-ui, sans-serif; max-width: 1200px; margin: 20px auto;"> <!-- 顶部标题区 --> <div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; border-radius: 15px 15px 0 0; text-align: center; box-shadow: 0 5px 20px rgba(0,0,0,0.15);"> <h1 style="margin: 0; font-size: 2.5em; text-shadow: 2px 2px 4px rgba(0,0,0,0.3);">示例模板A</h1> <p style="font-size: 1.2em; opacity: 0.9;">支持Wikitext、HTML、CSS</p> <div style="margin-top: 15px;"> <span style="background: rgba(255,255,255,0.2); padding: 5px 15px; border-radius: 20px; margin: 0 5px;">{{CURRENTYEAR}}年{{CURRENTMONTH}}月{{CURRENTDAY}}日</span> <span style="background: rgba(255,255,255,0.2); padding: 5px 15px; border-radius: 20px; margin: 0 5px;">{{SITENAME}}</span> <span style="background: rgba(255,255,255,0.2); padding: 5px 15px; border-radius: 20px; margin: 0 5px;">{{PAGENAME}}</span> </div> </div> <!-- 主要内容区 --> <div style="display: flex; flex-wrap: wrap; margin: 0 -10px;"> <!-- 左侧:Wikitext --> <div class="tech-section" style="flex: 1; min-width: 300px; padding: 20px; margin: 10px; background: #f8f9fa; border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,0.08);"> <h2 style="color: #28a745; border-bottom: 2px solid #28a745; padding-bottom: 10px;">Wikitext </h2> <div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> <h3>文本格式化</h3> <p>'''这是粗体文本''' → <strong>这是粗体文本</strong></p> <p>''这是斜体文本'' → <em>这是斜体文本</em></p> <p>'''''这是粗斜体''''' → <strong><em>这是粗斜体</em></strong></p> <p><nowiki>这是等宽字体</nowiki> → <code>这是等宽字体</code></p> </div> <div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> <h3>链接功能</h3> <p>[[Osm使用手册]] → [[Osm使用手册]]</p> <p>[[Osm使用手册|自定义链接文本]] → [[Osm使用手册|自定义链接文本]]</p> <p>[https://www.example.com 外部链接] → [https://www.example.com 外部链接]</p> <p>[[Special:RecentChanges]] → [[Special:RecentChanges]]</p> </div> </div> <!-- 中间:HTML/CSS --> <div class="tech-section" style="flex: 1; min-width: 300px; padding: 20px; margin: 10px; background: #f8f9fa; border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,0.08);"> <h2 style="color: #dc3545; border-bottom: 2px solid #dc3545; padding-bottom: 10px;">HTML & CSS</h2> <div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> <h3>高级排版</h3> <p style="font-family: 'Georgia', serif; font-size: 1.2em;">这是使用自定义字体的文本</p> <p style="text-shadow: 2px 2px 4px rgba(0,0,0,0.3); color: #6f42c1; font-weight: bold;">带有阴影的文本效果</p> </div> <div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> <h3>Flexbox布局</h3> <div style="display: flex; flex-wrap: wrap; justify-content: space-between;"> <div style="flex: 1; min-width: 120px; background: #17a2b8; color: white; padding: 10px; margin: 5px; text-align: center;">Flex项 1</div> <div style="flex: 1; min-width: 120px; background: #17a2b8; color: white; padding: 10px; margin: 5px; text-align: center;">Flex项 2</div> <div style="flex: 1; min-width: 120px; background: #17a2b8; color: white; padding: 10px; margin: 5px; text-align: center;">Flex项 3</div> </div> </div> </div> <!-- 右侧:解析器函数展示 --> <div class="tech-section" style="flex: 1; min-width: 300px; padding: 20px; margin: 10px; background: #f8f9fa; border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,0.08);"> <h2 style="color: #ffc107; border-bottom: 2px solid #ffc107; padding-bottom: 10px;">解析器函数技术展示</h2> <div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> <h3>条件逻辑</h3> <p>参数1: <b>{{{1|未提供}}}</b></p> <div style="background: #f8f9fa; padding: 10px; border-radius: 5px; margin: 10px 0;"> {{#if: {{{1|}}} | ✅ <span style="color: #28a745;">已提供参数1: "{{{1}}}"</span> | ❌ <span style="color: #dc3545;">未提供参数1</span> }} </div> </div> <div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> <h3>数学计算</h3> <p>15 × 3 + 7 = <b>{{#expr: 15*3+7 }}</b></p> <p>2<sup>10</sup> = <b>{{#expr: 2^10 }}</b></p> </div> <div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> <h3>时间函数</h3> <p>当前时间: <b>{{#time: Y年m月d日 H:i:s }}</b></p> </div> </div> </div> <!-- 底部信息 --> <div style="margin-top: 20px; padding: 20px; background: #f8f9fa; border-radius: 0 0 15px 15px; text-align: center;"> <p>本模板展示了MediaWiki平台的核心技术能力</p> </div> </div> </includeonly> <noinclude> == 示例模板A - 技术展示 == 这是一个展示MediaWiki核心技术的演示模板。 === 使用方法 === <pre> {{示例模板A}} {{示例模板A|参数1}} </pre> === 参数说明 === ; 参数1 : 任意文本 - 用于演示条件判断和参数使用 [[Category:演示模板]] </noinclude>
返回
模板:示例模板A
。
搜索
搜索
查看“︁模板:示例模板A”︁的源代码
添加话题