Template:Gallery/Box: Difference between revisions

Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
(Restore to version 7646 by Matt)
No edit summary
Line 1: Line 1:
<li class="gallerybox" style="width: 155px"><div style="width: 155px"><div class="thumb" style="width: 150px;"><div style="margin:30px auto;">[[File:{{{file|}}}|120x120px|link={{{link|File:{{{file|}}}}}}|{{{tip|}}}]]</div></div>{{#if:{{{caption|}}}|<div class="gallerytext"><p>{{{caption|}}}</p></div>}}</div></li>
<includeonly>{{#vardefine:gsize|{{#if:{{#var:gsize}}|{{#var:gsize}}|120}}}}{{#vardefine:gstate|{{#expr:{{#imgw:File:{{{file|}}}}}<={{#imgh:File:{{{file|}}}}}|true|false}}}}{{#vardefine:gmargin|{{#ifeq:{{#var:gstate}}|1|15px|{{#expr:floor(({{#var:gsize}}+30-floor({{#var:gsize}}/{{#imgw:File:{{{file|}}}}}*{{#imgh:File:{{{file|}}}}}))/2)}}}}}}
<li class="gallerybox" style="width: {{#expr:{{#var:gsize}}+35}}px"><div style="width: {{#expr:{{#var:gsize}}+35}}px"><div class="thumb" style="width: {{#expr:{{#var:gsize}}+30}}px;"><div style="margin:{{#var:gmargin}}px auto;">[[File:{{{file|}}}|{{#var:gsize}}x{{#var:gsize}}px|link={{{link|File:{{{file|}}}}}}|{{{tip|}}}]]</div></div>{{#if:{{{caption|}}}|<div class="gallerytext"><p>{{{caption|}}}</p></div>}}</div></li></includeonly>