Difference between revisions of "Template:Navbox"

Difference between revisions of "Template:Navbox"

From BeamNG
m (This will make the template a little easier to read.)
m (Whatever the template name is, that's what will instead appear on the nav-bar.)
Line 1: Line 1:
 
{{#if:{{{title|}}}|
 
{{#if:{{{title|}}}|
 
<div style="box-sizing:border-box;border:1px solid {{{border_color|#aaa}}};clear:both;width:100%;font-size:88%;padding:3px;margin:1em auto 0;text-align:center; background:{{{main_background|#fdfdfd}}};"><table style="border-spacing:0;line-height:1.5em;width:100%;">
 
<div style="box-sizing:border-box;border:1px solid {{{border_color|#aaa}}};clear:both;width:100%;font-size:88%;padding:3px;margin:1em auto 0;text-align:center; background:{{{main_background|#fdfdfd}}};"><table style="border-spacing:0;line-height:1.5em;width:100%;">
<tr><th colspan="{{#expr:1 {{#if:{{{image|}}}|+1}}}}" class="navbox-title" style="background:{{{title_background|#ccccff}}}">{{Navbar|{{PAGENAME}}|mini=1|style=float:left;text-align:left;width:6em;}}<span style="font-size:110%;line-height:1.5em;">{{{title}}}</span></th></tr>
+
<tr><th colspan="{{#expr:1 {{#if:{{{image|}}}|+1}}}}" class="navbox-title" style="background:{{{title_background|#ccccff}}}">{{Navbar|{{{title}}}|mini=1|style=float:left;text-align:left;width:6em;}}<span style="font-size:110%;line-height:1.5em;">{{{title}}}</span></th></tr>
 
{{#if:{{{above|}}}|<tr><td style="background-color:{{{above_background|#ddddff}}};border-top:2px solid {{{main_background|#fdfdfd}}}; padding: 3px 12px;" colspan="{{#expr:1{{#if:{{{image|}}}|+1}}}}">{{{above}}}</td></tr>}}
 
{{#if:{{{above|}}}|<tr><td style="background-color:{{{above_background|#ddddff}}};border-top:2px solid {{{main_background|#fdfdfd}}}; padding: 3px 12px;" colspan="{{#expr:1{{#if:{{{image|}}}|+1}}}}">{{{above}}}</td></tr>}}
 
<tr>{{#if:{{{data|}}}|<td style="border-top:1px solid {{{main_background|#fdfdfd}}};padding: 0;"><table style="border-spacing:0;width:100%">{{{data}}}</table></td>}}{{#if:{{{image|}}}|<td style="border-top:2px solid {{{main_background|#fdfdfd}}}; width: 15%">{{{image}}}</td>}}</tr>
 
<tr>{{#if:{{{data|}}}|<td style="border-top:1px solid {{{main_background|#fdfdfd}}};padding: 0;"><table style="border-spacing:0;width:100%">{{{data}}}</table></td>}}{{#if:{{{image|}}}|<td style="border-top:2px solid {{{main_background|#fdfdfd}}}; width: 15%">{{{image}}}</td>}}</tr>
Line 10: Line 10:
  
 
-->{{{{PAGENAME}}<!-- Because this is the template page, we can invoke from itself. -->
 
-->{{{{PAGENAME}}<!-- Because this is the template page, we can invoke from itself. -->
|title = Example Title
+
|title = {{PAGENAME}}
 
|above = Example Subtitle/something really really useful
 
|above = Example Subtitle/something really really useful
 
|below = Example Footer/something very very important
 
|below = Example Footer/something very very important

Revision as of 05:09, 11 June 2019

Error: Attempt to create an infobox with no title

Documentation icon Template documentation[create]