User:Boblers/switchbtn: Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(switchbtn sample for clicktoggle)
 
(documenting size, group, target)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{| class="roundy" style="display:inline-block; margin:auto; background:#{{{{{color1|}}} color light}}; border: 3px solid #{{{{{color2|{{{color1|}}}}}} color dark}}; border-collapse: separate"
<includeonly>{| class="roundy clicktoggle" style="display:inline-block; margin:auto; background:#{{{{{color1|}}} color light}}; border: 3px solid #{{{{{color2|{{{color1|}}}}}} color dark}}; border-collapse: separate;" data-type="set" data-for="group{{{group|1}}},target{{{target|1}}}" data-active-style="display:inline-block; margin:auto; background:#FFFFFF; border: 3px solid #{{{{{color2|{{{color1|}}}}}} color dark}}; border-collapse: separate;"
|-
|-
|
|
<div style="display:flex;flex-wrap:wrap;text-align:center;align-items:start;justify-content:center;">
<div style="display:flex;flex-wrap:wrap;text-align:center;align-items:start;justify-content:center;">
{{ArtLifeEntry/Image|file={{{filename}}}|hovertext={{{caption}}}|caption='''{{{caption|}}}'''|size=100px}}
{{User:Boblers/switchbtn/image|file={{{filename}}}|caption='''{{{caption|}}}'''|size={{{size|100px}}}}}
</div>
</div>
|}</includeonly><noinclude>
|}</includeonly><noinclude>
Line 10: Line 10:
<pre>{{User:Boblers/switchbtn
<pre>{{User:Boblers/switchbtn
|filename=
|filename=
|size=
|caption=
|caption=
|color1=
|color1=
|color2=
|color2=
|group=
|target=
}}</pre>
}}</pre>


==Template fields==
==Template fields==
* '''filename''' - Name of the file to be used.
* '''filename''' - Name of the file to be used.
* '''size''' (optional) - Size of the image to be displayed. Defaults to 100px.
* '''caption''' - Caption to display below the file.
* '''caption''' - Caption to display below the file.
* '''color1''' - Color name to use for the background.
* '''color1''' - Color name to use for the background.
* '''color2''' (optional) - Color name to use for the border. If not provided, color1's value is used instead.
* '''color2''' (optional) - Color name to use for the border. If not provided, color1's value is used instead.
* '''group''' - Name or number of the clicktoggle group. Defaults to 1 (which then becomes "group1")
* '''target''' - Name or number of the clicktoggle target. Defaults to 1 (which then becomes "target1").


==Examples==
==Examples==
<pre>{{User:Boblers/switchbtn
<pre>{{User:Boblers/switchbtn|filename=0052Meowth.png|caption=Meowth|color1=Normal|target=1}}
|filename=0052Meowth.png
{{User:Boblers/switchbtn|filename=0052Meowth-Alola.png|caption=Alolan<br>Meowth|color1=Dark|target=2}}
|caption=Meowth
{{User:Boblers/switchbtn|filename=0052Meowth-Galar.png|caption=Galarian<br>Meowth|color1=Steel|target=3}}
|color1=Normal
{{User:Boblers/switchbtn|filename=0052Meowth-Gigantamax.png|caption=[[File:Dynamax icon.png|link=]] Gigantamax<br>Meowth|color1=Normal|target=4}}</pre>
|color2=
}}
{{User:Boblers/switchbtn
|filename=0052Meowth-Alola.png
|caption=Meowth
|color1=Dark
|color2=
}}
{{User:Boblers/switchbtn
|filename=0052Meowth-Galar.png
|caption=Meowth
|color1=Steel
|color2=
}}
{{User:Boblers/switchbtn
|filename=0052Meowth-Gigantamax.png
|caption=Meowth
|color1=Normal
|color2=
}}</pre>


{{User:Boblers/switchbtn
{{User:Boblers/switchbtn|filename=0052Meowth.png|caption=Meowth|color1=Normal|target=1}}
|filename=0052Meowth.png
{{User:Boblers/switchbtn|filename=0052Meowth-Alola.png|caption=Alolan<br>Meowth|color1=Dark|target=2}}
|caption=Meowth
{{User:Boblers/switchbtn|filename=0052Meowth-Galar.png|caption=Galarian<br>Meowth|color1=Steel|target=3}}
|color1=Normal
{{User:Boblers/switchbtn|filename=0052Meowth-Gigantamax.png|caption=[[File:Dynamax icon.png|link=]] Gigantamax<br>Meowth|color1=Normal|target=4}}
}}
{{User:Boblers/switchbtn
|filename=0052Meowth-Alola.png
|caption=Alolan<br>Meowth
|color1=Dark
}}
{{User:Boblers/switchbtn
|filename=0052Meowth-Galar.png
|caption=Galarian<br>Meowth
|color1=Steel
}}
{{User:Boblers/switchbtn
|filename=0052Meowth-Gigantamax.png
|caption=[[File:Dynamax icon.png|link=]] Gigantamax<br>Meowth
|color1=Normal
}}


</noinclude>
</noinclude>

Latest revision as of 13:21, 23 August 2023


Usage

{{User:Boblers/switchbtn
|filename=
|size=
|caption=
|color1=
|color2=
|group=
|target=
}}

Template fields

  • filename - Name of the file to be used.
  • size (optional) - Size of the image to be displayed. Defaults to 100px.
  • caption - Caption to display below the file.
  • color1 - Color name to use for the background.
  • color2 (optional) - Color name to use for the border. If not provided, color1's value is used instead.
  • group - Name or number of the clicktoggle group. Defaults to 1 (which then becomes "group1")
  • target - Name or number of the clicktoggle target. Defaults to 1 (which then becomes "target1").

Examples

{{User:Boblers/switchbtn|filename=0052Meowth.png|caption=Meowth|color1=Normal|target=1}}
{{User:Boblers/switchbtn|filename=0052Meowth-Alola.png|caption=Alolan<br>Meowth|color1=Dark|target=2}}
{{User:Boblers/switchbtn|filename=0052Meowth-Galar.png|caption=Galarian<br>Meowth|color1=Steel|target=3}}
{{User:Boblers/switchbtn|filename=0052Meowth-Gigantamax.png|caption=[[File:Dynamax icon.png|link=]] Gigantamax<br>Meowth|color1=Normal|target=4}}
0052Meowth.png
Meowth
0052Meowth-Alola.png
Alolan
Meowth
0052Meowth-Galar.png
Galarian
Meowth
0052Meowth-Gigantamax.png
Dynamax icon.png Gigantamax
Meowth