Template:Gallery: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
(Created template)
 
(dark is false by default)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<ul class="gallery"><noinclude>
{{#vardefine:dark|{{{dark|}}}}}{{#vardefine:square|{{{square|true}}}}}{{#vardefine:gsize|{{{size|120}}}}}{{#vardefine:gpad|{{{pad|15}}}}}{{#vardefine:gmaxwidth|{{#expr:({{#var:gsize}}+2*{{#var:gpad}}+13)*{{{perrow|7}}}}}}}{{#vardefine:gcpmargin|{{{margin|0}}}}}{{#vardefine:galign|{{{align|center}}}}}<div style="display: none;"><gallery></gallery></div><ul class="gallery" {{#if:{{{perrow|}}}|style="max-width: {{#var:gmaxwidth}}px;_width: {{#var:gmaxwidth}}px;"}}>{{#if:{{{title|}}}|<li class="gallerycaption">{{{title|}}}</li>}}<noinclude>
__NOTOC__
{{Documentation}}
==Purpose==
This template is used to create a more flexible image gallery that has more options than the default gallery functions.
 
==Usage==
To use this template, begin with this code:
<div style="float:left;"><pre>
{{Gallery}}
{{Gallery/Box|file=|link=|tip=|caption=}}
{{Gallery/Bottom}}
</pre></div><br style="clear:both">
Use a '''Gallery/Box''' for each image. All parameters other than file are optional and can be entered in any order.
*'''''file''''' — The file to use, do not include the ''File:'' prefix.
*'''''link''''' — A page to link the image to. Defaults to the image's page.
*'''''tip''''' — A tooltip to display for the image, defaults to the page linked to.
*'''''caption''''' — A traditional caption to display below the image.
 
==Subpages==
*[[Template:Gallery/Box]]
*[[Template:Gallery/Bottom]]
{{Cat|Formatting Templates}}
</noinclude>
</noinclude>

Latest revision as of 18:56, September 8, 2020