Difference between revisions of "Template:Navbox"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix empty title height)
m (Some wiki formatting)
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
 
{{{title4|}}}{{{content4|}}}
 
{{{title4|}}}{{{content4|}}}
 
{{{title5|}}}{{{content5|}}}
 
{{{title5|}}}{{{content5|}}}
    {{{title6|}}}{{{content6|}}}
+
{{{title6|}}}{{{content6|}}}
    {{{title7|}}}{{{content7|}}}
+
{{{title7|}}}{{{content7|}}}
    {{{title8|}}}{{{content8|}}}
+
{{{title8|}}}{{{content8|}}}
 
|
 
|
 
{{{!}} class{{=}}"navboxWiki{{#if:{{{sub|}}}||<nowiki/> mw-collapsible{{#if:{{{collapsed|}}}|<nowiki/> mw-collapsed}}{{#if:{{{minWidth|}}}|" style{{=}}"min-width: {{{minWidth}}}}}}}"
 
{{{!}} class{{=}}"navboxWiki{{#if:{{{sub|}}}||<nowiki/> mw-collapsible{{#if:{{{collapsed|}}}|<nowiki/> mw-collapsed}}{{#if:{{{minWidth|}}}|" style{{=}}"min-width: {{{minWidth}}}}}}}"
Line 113: Line 113:
 
{{<nowiki/>Navbox|'''''title'''''|'''''color'''''|'''''minWidth'''''|'''''title''#'''|'''''color''#'''|'''''content''#'''|'''''sub'''''|'''''collapsed'''''}}
 
{{<nowiki/>Navbox|'''''title'''''|'''''color'''''|'''''minWidth'''''|'''''title''#'''|'''''color''#'''|'''''content''#'''|'''''sub'''''|'''''collapsed'''''}}
 
* title: (Optional) navbox title
 
* title: (Optional) navbox title
* color: (Optional, default <tt>#</tt>)
+
* color: (Optional, default {{hl|#}})
* minWidth: (Optional, default <tt>80%</tt>)
+
* minWidth: (Optional, default {{hl|80%}})
 
* title'''#''': (Optional, default empty) # in range 1..8: row 1..8 title
 
* title'''#''': (Optional, default empty) # in range 1..8: row 1..8 title
* color'''#''': (Optional, default <tt>#DDDDDD</tt>) # in range 1..8: row 1..8 title colour
+
* color'''#''': (Optional, default {{hl|#DDDDDD}}) # in range 1..8: row 1..8 title colour
 
* content'''#''': (Optional, default empty) # in range 1..8: row 1..8 cell content
 
* content'''#''': (Optional, default empty) # in range 1..8: row 1..8 cell content
* sub: (Optional, default empty) <tt>y</tt> defines if border and collapsible are shown
+
* sub: (Optional, default empty) {{hl|y}} defines if border and collapsible are shown
* collapsed: (Optional, default empty) <tt>y</tt> defines if the navbox is collapsed by default - incompatible with '''''sub'''''
+
* collapsed: (Optional, default empty) {{hl|y}} defines if the navbox is collapsed by default - incompatible with '''''sub'''''
  
  

Latest revision as of 12:35, 9 May 2022

Usage

{{Navbox|title|color|minWidth|title#|color#|content#|sub|collapsed}}

  • title: (Optional) navbox title
  • color: (Optional, default #)
  • minWidth: (Optional, default 80%)
  • title#: (Optional, default empty) # in range 1..8: row 1..8 title
  • color#: (Optional, default #DDDDDD) # in range 1..8: row 1..8 title colour
  • content#: (Optional, default empty) # in range 1..8: row 1..8 cell content
  • sub: (Optional, default empty) y defines if border and collapsible are shown
  • collapsed: (Optional, default empty) y defines if the navbox is collapsed by default - incompatible with sub


Examples
Code Result
{{Navbox}}

-no navbox defined-

{{Navbox|Hello there!}}

-no navbox defined-

{{Navbox
	|title1= Title 1
	|content1= Hello, first content!
}}
{{Navbox
	|title= title displays collapse option
	|title1= category
	|content1= content that is displayed here
}}
{{Navbox
	|title= NAVBOX TITLE
	|color= #DAD
	|title1= Title 1
	|color1= #AAF
	|content1= Hello, first content!
	|content2= Wait… no title?
	|title3= hahaha
	|content3= Yep, no title.
}}
{{Navbox
	|title= NAVBOX TITLE
	|color= #CDF
	|title1= Title 1
	|content1=
		{{Navbox
			|sub= y
			|title1= title1
			|content1= content1
			|title2= title2
			|color2= #FAA
			|content2= content2
			|title3= title3
			|content3=
				{{Navbox
					|sub= y
					|title1= wait…
					|content1= stop!
					|title2= enough!
					|content2= I said.
				}}
		}}
	}}