Template:Image label begin: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
(Undo revision 134611 by Kemal HagemaruFRP (talk) Don't drastically change templates when they're used on other articles)
Tag: Undo
No edit summary
Line 1: Line 1:
<div class="nounderlines" style="width: {{{width|400}}}px; float: {{{float|none}}}; margin: {{{margin|none}}}; padding: {{{padding|none}}}; border: {{{border|none}}}; clear: {{{float|none}}}; background-color: {{{background-color|transparent}}}; position: relative;">
<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 style="background-color: {{{svg-background-color|}}};">{{#if:{{{fullimage|}}}
    style="width: {{#if:{{{thumb|}}}|{{#expr:{{#if:{{{width|}}}|{{{width}}}|400}}+16}}|{{#if:{{{border2|}}}|{{#expr:{{#if:{{{width|}}}|{{{width}}}|400}}+2}}|{{#if:{{{width|}}}|{{{width}}}|400}}}}}}px;
  |{{{fullimage}}}
            {{#if:{{{margin|}}}|margin: {{{margin}}};}}
  |[[File:{{{image|Example.png}}}{{#if:{{{thumb|}}}|{{!}}thumb|}}|{{{width|400}}}px{{#ifeq:{{{link|File:}}}|File:||{{!}}link={{{link|}}}}}|alt={{{alt|}}}|{{{caption|}}}]]}}</div><noinclude>[[Category:Diagram templates]]</noinclude>
            {{#if:{{{padding|}}}|padding: {{{padding}}};}}
            {{#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}}}
    |[[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>

Revision as of 16:00, 23 January 2020

[create] Template documentation