Template:Image label begin: Difference between revisions
From WikiMD's Wellness Encyclopedia
en>Jonesey95 Fix Linter errors. (bogus image options). strip trailing "px" off size parameter if present |
CSV import |
||
| 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; | 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 13: | Line 13: | ||
-->{{#if:{{{fullimage|}}} | -->{{#if:{{{fullimage|}}} | ||
|{{{fullimage}}} | |{{{fullimage}}} | ||
|[[File:{{{image|Bad Title Example.png}}}{{#if:{{{border2|}}}|{{!}}border}}{{#if:{{{thumb|}}}|{{!}}thumb{{!}}none}} | |[[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}} | ||
</noinclude> | </noinclude> | ||
{{no-index-template}} | |||
