Template:Flexfooter: Difference between revisions

add templatedata; combine documentation with flexheader
m (typo)
(add templatedata; combine documentation with flexheader)
 
Line 1: Line 1:
<includeonly></div></includeonly><noinclude>
<includeonly></div></includeonly><noinclude>
This template is to be used for listing info box items in a flexible set - the items will distribute horizontally on wider screens, and vertically on narrower screens.
<templatedata>
 
{
This must be used in combination with [[Template:Flexheader]].
"params": {},
 
"description": "{{flexfooter}} is used to close a flexible set created with {{flexheader}}.\nA simple \"</div>\" can also be used in its place.\nThis template has no parameters.",
==Usage==
"format": "inline"
<pre>{{Flexheader}}
}</templatedata>
(include as many inline-formatted items as desired)
{{Documentation|Template:Flexheader/doc}}
{{Flexfooter}}</pre>
 
Functionality:
* Between <nowiki>{{Flexheader}}</nowiki> and <nowiki>{{Flexfooter}}</nowiki>, include a list of inline-formatted items (example: Instances of [[Template:TypeProperties]]).
* The set of items will be formatted as a flex with wrapping, will be centered horizontally, and will be aligned vertically at the top edge of each item. This can be customized (see [[Template:Flexheader]] for details).
* On wide screens such as on desktop, the items will display horizontally. If there are too many items to display horizontally given the screen size, they will wrap to the next row.
 
==Examples==
<pre>
{{Flexheader}}
{{TypeProperties|type=Fighting|prop=Off
|se={{TypeIcon|Ice}}{{TypeIcon|Normal}}{{TypeIcon|Rock}}
|nve={{TypeIcon|Bug}}{{TypeIcon|Fairy}}{{TypeIcon|Flying}}{{TypeIcon|Poison}}{{TypeIcon|Psychic}}
|immune={{TypeIcon|Ghost}}
}}
{{TypeProperties|type=Fighting|prop=Def
|se={{TypeIcon|Fairy}}{{TypeIcon|Flying}}{{TypeIcon|Psychic}}
|nve={{TypeIcon|Bug}}{{TypeIcon|Rock}}
}}
{{Flexfooter}}
</pre>
{{Flexheader}}
{{TypeProperties|type=Fighting|prop=Off
|se={{TypeIcon|Ice}}{{TypeIcon|Normal}}{{TypeIcon|Rock}}
|nve={{TypeIcon|Bug}}{{TypeIcon|Fairy}}{{TypeIcon|Flying}}{{TypeIcon|Poison}}{{TypeIcon|Psychic}}
|immune={{TypeIcon|Ghost}}
}}
{{TypeProperties|type=Fighting|prop=Def
|se={{TypeIcon|Fairy}}{{TypeIcon|Flying}}{{TypeIcon|Psychic}}
|nve={{TypeIcon|Bug}}{{TypeIcon|Rock}}
}}
{{Flexfooter}}
 
[[category:Code templates]]
[[category:Code templates]]
</noinclude>
</noinclude>
7,791

edits