“模板:Main page/railway”与“模板:Tag/doc”:页面之间的差异

来自NebulaeWiki
(页面间差异)
无编辑摘要
标签已被回退
 
(已保护“模板:Tag/doc”([编辑=仅允许管理员](无限期)[移动=仅允许管理员](无限期)))
 
第1行: 第1行:
<includeonly><div id="home-card-railway" class="home-card home-card--col2 home-card--row1">
{{Documentation}}
<h3 class="home-card__header">[[轨道交通]]</h3>
: {{t|tag|''tagname'' [|''type''] [|content&#61;''text''] [|params&#61;''parameters'']}}
<p>城市轨道交通的建设是NebulaeCraft的核心玩法,目前服务器内已有多条建设完成的轨道交通线路,它们由不同的玩家建造,共同组成了星云轨道交通的庞大运输系统。</p>
This template provides a quick way to mention an {{WP|ref=no|XML}}/{{WP|ref=no|HTML}}-style tag in a preformatted way. Mainly used in discussion/help pages.
<div class="home-link">
 
<div class="home-link__button">[[星云轨道交通|地铁]]</div>
===Parameters===
<div class="home-link__button">[[星云市域铁路|市域铁路]]</div>
Required parameters shown in '''''bold italics'''''.
</div>
 
</div>
; {{para|first unnamed}} {{nobold|&nbsp;(''tagname'' above)}} : The XML/HTML tag's name (e.g. {{mono|100%|code}}, {{mono|100%|ref}}).
</div></includeonly><noinclude>{{/doc}}</noinclude>
; {{para|second unnamed}} {{nobold|&nbsp;(''type'' above)}} : To indicate which of the tag's types is/are presented:
:; <kbd>p</kbd> &nbsp;(pair) ''(default)'' : A matching pair of open/start and close/end tags (e.g. {{tag|div|pair}}).<br/>To suppress the ellipsis ("...") between the tags, add an empty {{para|content}} parameter.
:; <kbd>o</kbd> &nbsp;(open) : An open/start tag (e.g. {{tag|span|open}}).
:; <kbd>c</kbd> &nbsp;(close) : A close/end tag (e.g. {{tag|span|close}}).
:; <kbd>s</kbd> &nbsp;(single) : A single tag (e.g. {{tag|hr|single}}).
; {{para|content}} : Text to place between open/start and close/end tags.
; {{para|params}} : Parameters to be included as part of an open/start tag.
; {{para|wrap|yes}} : Disable nowrap for long samples.
 
===Examples===
{| class="wikitable"
!Markup
!Renders as
|-  
| <nowiki>{{tag|ref}}</nowiki>                      || {{tag|ref}}
|-  
| <nowiki>{{tag|ref|content=}}</nowiki>            || {{tag|ref|content=}}
|-  
| <nowiki>{{tag|ref|content=hello}}</nowiki>        || {{tag|ref|content=hello}}
|-  
| <nowiki>{{tag|span|content=foo}}</nowiki>         || {{tag|span|content=foo}}
|- 
| <nowiki>{{tag|span|open}}</nowiki>               || {{tag|span|open}}
|- 
| <nowiki>{{tag|span|open|content=hello}}</nowiki>  || {{tag|span|open|content=hello}}
|-
| <nowiki>{{tag|span|close|content=hello}}</nowiki> || {{tag|span|close|content=hello}}
|-
| <nowiki>{{tag|span|pair|content=hello}}</nowiki> || {{tag|span|pair|content=hello}}
|- 
| <nowiki>{{tag|ref|open|params=group="note"}}</nowiki> || {{tag|ref|open|params=group="note"}}
|-  
| <nowiki>{{tag|references|single}}</nowiki>       || {{tag|references|single}}
|- 
| <nowiki>{{tag|br|single}}</nowiki>               || {{tag|br|single}}
|-
| <nowiki>{{tag|!--|content=comment}}</nowiki>     || {{tag|!--|content=comment}}
|- 
| <nowiki>{{tag|math|params=chem}}</nowiki>   || {{tag|math|params=chem}}
|- 
| <nowiki>{{tag|a|params=href="&lt;nowiki>https://en.wikipedia.org/&lt;/nowiki>"|content=English Wikipedia}}</nowiki> || {{tag|a|params=href="<nowiki>https://en.wikipedia.org/</nowiki>"|content=English Wikipedia}}
|}
 
<includeonly>
[[Category:Typing-aid templates]]
</includeonly>
<noinclude></noinclude>

2023年9月23日 (六) 22:35的最新版本

{{tag|<tagname [>|<type] [>|<content=text] [>|<params=parameters]>}}

This template provides a quick way to mention an Wikipedia-logo-v2.svg XML/Wikipedia-logo-v2.svg HTML-style tag in a preformatted way. Mainly used in discussion/help pages.

Parameters

Required parameters shown in bold italics.

|first unnamed=  (tagname above)
The XML/HTML tag's name (e.g. code, ref).
|second unnamed=  (type above)
To indicate which of the tag's types is/are presented:
p  (pair) (default)
A matching pair of open/start and close/end tags (e.g. <div>...</div>).
To suppress the ellipsis ("...") between the tags, add an empty |content= parameter.
o  (open)
An open/start tag (e.g. <span>).
c  (close)
A close/end tag (e.g. </span>).
s  (single)
A single tag (e.g. <hr />).
|content=
Text to place between open/start and close/end tags.
|params=
Parameters to be included as part of an open/start tag.
|wrap=yes
Disable nowrap for long samples.

Examples

Markup Renders as
{{tag|ref}} <ref>...</ref>
{{tag|ref|content=}} <ref></ref>
{{tag|ref|content=hello}} <ref>hello</ref>
{{tag|span|content=foo}} <span>foo</span>
{{tag|span|open}} <span>
{{tag|span|open|content=hello}} <span>hello
{{tag|span|close|content=hello}} hello</span>
{{tag|span|pair|content=hello}} <span>hello</span>
{{tag|ref|open|params=group="note"}} <ref group="note">
{{tag|references|single}} <references />
{{tag|br|single}} <br />
{{tag|!--|content=comment}} <!--comment-->
{{tag|math|params=chem}} <math chem>...</math>
{{tag|a|params=href="<nowiki>https://en.wikipedia.org/</nowiki>"|content=English Wikipedia}} <a href="https://en.wikipedia.org/">English Wikipedia</a>