Difference between revisions of "Imagetag"

From Sega Retro

m (Protected "Template:Imagetag": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{| style="padding: 0 1em; margin: auto;"
+
<includeonly>{| align="{{#if:{{{align|}}}|{{{align}}}|center}}" style="padding: 0 1em;"
| style="background-color: #C0C0C0;"| <center>{{ #if: {{{image|}}} | [[Image:{{{image}}}|center|{{{imagewidth|}}}]] | {{#ifeq:{{NAMESPACE}}|{{ns:Template}}|[[Category:Image Templates Lacking an Icon|{{PAGENAME}}]]|}} }}</center>
+
| style="background-color: #C0C0C0; width:{{#expr:{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|32}} * 2}}px; min-width:{{#expr:{{#if:{{{imagewidth|}}}|{{{imagewidth}}}|32}} * 2}}px;"| <center>{{ #if: {{{image|}}} | [[File:{{{image}}}|center|link={{{imagelink|}}}|{{{imagewidth|}}}px]] | {{#ifeq:{{NAMESPACE}}|{{ns:Template}}|[[Category:Image templates lacking an icon|{{PAGENAME}}]]|}} }}</center>
| style="background-color: #D0D0D0; text-align: left;"| {{ #if: {{{text|}}} | {{{text}}} | This is an image. }}
+
| width="{{{textwidth|}}}" style="background-color: #D0D0D0; text-align: left;"| {{ #if: {{{text|}}} | {{{text}}} | This is an image. }}
 
|}</includeonly><noinclude>{{Imagetag|image=SmokingPipe.png|imagewidth=128|text=Ceci n'est pas un modèle.}}
 
|}</includeonly><noinclude>{{Imagetag|image=SmokingPipe.png|imagewidth=128|text=Ceci n'est pas un modèle.}}
This template is for anything that needs to be in a box styled as Sega Retro itself is styled; it should be used instead of [[:Template:Box|Box]] or a <tt><nowiki><div></nowiki></tt> tag unless necessary. It was originally created (and thus was named) for transclusion in [[:Category:Image Templates|image templates]].
+
This template is for anything that needs to be in a box styled as Sega Retro itself is styled; it should be used instead of [[:Template:Box|Box]] or a <tt><nowiki><div></nowiki></tt> tag unless necessary. It was originally created (and thus was named) for transclusion in [[:Category:Image templates|image templates]].
  
 
==Usage==
 
==Usage==
Line 11: Line 11:
 
| text=
 
| text=
 
| imagewidth=
 
| imagewidth=
 +
| imagelink=
 
}}
 
}}
 
</pre>
 
</pre>
  
[[Category:Image Templates|{{PAGENAME}}]]</noinclude>
+
[[Category:Image templates|{{PAGENAME}}]]</noinclude>

Latest revision as of 08:06, 15 August 2019

SmokingPipe.png
Ceci n'est pas un modèle.

This template is for anything that needs to be in a box styled as Sega Retro itself is styled; it should be used instead of Box or a <div> tag unless necessary. It was originally created (and thus was named) for transclusion in image templates.

Usage

{{Imagetag
| image=
| text=
| imagewidth=
| imagelink=
}}