Template:Switch/doc

From Moegirlpedia
< Template:Switch
Revision as of 21:54, 30 April 2022 by LiaMinina (talk | contribs) (Created page with "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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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=显示gifts
}}{{Switch|span1|
{{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/>
|span}}
Template:切换显示按钮span1span1
Wide ModeShow
Wide ModeShow
spanspan
When the value of parameter 3 is div:
{{Switch/Button
|div1=显示gifts
}}{{切换显示|div1|
{{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/>
|div}}
显示gifts显示gifts


Templates that do not require line breaks
When the value of parameter 3 is span:
{{Switch/Button
|span2=显示丘比
}}{{Switch|span2|
{{颜文字|丘比}}<nowiki/>
|span}}
Template:切换显示按钮Template:切换显示
When the value of parameter 3 is div:
{{Switch/Button
|div2=显示丘比
}}{{Switch|div2|
{{颜文字|丘比}}<nowiki/>
|div}}
显示丘比显示丘比Template:切换显示

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