Template:Switch/Button

From Moegirlpedia
Jump to: navigation, search
Template-info.svg Template Documentation  [View] [Edit] [History] [Refresh]

This series of templates is used to manually show/hide specific strings and to specify strings and button styles in bulk.

Usage

Note that string designators may be in lowercase English letters, uppercase English letters, Chinese characters, etc. (not considered wikitext).
  • Must not contain', ", <, >, \, /, |, do not start with @ at the beginning; otherwise it will be ignored;
{{Switch|Item 1|Item 2|Item 3}}
Required, used to specify the string that needs to be manually switched. There is no limit to this parameter.
Templates that require line breaks
When the value of parameter 3 is span (when this template cannot take effect):
{{Switch/Button
|span1=Switch gifts
}}{{Switch|span1|
{{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/>
|span}}
Switch giftsSwitch giftsspan1span1
Wide ModeShow
Wide ModeShow
spanspan
When the value of parameter 3 is div:
{{Switch/Button
|div1=Switch gifts
}}{{Switch|div1|
{{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/>
|div}}
Switch giftsSwitch gifts


Templates that do not require line breaks
When the value of parameter 3 is span:
{{Switch/Button
|span2=Switch Ruby
}}{{Switch|span2|
{{颜文字|丘比}}<nowiki/>
|span}}

Switch RubySwitch Ruby

When the value of parameter 3 is div:
{{Switch/Button
|div2=Switch Ruby
}}{{Switch|div2|
{{颜文字|Ruby}}<nowiki/>
|div}}
Switch RubySwitch Ruby

Wikitext that requires line breaks

添加表格
Note: 由于表格wikitext较为Template:Rubyh,里面所有带有|的格式符号都需要进行替换。
当然,任何时候=都需要替换。

Template:Example

Add other wikitext that need line breaks
Note: 此处的<nowiki/>与wikitext之间应换行,否则wikitext会失效。

Template:Example

Related