模板:示例模板A:修订间差异
外观
创建页面,内容为“<includeonly> <div style="border: 3px solid #6a0dad; background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%); padding: 20px; margin: 20px 0; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;"> <div style="text-align: center; margin-bottom: 20px;"> <h1 style="color: #6a0dad; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">🎨 示例模板A 🎨</h1> <p style="font-style: italic; color…” |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
<includeonly> | <includeonly> | ||
<div style=" | <!-- 主容器 --> | ||
< | <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);">MediaWiki 技术全景展示</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> | ||
<div style="display: flex; flex-wrap: wrap; | <!-- 主要内容区 --> | ||
<!-- | <div style="display: flex; flex-wrap: wrap; margin: 0 -10px;"> | ||
<div style="flex: 1; min-width: | |||
<h2 style="color: # | <!-- 左侧:Wikitext 展示 --> | ||
<p>'''这是粗体文本'''</p> | <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> | |||
<p>[[ | |||
<div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> | |||
<h3>文本格式化</h3> | |||
<p> | <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 style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> | |||
<h3>列表与结构</h3> | |||
<div style="display: flex;"> | |||
<div style="flex: 1;"> | |||
<p>无序列表:</p> | |||
<ul> | |||
<li>第一项</li> | |||
<li>第二项</li> | |||
<li>第三项</li> | |||
</ul> | |||
</div> | |||
<div style="flex: 1;"> | |||
<p>有序列表:</p> | |||
<ol> | |||
<li>第一项</li> | |||
<li>第二项</li> | |||
<li>第三项</li> | |||
</ol> | |||
</div> | |||
</div> | |||
<p>== 二级标题 ==</p> | |||
<p>=== 三级标题 ===</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> | |||
<p style="background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: bold; font-size: 1.5em;">彩虹渐变文字效果</p> | |||
</div> | |||
<div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> | |||
<h3>CSS动画与变换</h3> | |||
<div style="display: flex; justify-content: space-around; flex-wrap: wrap;"> | |||
<div style="width: 100px; height: 100px; background: #007bff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; margin: 10px; transition: all 0.3s;" onmouseover="this.style.transform='scale(1.2)'; this.style.background='#0056b3'" onmouseout="this.style.transform='scale(1)'; this.style.background='#007bff'">悬停效果</div> | |||
<div style="width: 100px; height: 100px; background: #6f42c1; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; margin: 10px; animation: pulse 2s infinite;"> | |||
<style> | |||
@keyframes pulse { | |||
0% { transform: scale(1); } | |||
50% { transform: scale(1.1); } | |||
100% { transform: scale(1); } | |||
} | |||
</style> | |||
脉动动画 | |||
</div> | |||
</div> | |||
</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 style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> | |||
<h3>高级表单元素</h3> | |||
<div style="background: #e9ecef; padding: 15px; border-radius: 8px;"> | |||
<label for="demo-range">范围滑块:</label> | |||
<input type="range" id="demo-range" min="0" max="100" style="width: 100%;"> | |||
<label for="demo-color" style="display: block; margin-top: 15px;">颜色选择器:</label> | |||
<input type="color" id="demo-color" value="#ff0000" style="width: 100%; height: 40px;"> | |||
</div> | |||
</div> | |||
</div> | </div> | ||
<!-- | <!-- 右侧:解析器函数展示 --> | ||
<div style="flex: 1; min-width: | <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: # | <h2 style="color: #ffc107; border-bottom: 2px solid #ffc107; padding-bottom: 10px;">解析器函数技术展示</h2> | ||
<p><b> | |||
<div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> | |||
<h3>条件逻辑</h3> | |||
< | <p>参数1: <b>{{{1|未提供}}}</b></p> | ||
< | <p>参数2: <b>{{{2|未提供}}}</b></p> | ||
</ | |||
<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 style="background: #f8f9fa; padding: 10px; border-radius: 5px; margin: 10px 0;"> | |||
{{#ifeq: {{{1|}}} | {{{2|}}} | |||
| ✅ <span style="color: #28a745;">参数1和参数2相同</span> | |||
| ❌ <span style="color: #dc3545;">参数1和参数2不同</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> | |||
<p>√49 = <b>{{#expr: sqrt(49) }}</b></p> | |||
<p>sin(π/2) = <b>{{#expr: sin(3.141592653589793/2) round 3 }}</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> | |||
<p>字符串长度 "MediaWiki": <b>{{#len: MediaWiki}}</b></p> | |||
<p>字符串位置 "ia"在"MediaWiki"中: <b>{{#pos: MediaWiki|ia}}</b></p> | |||
</div> | |||
<div style="background: white; padding: 15px; border-radius: 8px; margin: 15px 0;"> | |||
<h3>Switch语句</h3> | |||
<p>参数3: <b>{{{3|未提供}}}</b></p> | |||
<div style="background: #f8f9fa; padding: 10px; border-radius: 5px; margin: 10px 0;"> | |||
{{#switch: {{{3|default}}} | |||
| red = <span style="color: white; background: #dc3545; padding: 5px 10px; border-radius: 5px;">红色主题</span> | |||
| blue = <span style="color: white; background: #007bff; padding: 5px 10px; border-radius: 5px;">蓝色主题</span> | |||
| green = <span style="color: white; background: #28a745; padding: 5px 10px; border-radius: 5px;">绿色主题</span> | |||
| #default = <span style="background: #6c757d; color: white; padding: 5px 10px; border-radius: 5px;">默认主题</span> | |||
}} | |||
</div> | |||
</div> | |||
</div> | </div> | ||
</div> | </div> | ||
<div style=" | <!-- 底部信息区 --> | ||
< | <div style="background: #343a40; color: white; padding: 20px; border-radius: 0 0 15px 15px; margin-top: 20px; text-align: center;"> | ||
<div style="flex | <h3>技术统计</h3> | ||
< | <div style="display: flex; justify-content: space-around; flex-wrap: wrap;"> | ||
<div style="margin: 10px;"> | |||
<div style="font-size: 2em; font-weight: bold;">{{#len: {{FULLPAGENAME}}}}</div> | |||
<div>页面名称长度</div> | |||
</div> | </div> | ||
< | <div style="margin: 10px;"> | ||
<div style="font-size: 2em; font-weight: bold;">{{#expr: ({{CURRENTHOUR}}*60 + {{CURRENTMINUTE}})/1}}</div> | |||
<div>今日已过分钟数</div> | |||
</div> | </div> | ||
<div style=" | <div style="margin: 10px;"> | ||
<div style="font-size: 2em; font-weight: bold;">{{#time: z}}</div> | |||
<div>年内第几天</div> | |||
</div> | </div> | ||
</div> | </div> | ||
<div style="margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;"> | |||
<div style=" | <p>本模板展示了MediaWiki平台的核心技术能力,包括:</p> | ||
<div style="display: flex; justify-content: center; flex-wrap: wrap;"> | |||
<p> | <span style="background: rgba(255,255,255,0.1); padding: 5px 15px; border-radius: 20px; margin: 5px;">Wikitext</span> | ||
< | <span style="background: rgba(255,255,255,0.1); padding: 5px 15px; border-radius: 20px; margin: 5px;">HTML5</span> | ||
<span style="background: rgba(255,255,255,0.1); padding: 5px 15px; border-radius: 20px; margin: 5px;">CSS3</span> | |||
<span style="background: rgba(255,255,255,0.1); padding: 5px 15px; border-radius: 20px; margin: 5px;">解析器函数</span> | |||
<span style="background: rgba(255,255,255,0.1); padding: 5px 15px; border-radius: 20px; margin: 5px;">响应式设计</span> | |||
</div> | |||
</ | |||
</div> | </div> | ||
</div> | </div> | ||
< | <!-- 响应式设计媒体查询 --> | ||
<style> | |||
@media (max-width: 768px) { | |||
.mw-tech-showcase { | |||
margin: 10px; | |||
} | |||
.tech-section { | |||
min-width: 100% !important; | |||
} | |||
} | |||
</ | </style> | ||
</div> | </div> | ||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> | ||
== | == MediaWiki技术展示模板 == | ||
这是一个展示MediaWiki所有核心技术的综合性演示模板。 | |||
=== | === 使用方法 === | ||
<pre> | <pre> | ||
{{ | {{MediaWiki技术展示}} | ||
{{ | {{MediaWiki技术展示|参数1|参数2|red}} | ||
</pre> | </pre> | ||
=== | === 参数说明 === | ||
; 参数1 | ; 参数1 | ||
: 任意文本 - | : 任意文本 - 用于演示条件判断和参数使用 | ||
; 参数2 | ; 参数2 | ||
: 任意文本 - | : 任意文本 - 用于演示比较和条件判断 | ||
; 参数3 | ; 参数3 | ||
: 可选值: red, blue, green - | : 可选值: red, blue, green - 用于演示switch函数和主题切换 | ||
=== 技术特性 === | |||
此模板展示了以下MediaWiki技术: | |||
* Wikitext标记语言 | |||
* HTML5语义化标签 | |||
* CSS3样式和动画 | |||
* 解析器函数和逻辑操作 | |||
* 响应式网页设计 | |||
* 魔术字和变量使用 | |||
[[Category:演示模板]] | [[Category:演示模板]] | ||
[[Category:技术模板]] | [[Category:技术模板]] | ||
[[Category:多功能模板]] | |||
</noinclude> | </noinclude> | ||
2025年8月21日 (四) 13:35的版本
MediaWiki技术展示模板
这是一个展示MediaWiki所有核心技术的综合性演示模板。
使用方法
{{MediaWiki技术展示}}
{{MediaWiki技术展示|参数1|参数2|red}}
参数说明
- 参数1
- 任意文本 - 用于演示条件判断和参数使用
- 参数2
- 任意文本 - 用于演示比较和条件判断
- 参数3
- 可选值: red, blue, green - 用于演示switch函数和主题切换
技术特性
此模板展示了以下MediaWiki技术:
- Wikitext标记语言
- HTML5语义化标签
- CSS3样式和动画
- 解析器函数和逻辑操作
- 响应式网页设计
- 魔术字和变量使用