Template:Image Label begin: Difference between revisions

Content deleted Content added
Cnamav (talk | contribs)
Created page with "<includeonly><div style="position:absolute; {{#if:{{{text-align|}}}|text-align:{{{text-align}}};}} {{#if:{{{font-size|}}}|font-size:{{{font-size}}};}} {{#if:{{{background|}}}|background-color: rgba(255, 255, 255, 0.5); padding: 0 2px;}} left:{{#expr:{{{x|0}}}*{{#if:{{{scale|}}}|{{{scale}}}|400}}-6}}px; top:{{#expr:{{{y|0}}}*{{#if:{{{scale|}}}|{{{sc..."
 
Cnamav (talk | contribs)
No edit summary
 
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) -->
<includeonly><div style="position:absolute;
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:{{{text-align|}}}|text-align:{{{text-align}}};}}
{{#if:{{{font-sizemargin|}}}|font-sizemargin: {{{font-sizemargin}}};}}
{{#if:{{{backgroundpadding|}}}|background-colorpadding: rgba(255, 255, 255, 0.5); {{{padding: 0 2px}}};}}
left:{{#expr:{{{x|0}}}*{{#if:{{{scaleborder|}}}|border: {{{scaleborder}}}|400;}}-6}}px;
{{#if:{{{textfont-alignsize|}}}|textfont-alignsize: {{{textfont-alignsize}}};}}
top:{{#expr:{{{y|0}}}*{{#if:{{{scale|}}}|{{{scale}}}|400}}-8}}px">{{#ifexpr:({{{x|0}}}*{{#if:{{{scale|}}}|{{{scale}}}|400}}-6)>800|[[Category:Pages using image label with a wide image]]|}}{{#ifexpr:({{{y|0}}}*{{#if:{{{scale|}}}|{{{scale}}}|400}}-8)>800|[[Category:Pages using image label with a tall image]]|}}{{{text}}}</div></includeonly><noinclude>
line-height: 1;
{{Documentation|Template:Image label begin/doc}}</noinclude>
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}}}
|[[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>
</div>
{{documentation}}
</noinclude>