Difference between revisions of "Template:Colored infobox header/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jay D. Easy
imported>Jay D. Easy
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
+
 
 
=== Usage ===
 
=== Usage ===
<!--{{template shortcut|cih}}-->
+
{{template shortcut|cih}}
 
A convenient way to insert a colored header at any location in an infobox.
 
A convenient way to insert a colored header at any location in an infobox.
  
:<code><nowiki>{{colored infobox header|color = </nowiki>''color hex code or name''<nowiki>|Title}}</nowiki></code>
+
: &rarr; <code><nowiki>{{colored infobox header|color=</nowiki>[[web colors|<span style=color:#0654AD;>color name or hex code</span>]]<nowiki>|Title}}</nowiki></code>
  
 
=== Example ===
 
=== Example ===
Line 16: Line 16:
 
{{colored infobox header|color=#ffe4c4|Second title}}
 
{{colored infobox header|color=#ffe4c4|Second title}}
 
  |serviceyears_label = Service&nbsp;years
 
  |serviceyears_label = Service&nbsp;years
  |serviceyears      = 2001–2019
+
  |serviceyears      = 2001–{{CURRENTYEAR}}
 
{{colored infobox header|color=#c3d6ef|Third title}}
 
{{colored infobox header|color=#c3d6ef|Third title}}
 
  |battles_label      = Wars
 
  |battles_label      = Wars
 
  |battles            = [[Emu War]]
 
  |battles            = [[Emu War]]
 
}}
 
}}
<pre style=overflow:auto;>{{Infobox military person|name=Example
+
{{pre2|style=overflow:auto;|<nowiki>
 +
{{</nowiki>[[Template:Infobox military person|<span style=color:#0654AD;>Infobox military person</span>]]<nowiki>
 +
|name         = Example
 
{{colored infobox header|color=#ffa07a|First title}}
 
{{colored infobox header|color=#ffa07a|First title}}
 
  |branch      = Template Department
 
  |branch      = Template Department
 
{{colored infobox header|color=#ffe4c4|Second title}}
 
{{colored infobox header|color=#ffe4c4|Second title}}
  |serviceyears = 2001–2019
+
  |serviceyears = 2001–</nowiki>{{CURRENTYEAR}}<nowiki>
 
{{colored infobox header|color=#c3d6ef|Third title}}
 
{{colored infobox header|color=#c3d6ef|Third title}}
 
  |battles      = [[Emu War]]
 
  |battles      = [[Emu War]]
}}</pre><!--
+
}}</nowiki>}}
  
--><includeonly>{{sandbox other||
+
<includeonly>{{sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
[[Category:Infobox templates| ]]
 
[[Category:Infobox templates| ]]
 
}}</includeonly>
 
}}</includeonly>

Revision as of 16:58, 6 August 2019

Usage

A convenient way to insert a colored header at any location in an infobox.

{{colored infobox header|color=color name or hex code|Title}}

Example

Example
First title
BranchTemplates
Second title
Service years2001–2025
Third title
WarsEmu War

Template:Pre2