Jump to content

Template:Image label begin and Template:Image label begin/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Content deleted Content added
Fix Linter errors. (bogus image options). strip trailing "px" off size parameter if present
 
No edit summary
Tags: Mobile edit Mobile web edit
 
Line 1: 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) -->
<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;}}
style="width: {{#if:{{{thumb|}}}|{{#expr:{{#if:{{{width|}}}|{{{width}}}|400}}+16}}|{{#if:{{{border2|}}}|{{#expr:{{#if:{{{width|}}}|{{{width}}}|400}}+2}}|{{#if:{{{width|}}}|{{{width}}}|400}}}}}}px;
{{#if:{{{margin|}}}|margin: {{{margin}}};}}
{{#if:{{{margin|}}}|margin: {{{margin}}};}}
{{#if:{{{padding|}}}|padding: {{{padding}}};}}
{{#if:{{{padding|}}}|padding: {{{padding}}};}}
Line 9: Line 9:
background-color: {{{svg-background-color|{{{background-color|#ffffff}}}}}};
background-color: {{{svg-background-color|{{{background-color|#ffffff}}}}}};
position: relative;
position: relative;
{{#if:{{{overflow-x|}}}|max-width: 100%; <!-- deals with large images on mobile overflowing -->
{{#if:{{{overflow-x|}}}|overflow-x: {{{overflow-x|}}};}}
overflow-x: {{{overflow-x|auto}}};}}"><!--
{{#if:{{{overflow-y|}}}|overflow-y: {{{overflow-y|}}};}}}}"><!--
-->{{#if:{{{fullimage|}}}
-->{{#if:{{{fullimage|}}}
|{{{fullimage}}}
|{{{fullimage}}}
|[[File:{{{image|Bad Title Example.png}}}{{#if:{{{border2|}}}|{{!}}border}}{{#if:{{{thumb|}}}|{{!}}thumb{{!}}none}}|{{Str number/trim|{{#if:{{{width|}}}|{{{width}}}|400}}}}px{{#ifeq:{{{link|File:}}}|File:||{{!}}link={{{link|}}}}}|alt={{{alt|}}}|{{{caption|}}}]]
|[[File:{{{image|Bad Title Example.png}}}{{#if:{{{border2|}}}|{{!}}border}}{{#if:{{{thumb|}}}|{{!}}thumb{{!}}none}}|{{#if:{{{width|}}}|{{{width}}}|400}}px{{#ifeq:{{{link|File:}}}|File:||{{!}}link={{{link|}}}}}|alt={{{alt|}}}|{{{caption|}}}]]
}}<noinclude>
}}<noinclude>
</div>
</div>
{{documentation}}
{{Documentation}}
</noinclude>
</noinclude>