Template:Image label begin: Difference between revisions
ugh
No edit summary |
(ugh) |
||
(18 intermediate revisions by 13 users not shown) | |||
Line 1:
<div role="img" class="{{#switch:{{{float|}}}|left=floatleft|right=floatright}} noresize" <!-- noresize disables the img from being limited to the width of the viewport size (as on mobile) -->
style="width: {{#if:{{{thumb|}}}|{{#expr:{{#if:{{{width|}}}|{{{width}}}|400}}+16}}|{{#if:{{{border2|}}}|{{#expr:{{#if:{{{width|}}}|{{{width}}}|400}}+2}}|{{#if:{{{width|}}}|{{{width}}}|400}}}}}}px; {{#switch:{{{float|}}}|center|centre=margin-left:auto; margin-right:auto;}}
{{#if:{{{margin|}}}|margin: {{{margin}}};}}
{{#if:{{{padding|}}}|padding: {{{padding}}};}}
<div style="background-color: {{{svg-background-color|}}};">[[File:{{{image|Example.png}}}{{#if:{{{thumb|}}}|{{!}}thumb|}}|{{{width|400}}}px{{#ifeq:{{{link|File:}}}|File:||{{!}}link={{{link|}}}}}|alt={{{alt|}}}|{{{caption|}}}]]</div><noinclude>▼
{{#if:{{{border|}}}|border: {{{border}}};}}
{{#if:{{{font-size|}}}|font-size: {{{font-size}}};}}
line-height: 1;
text-align: {{{text-align|center}}};
background-color: {{{svg-background-color|{{{background-color|#ffffff}}}}}};
position: relative;
{{#if:{{{overflow-x|}}}|max-width: 100%; <!-- deals with large images on mobile overflowing -->
overflow-x: {{{overflow-x|auto}}};}}"><!--
-->{{#if:{{{fullimage|}}}
|{{{fullimage}}}
▲
}}<noinclude>
</div>
{{documentation}}
</noinclude>
|