Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Infobox: Difference between revisions

Template page
Content deleted Content added
Saarn (talk | contribs)
Infobox parent template for colour assignment
 
Saarn (talk | contribs)
m css
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><templatestyles src="{{{styles}}}" /><table class="{{{class}}} {{#switch:{{lc:{{{backgroundcolor|}}}}}
<includeonly><templatestyles src="Template:Infobox/styles.css" />{{#if:{{{styles|}}}|{{#tag:templatestyles||src={{{styles}}}}}}}<table class="infobox-panel {{{class|}}} {{#switch:{{lc:{{{backgroundcolor|}}}}}
|crimson
|crimson
|azure
|azure
|verdant
|verdant
|midnight
|midnight
|mekhanite = {{{class}}}--{{lc:{{{backgroundcolor|}}}}}
|mekhanite = infobox-panel--{{lc:{{{backgroundcolor|}}}}}
|#default =
|#default =
}}"><caption>{{{caption|General Information}}}</caption>{{#if:{{{image|}}}|<tr><td colspan="2" class="{{{class}}}__image">[[File:{{{image}}}|{{{imagesize|260px}}}|alt={{#if:{{{imagealt|}}}|{{{imagealt}}}|{{{defaultalt|Image}}}}}]]</td></tr>}}{{{rows|}}}</table>{{#if:{{{category|}}}|{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{#switch:{{lc:{{{backgroundcolor|}}}}}
}}"><caption>{{{caption|General Information}}}</caption>{{#if:{{{image|}}}|<tr><td colspan="2" class="infobox-panel__image">[[File:{{{image}}}|{{{imagesize|260px}}}|alt={{#if:{{{imagealt|}}}|{{{imagealt}}}|{{{defaultalt|Image}}}}}]]</td></tr>}}{{{rows|}}}</table>{{#if:{{{category|}}}|{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{#switch:{{lc:{{{backgroundcolor|}}}}}
|crimson
|crimson
|azure
|azure
Line 15: Line 15:
|#default = [[Category:{{{category}}}]]
|#default = [[Category:{{{category}}}]]
}}}}}}</includeonly><noinclude>
}}}}}}</includeonly><noinclude>
Shared wrapper for infobox templates. Styling comes from <code>Template:Infobox/styles.css</code>.
⚫
Shared wrapper for infobox templates. Parameters: <code>class</code>, <code>styles</code>, <code>caption</code>, <code>category</code> (invalid-color tracking category, without "Category:"), <code>backgroundcolor</code>, <code>image</code>, <code>imagealt</code>, <code>defaultalt</code>, <code>imagesize</code> and <code>rows</code>.

⚫
Parameters: <code>class</code> (optional extra class for infobox-specific CSS), <code>styles</code> (optional extra stylesheet), <code>caption</code>, <code>category</code> (invalid-color tracking category, without "Category:"), <code>backgroundcolor</code>, <code>image</code>, <code>imagealt</code>, <code>defaultalt</code>, <code>imagesize</code> and <code>rows</code>.
[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude>
</noinclude>

Latest revision as of 22:12, 23 November 2026

Shared wrapper for infobox templates. Styling comes from Template:Infobox/styles.css.

Parameters: class (optional extra class for infobox-specific CSS), styles (optional extra stylesheet), caption, category (invalid-color tracking category, without "Category:"), backgroundcolor, image, imagealt, defaultalt, imagesize and rows.