跳到正文
编写
登录

模板:底部导航条:修订间差异

更多
Musicraft​(留言 | 贡献)
创建页面,内容为“<div style="background:{{{bgcolor|#1a1a1a}}};border-top:1px solid {{{border_color|#333}}};padding:{{{padding|25px}}};text-align:center;font-family:Consolas,monospace;font-size:{{{font_size|0.9rem}}};">{{#if:{{{href1|}}}|[{{{href1|}}} <span style="color:{{{color1|#888}}};margin:0 15px;cursor:pointer;">[{{{text1|Link}}}]</span>]|{{#if:{{{page1|}}}|[[{{{page1|}}}|<span style="color:{{{color1|#888}}};margin:0 15px;cursor:pointer;">[{{{text1|{{{page1}}}}}}]</span>]]…”
 
迷雾样式迁移​(留言 | 贡献)
按新大纲重组编写指南、三类标准页与全模板说明;修复可选信息行结构
 
(未显示2个用户的2个中间版本)
第1行: 第1行:
<div style="background:{{{bgcolor|#1a1a1a}}};border-top:1px solid {{{border_color|#333}}};padding:{{{padding|25px}}};text-align:center;font-family:Consolas,monospace;font-size:{{{font_size|0.9rem}}};">{{#if:{{{href1|}}}|[{{{href1|}}} <span style="color:{{{color1|#888}}};margin:0 15px;cursor:pointer;">[{{{text1|Link}}}]</span>]|{{#if:{{{page1|}}}|[[{{{page1|}}}|<span style="color:{{{color1|#888}}};margin:0 15px;cursor:pointer;">[{{{text1|{{{page1}}}}}}]</span>]]}}}} {{#if:{{{href2|}}}|[{{{href2|}}} <span style="color:{{{color2|#888}}};margin:0 15px;cursor:pointer;">[{{{text2|Link}}}]</span>]|{{#if:{{{page2|}}}|[[{{{page2|}}}|<span style="color:{{{color2|#888}}};margin:0 15px;cursor:pointer;">[{{{text2|{{{page2}}}}}}]</span>]]}}}} {{#if:{{{href3|}}}|[{{{href3|}}} <span style="color:{{{color3|#888}}};margin:0 15px;cursor:pointer;">[{{{text3|Link}}}]</span>]|{{#if:{{{page3|}}}|[[{{{page3|}}}|<span style="color:{{{color3|#888}}};margin:0 15px;cursor:pointer;">[{{{text3|{{{page3}}}}}}]</span>]]}}}} {{#if:{{{href4|}}}|[{{{href4|}}} <span style="color:{{{color4|#888}}};margin:0 15px;cursor:pointer;">[{{{text4|Link}}}]</span>]|{{#if:{{{page4|}}}|[[{{{page4|}}}|<span style="color:{{{color4|#888}}};margin:0 15px;cursor:pointer;">[{{{text4|{{{page4}}}}}}]</span>]]}}}} {{#if:{{{href5|}}}|[{{{href5|}}} <span style="color:{{{color5|#888}}};margin:0 15px;cursor:pointer;">[{{{text5|Link}}}]</span>]|{{#if:{{{page5|}}}|[[{{{page5|}}}|<span style="color:{{{color5|#888}}};margin:0 15px;cursor:pointer;">[{{{text5|{{{page5}}}}}}]</span>]]}}}} {{#if:{{{href6|}}}|[{{{href6|}}} <span style="color:{{{color6|#888}}};margin:0 15px;cursor:pointer;">[{{{text6|Link}}}]</span>]|{{#if:{{{page6|}}}|[[{{{page6|}}}|<span style="color:{{{color6|#888}}};margin:0 15px;cursor:pointer;">[{{{text6|{{{page6}}}}}}]</span>]]}}}} {{#if:{{{href7|}}}|[{{{href7|}}} <span style="color:{{{color7|#888}}};margin:0 15px;cursor:pointer;">[{{{text7|Link}}}]</span>]|{{#if:{{{page7|}}}|[[{{{page7|}}}|<span style="color:{{{color7|#888}}};margin:0 15px;cursor:pointer;">[{{{text7|{{{page7}}}}}}]</span>]]}}}} {{#if:{{{href8|}}}|[{{{href8|}}} <span style="color:{{{color8|#888}}};margin:0 15px;cursor:pointer;">[{{{text8|Link}}}]</span>]|{{#if:{{{page8|}}}|[[{{{page8|}}}|<span style="color:{{{color8|#888}}};margin:0 15px;cursor:pointer;">[{{{text8|{{{page8}}}}}}]</span>]]}}}}
<includeonly><div class="mc-reading-nav">{{#if:{{{text1|}}}|<span>{{#if:{{{href1|}}}|[{{{href1}}} {{{text1}}}]|[[{{{page1|首页}}}|{{{text1}}}]]}}</span>}}{{#if:{{{text2|}}}|<span>{{#if:{{{href2|}}}|[{{{href2}}} {{{text2}}}]|[[{{{page2|首页}}}|{{{text2}}}]]}}</span>}}{{#if:{{{text3|}}}|<span>{{#if:{{{href3|}}}|[{{{href3}}} {{{text3}}}]|[[{{{page3|首页}}}|{{{text3}}}]]}}</span>}}{{#if:{{{text4|}}}|<span>{{#if:{{{href4|}}}|[{{{href4}}} {{{text4}}}]|[[{{{page4|首页}}}|{{{text4}}}]]}}</span>}}{{#if:{{{text5|}}}|<span>{{#if:{{{href5|}}}|[{{{href5}}} {{{text5}}}]|[[{{{page5|首页}}}|{{{text5}}}]]}}</span>}}{{#if:{{{text6|}}}|<span>{{#if:{{{href6|}}}|[{{{href6}}} {{{text6}}}]|[[{{{page6|首页}}}|{{{text6}}}]]}}</span>}}{{#if:{{{text7|}}}|<span>{{#if:{{{href7|}}}|[{{{href7}}} {{{text7}}}]|[[{{{page7|首页}}}|{{{text7}}}]]}}</span>}}{{#if:{{{text8|}}}|<span>{{#if:{{{href8|}}}|[{{{href8}}} {{{text8}}}]|[[{{{page8|首页}}}|{{{text8}}}]]}}</span>}}</div></includeonly><noinclude>
最多八组底部入口;每组使用 text、page 或 href 加数字编号。
 
在可视化编辑器中选择“插入 → 模板”,搜索 <code>底部导航条</code>。源代码编辑器中复制下方调用,按参数名填写;不需要写“模板:”前缀。
 
== 效果 ==
<div class="mc-example-preview">
{{底部导航条|text1=首页|page1=首页|text2=ARG 档案|page2=ARG档案}}
</div>
</div>
<noinclude>
== 使用说明 ==
底部导航条模板,支持 1~8 个导航项,每项可使用内链或外链。


=== 参数一览 ===
== 源代码 ==
<div class="mc-example-source"><pre>{{底部导航条|text1=首页|page1=首页|text2=ARG 档案|page2=ARG档案}}</pre></div>
 
== 参数 ==
{| class="wikitable"
{| class="wikitable"
! 参数 !! 默认值 !! 说明
! 参数名 !! 用法
|-
| <code>text1</code> || 第 1 个入口的显示文字。
|-
| <code>href1</code> || 第 1 个入口的外部网址。
|-
| <code>page1</code> || 第 1 个入口的站内页面名。
|-
| <code>text2</code> || 第 2 个入口的显示文字。
|-
| <code>href2</code> || 第 2 个入口的外部网址。
|-
| <code>page2</code> || 第 2 个入口的站内页面名。
|-
| <code>text3</code> || 第 3 个入口的显示文字。
|-
| <code>href3</code> || 第 3 个入口的外部网址。
|-
| <code>page3</code> || 第 3 个入口的站内页面名。
|-
| <code>text4</code> || 第 4 个入口的显示文字。
|-
| <code>href4</code> || 第 4 个入口的外部网址。
|-
| <code>page4</code> || 第 4 个入口的站内页面名。
|-
| <code>text5</code> || 第 5 个入口的显示文字。
|-
| <code>href5</code> || 第 5 个入口的外部网址。
|-
| <code>page5</code> || 第 5 个入口的站内页面名。
|-
| <code>text6</code> || 第 6 个入口的显示文字。
|-
|-
| <code>bgcolor</code> || <code>#1a1a1a</code> || 背景色
| <code>href6</code> || 第 6 个入口的外部网址。
|-
|-
| <code>border_color</code> || <code>#333</code> || 顶部边框颜色
| <code>page6</code> || 第 6 个入口的站内页面名。
|-
|-
| <code>padding</code> || <code>25px</code> || 内边距
| <code>text7</code> || 第 7 个入口的显示文字。
|-
|-
| <code>font_size</code> || <code>0.9rem</code> || 字体大小
| <code>href7</code> || 第 7 个入口的外部网址。
|-
|-
| <code>pageN</code> || — || 第N 项的内链页面名称
| <code>page7</code> || 第 7 个入口的站内页面名。
|-
|-
| <code>hrefN</code> || — || 第 N 项的外链 URL(优先级高于 pageN)
| <code>text8</code> || 第 8 个入口的显示文字。
|-
|-
| <code>textN</code> || 页面名/ Link || 第 N 项的显示文字
| <code>href8</code> || 第 8 个入口的外部网址。
|-
|-
| <code>colorN</code> || <code>#888</code> || 第 N 项的文字颜色
| <code>page8</code> || 第 8 个入口的站内页面名。
|}
|}


=== 完整示例 ===
[[模板说明#底部导航条|全部模板说明]] · [[编写指南]]
<pre>
<templatedata>
{{DarkNav
{
|page1 = Puzzle档案  |text1 = PUZZLE档案
  "description": "最多八组底部入口;每组使用 text、page 或 href 加数字编号。",
|page2 = 工具和科普  |text2 = 工具科普
  "format": "block",
|page3 = 编辑守则    |text3 = 编辑守则
  "params": {
|page4 = 首页        |text4 = 返回首页   |color4 = #fff
    "text1": {
}}
      "label": "text1",
</pre>
      "type": "content",
      "description": "第 1 个入口的显示文字。"
    },
    "href1": {
      "label": "href1",
      "type": "content",
      "description": "第 1 个入口的外部网址。"
    },
    "page1": {
      "label": "page1",
      "type": "content",
      "description": "第 1 个入口的站内页面名。"
    },
    "text2": {
      "label": "text2",
      "type": "content",
      "description": "第 2 个入口的显示文字。"
    },
    "href2": {
      "label": "href2",
      "type": "content",
      "description": "第 2 个入口的外部网址。"
    },
    "page2": {
      "label": "page2",
      "type": "content",
      "description": "第 2 个入口的站内页面名。"
    },
    "text3": {
      "label": "text3",
      "type": "content",
      "description": "第 3 个入口的显示文字。"
    },
    "href3": {
      "label": "href3",
      "type": "content",
      "description": "第 3 个入口的外部网址。"
    },
    "page3": {
      "label": "page3",
      "type": "content",
      "description": "第 3 个入口的站内页面名。"
    },
    "text4": {
      "label": "text4",
      "type": "content",
      "description": "第 4 个入口的显示文字。"
    },
    "href4": {
      "label": "href4",
      "type": "content",
      "description": "第 4 个入口的外部网址。"
    },
    "page4": {
      "label": "page4",
      "type": "content",
      "description": "第 4 个入口的站内页面名。"
    },
    "text5": {
      "label": "text5",
      "type": "content",
      "description": "第 5 个入口的显示文字。"
    },
    "href5": {
      "label": "href5",
      "type": "content",
      "description": "第 5 个入口的外部网址。"
    },
    "page5": {
      "label": "page5",
      "type": "content",
      "description": "第 5 个入口的站内页面名。"
    },
    "text6": {
      "label": "text6",
      "type": "content",
      "description": "第 6 个入口的显示文字。"
    },
    "href6": {
      "label": "href6",
      "type": "content",
      "description": "第 6 个入口的外部网址。"
    },
    "page6": {
      "label": "page6",
      "type": "content",
      "description": "第 6 个入口的站内页面名。"
    },
    "text7": {
      "label": "text7",
      "type": "content",
      "description": "第 7 个入口的显示文字。"
    },
    "href7": {
      "label": "href7",
      "type": "content",
      "description": "第 7 个入口的外部网址。"
    },
    "page7": {
      "label": "page7",
      "type": "content",
      "description": "第 7 个入口的站内页面名。"
    },
    "text8": {
      "label": "text8",
      "type": "content",
      "description": "第 8 个入口的显示文字。"
    },
    "href8": {
      "label": "href8",
      "type": "content",
      "description": "第 8 个入口的外部网址。"
    },
    "page8": {
      "label": "page8",
      "type": "content",
      "description": "第 8 个入口的站内页面名。"
    }
  },
  "paramOrder": [
    "text1",
    "href1",
    "page1",
    "text2",
    "href2",
    "page2",
    "text3",
    "href3",
    "page3",
    "text4",
    "href4",
    "page4",
    "text5",
    "href5",
    "page5",
    "text6",
    "href6",
    "page6",
    "text7",
    "href7",
    "page7",
    "text8",
    "href8",
    "page8"
   ]
}
</templatedata>
</noinclude>
</noinclude>

2026年10月13日 (二) 15:57的最新版本

最多八组底部入口;每组使用 text、page 或 href 加数字编号。

在可视化编辑器中选择“插入 → 模板”,搜索 底部导航条。源代码编辑器中复制下方调用,按参数名填写;不需要写“模板:”前缀。

效果

源代码

{{底部导航条|text1=首页|page1=首页|text2=ARG 档案|page2=ARG档案}}

参数

参数名 用法
text1 第 1 个入口的显示文字。
href1 第 1 个入口的外部网址。
page1 第 1 个入口的站内页面名。
text2 第 2 个入口的显示文字。
href2 第 2 个入口的外部网址。
page2 第 2 个入口的站内页面名。
text3 第 3 个入口的显示文字。
href3 第 3 个入口的外部网址。
page3 第 3 个入口的站内页面名。
text4 第 4 个入口的显示文字。
href4 第 4 个入口的外部网址。
page4 第 4 个入口的站内页面名。
text5 第 5 个入口的显示文字。
href5 第 5 个入口的外部网址。
page5 第 5 个入口的站内页面名。
text6 第 6 个入口的显示文字。
href6 第 6 个入口的外部网址。
page6 第 6 个入口的站内页面名。
text7 第 7 个入口的显示文字。
href7 第 7 个入口的外部网址。
page7 第 7 个入口的站内页面名。
text8 第 8 个入口的显示文字。
href8 第 8 个入口的外部网址。
page8 第 8 个入口的站内页面名。

全部模板说明 · 编写指南

最多八组底部入口;每组使用 text、page 或 href 加数字编号。

模板参数[编辑模板数据]

此模板首选参数换行的代码块格式。

参数描述类型状态
text1text1

第 1 个入口的显示文字。

内容可选
href1href1

第 1 个入口的外部网址。

内容可选
page1page1

第 1 个入口的站内页面名。

内容可选
text2text2

第 2 个入口的显示文字。

内容可选
href2href2

第 2 个入口的外部网址。

内容可选
page2page2

第 2 个入口的站内页面名。

内容可选
text3text3

第 3 个入口的显示文字。

内容可选
href3href3

第 3 个入口的外部网址。

内容可选
page3page3

第 3 个入口的站内页面名。

内容可选
text4text4

第 4 个入口的显示文字。

内容可选
href4href4

第 4 个入口的外部网址。

内容可选
page4page4

第 4 个入口的站内页面名。

内容可选
text5text5

第 5 个入口的显示文字。

内容可选
href5href5

第 5 个入口的外部网址。

内容可选
page5page5

第 5 个入口的站内页面名。

内容可选
text6text6

第 6 个入口的显示文字。

内容可选
href6href6

第 6 个入口的外部网址。

内容可选
page6page6

第 6 个入口的站内页面名。

内容可选
text7text7

第 7 个入口的显示文字。

内容可选
href7href7

第 7 个入口的外部网址。

内容可选
page7page7

第 7 个入口的站内页面名。

内容可选
text8text8

第 8 个入口的显示文字。

内容可选
href8href8

第 8 个入口的外部网址。

内容可选
page8page8

第 8 个入口的站内页面名。

内容可选
迷雾 Wiki
搜索迷雾 Wiki
阅读设置