Difference between revisions of "Template:Switch/doc"
(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...") |
|||
Line 10: | Line 10: | ||
;Templates that require line breaks | ;Templates that require line breaks | ||
<span>When the value of parameter 3 is </code>span</code> (when this template cannot take effect): <pre>{{Switch/Button | <span>When the value of parameter 3 is </code>span</code> (when this template cannot take effect): <pre>{{Switch/Button | ||
− | |span1= | + | |span1=Switch gifts |
}}{{Switch|span1| | }}{{Switch|span1| | ||
{{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/> | {{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/> | ||
|span}}</pre> | |span}}</pre> | ||
− | {{ | + | {{Switch/Button |
− | |span1= | + | |span1=Switch gifts |
}}{{Switch/Button|span1| | }}{{Switch/Button|span1| | ||
{{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/> | {{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/> | ||
Line 21: | Line 21: | ||
<div> When the value of parameter 3 is <code>div</code>: <pre>{{Switch/Button | <div> When the value of parameter 3 is <code>div</code>: <pre>{{Switch/Button | ||
− | |div1= | + | |div1=Switch gifts |
− | }}{{ | + | }}{{Switch|div1| |
{{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/> | {{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/> | ||
|div}}</pre> | |div}}</pre> | ||
{{Switch/Button | {{Switch/Button | ||
− | |div1= | + | |div1=Switch gifts |
}}{{Switch|div1| | }}{{Switch|div1| | ||
{{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/> | {{bilibiliVideo|id=BV1nC4y147iy|page=1|width=600|height=421|autoplay=yes}}<nowiki/> | ||
Line 33: | Line 33: | ||
;Templates that do not require line breaks | ;Templates that do not require line breaks | ||
<div>When the value of parameter 3 is <code>span</code>: <pre>{{Switch/Button | <div>When the value of parameter 3 is <code>span</code>: <pre>{{Switch/Button | ||
− | |span2= | + | |span2=Switch Ruby |
}}{{Switch|span2| | }}{{Switch|span2| | ||
{{颜文字|丘比}}<nowiki/> | {{颜文字|丘比}}<nowiki/> | ||
|span}}</pre> | |span}}</pre> | ||
− | {{ | + | {{Switch/Button |
− | |span2= | + | |span2=Switch Ruby |
− | }}{{ | + | }}{{Switch|span2| |
− | {{颜文字| | + | {{颜文字|Euby}}<nowiki/> |
|span}}</div> | |span}}</div> | ||
<div>When the value of parameter 3 is <code>div</code>: <pre>{{Switch/Button | <div>When the value of parameter 3 is <code>div</code>: <pre>{{Switch/Button | ||
− | |div2= | + | |div2=Switch Ruby |
}}{{Switch|div2| | }}{{Switch|div2| | ||
− | {{颜文字| | + | {{颜文字|Ruby}}<nowiki/> |
|div}}</pre> | |div}}</pre> | ||
{{Switch/Button | {{Switch/Button | ||
− | |div2= | + | |div2=Switch Ruby |
− | }}{{ | + | }}{{Switch|div2| |
− | {{颜文字| | + | {{颜文字|Ruby}}<nowiki/> |
|div}}</div> | |div}}</div> | ||
Latest revision as of 21:48, 1 May 2022
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
{{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
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,里面所有带有
|
的格式符号都需要进行替换。 - 当然,任何时候
=
都需要替换。
- Add other wikitext that need line breaks
- Note: 此处的
<nowiki/>
与wikitext之间应换行,否则wikitext会失效。