autopatrol
3,554
edits
m (→Usage) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{#vardefine:gsize|{{{size|120}}}}}{{#vardefine:gpad|{{{pad|15}}}}}{{#vardefine:gmaxwidth|{{#expr:({{#var:gsize}}+2*{{#var:gpad}}+13)*{{{perrow|7}}}}}}}<ul class="gallery" {{#if:{{{perrow|}}}|style="max-width: {{#var:gmaxwidth}}px;_width: {{#var:gmaxwidth}}px;"}}><!-- | {{#vardefine:gsize|{{{size|120}}}}}{{#vardefine:gpad|{{{pad|15}}}}}{{#vardefine:gmaxwidth|{{#expr:({{#var:gsize}}+2*{{#var:gpad}}+13)*{{{perrow|7}}}}}}}<ul class="gallery" {{#if:{{{perrow|}}}|style="max-width: {{#var:gmaxwidth}}px;_width: {{#var:gmaxwidth}}px;"}}>{{#if:{{{title|}}}|<li class="gallerycaption">{{{title|}}}</li>}}<!-- | ||
--><noinclude> | --><noinclude> | ||
__NOTOC__ | __NOTOC__ | ||
Line 8: | Line 8: | ||
To use this template, begin with this code, you can delete and parameters you do not use: | To use this template, begin with this code, you can delete and parameters you do not use: | ||
<div style="float:left;"><pre> | <div style="float:left;"><pre> | ||
{{Gallery|size=|pad=|perrow=}} | {{Gallery|size=|pad=|perrow=|title=}} | ||
{{Gallery/Box|file=|link=|tip=|caption=}} | {{Gallery/Box|file=|link=|tip=|caption=}} | ||
{{Gallery/Bottom}} | {{Gallery/Bottom}} | ||
</pre></div><br style="clear:both"> | </pre></div><br style="clear:both"> | ||
Use the parameter ''size'' to set the size to have each image as a pure number, the default value is 120. Use the parameter ''pad'' to set the amount of padding to have,as a pure number, the default value is 15. Use ''perrow'' to set the number of images per row, by default the number automatically fits the screen. | Use the parameter ''size'' to set the size to have each image as a pure number, the default value is 120. Use the parameter ''pad'' to set the amount of padding to have,as a pure number, the default value is 15. Use ''perrow'' to set the number of images per row, by default the number automatically fits the screen. Use '''title' to make a title for the gallery. | ||
Use a '''Gallery/Box''' for each image. All parameters other than file are optional and can be entered in any order. | Use a '''Gallery/Box''' for each image. All parameters other than file are optional and can be entered in any order. |