v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Difference between revisions of "Template:Navbox"
Jump to navigation
Jump to search
Doorkeeper (talk | contribs) (rmv padding in list cells) |
Doorkeeper (talk | contribs) (line-height) |
||
Line 4: | Line 4: | ||
--- title & navbar --- | --- title & navbar --- | ||
-->{{#if:{{{title|}}}|<!-- | -->{{#if:{{{title|}}}|<!-- | ||
− | --><tr><th scope="col" colspan="2" style="background: #ccf; border: 1px solid #aaa; padding: 0.25em 1em; text-align: center | + | --><tr style="line-height: 1.5em;"><th scope="col" colspan="2" style="background: #ccf; border: 1px solid #aaa; padding: 0.25em 1em; text-align: center; {{{titlestyle|}}}">{{#if:{{{name|}}}|{{#switch:{{{navbar}}}|off=|#default=<div class="plainlinks" style="float: left; padding-left: 0.4em; font-size: 70%; font-weight: normal; white-space: nowrap;">[[Template:{{PAGENAME:{{{name}}}}}|V]]<span style="font-weight: bold; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;"> · </span>[[Template talk:{{PAGENAME:{{{name}}}}}|T]]<span style="font-weight: bold; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;"> · </span>[https://dwarffortresswiki.org/index.php?title=Template:{{urlencode:{{PAGENAME:{{{name}}}}}|WIKI}}&action=edit E]</div>}}|}}<div style="font-size: 114%; margin: 0 6em;"> |
{{{title}}}</div></th></tr>|}}<!-- | {{{title}}}</div></th></tr>|}}<!-- | ||
Line 10: | Line 10: | ||
--- above --- | --- above --- | ||
-->{{#if:{{{above|}}}|<!-- | -->{{#if:{{{above|}}}|<!-- | ||
− | --><tr><td colspan="2" style="background: #ddf; padding: 0.25em 1em; text-align: center; {{{basestyle|}}}; {{{abovestyle|}}}"> | + | --><tr style="line-height: 1.5em;"><td colspan="2" style="background: #ddf; padding: 0.25em 1em; text-align: center; {{{basestyle|}}}; {{{abovestyle|}}}"> |
{{{above}}}</td></tr>|}}<!-- | {{{above}}}</td></tr>|}}<!-- | ||
Line 16: | Line 16: | ||
--- 1st group/list --- | --- 1st group/list --- | ||
-->{{#if:{{{list1|}}}|<!-- | -->{{#if:{{{list1|}}}|<!-- | ||
− | --><tr>{{#if:{{{group1|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group1style|}}}">{{{group1}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group1|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group1style|}}}">{{{group1}}}</th>|}}<!-- |
--><td {{#if:{{{group1|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group1|}}}|left|center}}; {{{liststyle|}}}; {{{list1style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group1|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group1|}}}|left|center}}; {{{liststyle|}}}; {{{list1style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list1}}}</div></td></tr>|}}<!-- | {{{list1}}}</div></td></tr>|}}<!-- | ||
Line 22: | Line 22: | ||
--- 2nd group/list --- | --- 2nd group/list --- | ||
-->{{#if:{{{list2|}}}|<!-- | -->{{#if:{{{list2|}}}|<!-- | ||
− | --><tr>{{#if:{{{group2|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group2style|}}}">{{{group2}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group2|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group2style|}}}">{{{group2}}}</th>|}}<!-- |
--><td {{#if:{{{group2|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group2|}}}|left|center}}; {{{liststyle|}}}; {{{list2style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group2|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group2|}}}|left|center}}; {{{liststyle|}}}; {{{list2style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list2}}}</div></td></tr>|}}<!-- | {{{list2}}}</div></td></tr>|}}<!-- | ||
Line 28: | Line 28: | ||
--- 3rd group/list --- | --- 3rd group/list --- | ||
-->{{#if:{{{list3|}}}|<!-- | -->{{#if:{{{list3|}}}|<!-- | ||
− | --><tr>{{#if:{{{group3|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group3style|}}}">{{{group3}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group3|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group3style|}}}">{{{group3}}}</th>|}}<!-- |
--><td {{#if:{{{group3|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group3|}}}|left|center}}; {{{liststyle|}}}; {{{list3style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group3|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group3|}}}|left|center}}; {{{liststyle|}}}; {{{list3style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list3}}}</div></td></tr>|}}<!-- | {{{list3}}}</div></td></tr>|}}<!-- | ||
Line 34: | Line 34: | ||
--- 4th group/list --- | --- 4th group/list --- | ||
-->{{#if:{{{list4|}}}|<!-- | -->{{#if:{{{list4|}}}|<!-- | ||
− | --><tr>{{#if:{{{group4|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group4style|}}}">{{{group4}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group4|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group4style|}}}">{{{group4}}}</th>|}}<!-- |
--><td {{#if:{{{group4|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group4|}}}|left|center}}; {{{liststyle|}}}; {{{list4style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group4|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group4|}}}|left|center}}; {{{liststyle|}}}; {{{list4style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list4}}}</div></td></tr>|}}<!-- | {{{list4}}}</div></td></tr>|}}<!-- | ||
Line 40: | Line 40: | ||
--- 5th group/list --- | --- 5th group/list --- | ||
-->{{#if:{{{list5|}}}|<!-- | -->{{#if:{{{list5|}}}|<!-- | ||
− | --><tr>{{#if:{{{group5|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group5style|}}}">{{{group5}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group5|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group5style|}}}">{{{group5}}}</th>|}}<!-- |
--><td {{#if:{{{group5|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group5|}}}|left|center}}; {{{liststyle|}}}; {{{list5style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group5|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group5|}}}|left|center}}; {{{liststyle|}}}; {{{list5style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list5}}}</div></td></tr>|}}<!-- | {{{list5}}}</div></td></tr>|}}<!-- | ||
Line 46: | Line 46: | ||
--- 6th group/list --- | --- 6th group/list --- | ||
-->{{#if:{{{list6|}}}|<!-- | -->{{#if:{{{list6|}}}|<!-- | ||
− | --><tr>{{#if:{{{group6|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group6style|}}}">{{{group6}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group6|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group6style|}}}">{{{group6}}}</th>|}}<!-- |
--><td {{#if:{{{group6|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group6|}}}|left|center}}; {{{liststyle|}}}; {{{list6style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group6|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group6|}}}|left|center}}; {{{liststyle|}}}; {{{list6style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list6}}}</div></td></tr>|}}<!-- | {{{list6}}}</div></td></tr>|}}<!-- | ||
Line 52: | Line 52: | ||
--- 7th group/list --- | --- 7th group/list --- | ||
-->{{#if:{{{list7|}}}|<!-- | -->{{#if:{{{list7|}}}|<!-- | ||
− | --><tr>{{#if:{{{group7|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group7style|}}}">{{{group7}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group7|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group7style|}}}">{{{group7}}}</th>|}}<!-- |
--><td {{#if:{{{group7|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group7|}}}|left|center}}; {{{liststyle|}}}; {{{list7style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group7|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group7|}}}|left|center}}; {{{liststyle|}}}; {{{list7style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list7}}}</div></td></tr>|}}<!-- | {{{list7}}}</div></td></tr>|}}<!-- | ||
Line 58: | Line 58: | ||
--- 8th group/list --- | --- 8th group/list --- | ||
-->{{#if:{{{list8|}}}|<!-- | -->{{#if:{{{list8|}}}|<!-- | ||
− | --><tr>{{#if:{{{group8|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group8style|}}}">{{{group8}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group8|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group8style|}}}">{{{group8}}}</th>|}}<!-- |
--><td {{#if:{{{group8|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group8|}}}|left|center}}; {{{liststyle|}}}; {{{list8style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group8|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group8|}}}|left|center}}; {{{liststyle|}}}; {{{list8style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list8}}}</div></td></tr>|}}<!-- | {{{list8}}}</div></td></tr>|}}<!-- | ||
Line 64: | Line 64: | ||
--- 9th group/list --- | --- 9th group/list --- | ||
-->{{#if:{{{list9|}}}|<!-- | -->{{#if:{{{list9|}}}|<!-- | ||
− | --><tr>{{#if:{{{group9|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group9style|}}}">{{{group9}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group9|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group9style|}}}">{{{group9}}}</th>|}}<!-- |
--><td {{#if:{{{group9|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group9|}}}|left|center}}; {{{liststyle|}}}; {{{list9style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group9|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group9|}}}|left|center}}; {{{liststyle|}}}; {{{list9style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list9}}}</div></td></tr>|}}<!-- | {{{list9}}}</div></td></tr>|}}<!-- | ||
Line 70: | Line 70: | ||
--- 10th group/list --- | --- 10th group/list --- | ||
-->{{#if:{{{list10|}}}|<!-- | -->{{#if:{{{list10|}}}|<!-- | ||
− | --><tr>{{#if:{{{group10|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group10style|}}}">{{{group10}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group10|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group10style|}}}">{{{group10}}}</th>|}}<!-- |
--><td {{#if:{{{group10|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group10|}}}|left|center}}; {{{liststyle|}}}; {{{list10style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group10|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group10|}}}|left|center}}; {{{liststyle|}}}; {{{list10style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list10}}}</div></td></tr>|}}<!-- | {{{list10}}}</div></td></tr>|}}<!-- | ||
Line 76: | Line 76: | ||
--- 11th group/list --- | --- 11th group/list --- | ||
-->{{#if:{{{list11|}}}|<!-- | -->{{#if:{{{list11|}}}|<!-- | ||
− | --><tr>{{#if:{{{group11|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group11style|}}}">{{{group11}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group11|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group11style|}}}">{{{group11}}}</th>|}}<!-- |
--><td {{#if:{{{group11|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group11|}}}|left|center}}; {{{liststyle|}}}; {{{list11style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group11|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group11|}}}|left|center}}; {{{liststyle|}}}; {{{list11style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list11}}}</div></td></tr>|}}<!-- | {{{list11}}}</div></td></tr>|}}<!-- | ||
Line 82: | Line 82: | ||
--- 12th group/list --- | --- 12th group/list --- | ||
-->{{#if:{{{list12|}}}|<!-- | -->{{#if:{{{list12|}}}|<!-- | ||
− | --><tr>{{#if:{{{group12|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group12style|}}}">{{{group12}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group12|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group12style|}}}">{{{group12}}}</th>|}}<!-- |
--><td {{#if:{{{group12|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group12|}}}|left|center}}; {{{liststyle|}}}; {{{list12style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group12|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group12|}}}|left|center}}; {{{liststyle|}}}; {{{list12style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list12}}}</div></td></tr>|}}<!-- | {{{list12}}}</div></td></tr>|}}<!-- | ||
Line 88: | Line 88: | ||
--- 13th group/list --- | --- 13th group/list --- | ||
-->{{#if:{{{list13|}}}|<!-- | -->{{#if:{{{list13|}}}|<!-- | ||
− | --><tr>{{#if:{{{group13|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group13style|}}}">{{{group13}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group13|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group13style|}}}">{{{group13}}}</th>|}}<!-- |
--><td {{#if:{{{group13|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group13|}}}|left|center}}; {{{liststyle|}}}; {{{list13style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group13|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group13|}}}|left|center}}; {{{liststyle|}}}; {{{list13style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list13}}}</div></td></tr>|}}<!-- | {{{list13}}}</div></td></tr>|}}<!-- | ||
Line 94: | Line 94: | ||
--- 14th group/list --- | --- 14th group/list --- | ||
-->{{#if:{{{list14|}}}|<!-- | -->{{#if:{{{list14|}}}|<!-- | ||
− | --><tr>{{#if:{{{group14|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group14style|}}}">{{{group14}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group14|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group14style|}}}">{{{group14}}}</th>|}}<!-- |
--><td {{#if:{{{group14|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group14|}}}|left|center}}; {{{liststyle|}}}; {{{list14style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group14|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group14|}}}|left|center}}; {{{liststyle|}}}; {{{list14style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list14}}}</div></td></tr>|}}<!-- | {{{list14}}}</div></td></tr>|}}<!-- | ||
Line 100: | Line 100: | ||
--- 15th group/list --- | --- 15th group/list --- | ||
-->{{#if:{{{list15|}}}|<!-- | -->{{#if:{{{list15|}}}|<!-- | ||
− | --><tr>{{#if:{{{group15|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group15style|}}}">{{{group15}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group15|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group15style|}}}">{{{group15}}}</th>|}}<!-- |
--><td {{#if:{{{group15|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group15|}}}|left|center}}; {{{liststyle|}}}; {{{list15style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group15|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group15|}}}|left|center}}; {{{liststyle|}}}; {{{list15style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list15}}}</div></td></tr>|}}<!-- | {{{list15}}}</div></td></tr>|}}<!-- | ||
Line 106: | Line 106: | ||
--- 16th group/list --- | --- 16th group/list --- | ||
-->{{#if:{{{list16|}}}|<!-- | -->{{#if:{{{list16|}}}|<!-- | ||
− | --><tr>{{#if:{{{group16|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group16style|}}}">{{{group16}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group16|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group16style|}}}">{{{group16}}}</th>|}}<!-- |
--><td {{#if:{{{group16|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group16|}}}|left|center}}; {{{liststyle|}}}; {{{list16style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group16|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group16|}}}|left|center}}; {{{liststyle|}}}; {{{list16style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list16}}}</div></td></tr>|}}<!-- | {{{list16}}}</div></td></tr>|}}<!-- | ||
Line 112: | Line 112: | ||
--- 17th group/list --- | --- 17th group/list --- | ||
-->{{#if:{{{list17|}}}|<!-- | -->{{#if:{{{list17|}}}|<!-- | ||
− | --><tr>{{#if:{{{group17|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group17style|}}}">{{{group17}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group17|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group17style|}}}">{{{group17}}}</th>|}}<!-- |
--><td {{#if:{{{group17|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group17|}}}|left|center}}; {{{liststyle|}}}; {{{list17style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group17|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group17|}}}|left|center}}; {{{liststyle|}}}; {{{list17style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list17}}}</div></td></tr>|}}<!-- | {{{list17}}}</div></td></tr>|}}<!-- | ||
Line 118: | Line 118: | ||
--- 18th group/list --- | --- 18th group/list --- | ||
-->{{#if:{{{list18|}}}|<!-- | -->{{#if:{{{list18|}}}|<!-- | ||
− | --><tr>{{#if:{{{group18|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group18style|}}}">{{{group18}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group18|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group18style|}}}">{{{group18}}}</th>|}}<!-- |
--><td {{#if:{{{group18|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group18|}}}|left|center}}; {{{liststyle|}}}; {{{list18style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group18|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group18|}}}|left|center}}; {{{liststyle|}}}; {{{list18style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list18}}}</div></td></tr>|}}<!-- | {{{list18}}}</div></td></tr>|}}<!-- | ||
Line 124: | Line 124: | ||
--- 19th group/list --- | --- 19th group/list --- | ||
-->{{#if:{{{list19|}}}|<!-- | -->{{#if:{{{list19|}}}|<!-- | ||
− | --><tr>{{#if:{{{group19|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group19style|}}}">{{{group19}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group19|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group19style|}}}">{{{group19}}}</th>|}}<!-- |
--><td {{#if:{{{group19|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group19|}}}|left|center}}; {{{liststyle|}}}; {{{list19style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group19|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group19|}}}|left|center}}; {{{liststyle|}}}; {{{list19style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list19}}}</div></td></tr>|}}<!-- | {{{list19}}}</div></td></tr>|}}<!-- | ||
Line 130: | Line 130: | ||
--- 20th group/list --- | --- 20th group/list --- | ||
-->{{#if:{{{list20|}}}|<!-- | -->{{#if:{{{list20|}}}|<!-- | ||
− | --><tr>{{#if:{{{group20|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group20style|}}}">{{{group20}}}</th>|}}<!-- | + | --><tr style="line-height: 1.5em;">{{#if:{{{group20|}}}|<th scope="row" style="background: #ddf; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; {{{basestyle|}}}; {{{groupstyle|}}}; {{{group20style|}}}">{{{group20}}}</th>|}}<!-- |
--><td {{#if:{{{group20|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group20|}}}|left|center}}; {{{liststyle|}}}; {{{list20style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | --><td {{#if:{{{group20|}}}||colspan="2"}} style="background: transparent; padding: 0; text-align: {{#if:{{{group20|}}}|left|center}}; {{{liststyle|}}}; {{{list20style|}}}"><div style="padding: {{{listpadding|0em 0.25em}}}"> | ||
{{{list20}}}</div></td></tr>|}}<!-- | {{{list20}}}</div></td></tr>|}}<!-- | ||
Line 137: | Line 137: | ||
--- below --- | --- below --- | ||
-->{{#if:{{{below|}}}|<!-- | -->{{#if:{{{below|}}}|<!-- | ||
− | --><tr><td colspan="2" style="background: #ddf; padding: 0.25em 1em; text-align: center; {{{basestyle|}}}; {{{belowstyle|}}}"> | + | --><tr style="line-height: 1.5em;"><td colspan="2" style="background: #ddf; padding: 0.25em 1em; text-align: center; {{{basestyle|}}}; {{{belowstyle|}}}"> |
{{{below}}}</td></tr>|}}<!-- | {{{below}}}</td></tr>|}}<!-- | ||
Revision as of 09:19, 12 January 2022
(view - edit - history - purge) Documentation
This template is used for creating navigational templates (also known as navboxes).
Usage
Please remove the parameters that are left blank.
{{Navbox | name = {{subst:PAGENAME}}{{subst:null|Don't change anything on this line. It will change itself when you save.}} | title = | state = {{{state|}}} | above = | group1 = | list1 = | group2 = | list2 = | group3 = | list3 = <!-- ... (up to group30 & list30) --> | below = }}
Parameters
Setup parameters
name
— the title portion of the template's page location, i.e.[[Template:NAME HERE]]
. Required for the top-left navbar to work properly.- When creating a new navbox, you can set this parameter to
{{subst:PAGENAME}}
; this will automatically turn into the template's name when you save your changes.
- When creating a new navbox, you can set this parameter to
state
— sets the initial collapsed state. Common values includeautocollapse
,collapsed
,uncollapsed
andexpanded
. Defaults toautocollapse
. It is strongly recommended to set this parameter to{{{state|}}}
, as this allows users to change the navbox's state locally, e.g.{{Creatures|state=expanded}}
.autocollapse
— hides the content if there is another collapsible element on the page. Otherwise, it shows the content.collapsed
— hides the content.expanded
oruncollapsed
— shows the content.
navbar
— disables the navigation links on the top-left. Only acceptsoff
.border
or{{{1}}}
— accepted values aresubgroup
andchild
. See § Child navboxes.
Cells
title
— title text.above
— text between the title bar and the first group/list.groupn
(group1, group2, ... , group30) — text displayed inside a box on the left side of its list. Can be omitted. It won't display if its list is empty or undefined.listn
(list1, list2, ... , group30) — main content, usually a list of links. Unlike group, it can exist on its own; if group is omitted, the text will be centered.below
— footer text (bar below groups and lists).
Style parameters
Quotations ("") or style=
are unnecessary.
bodystyle
— CSS style for the <table> element.titlestyle
— CSS style for the title bar.basestyle
— Combination of titlestyle, abovestyle, belowstyle and groupstyle. Overwritten by titlestyle, abovestyle, belowstyle, groupstyle and groupnstyle.abovestyle
— CSS style for the above bar.belowstyle
— CSS style for the below bar.groupstyle
— CSS style for all group boxes.groupnstyle
— CSS style for a specific group box, where n denotes the group (group1style → group1, etc.).liststyle
— CSS style for all lists.listnstyle
— CSS style for a specific list, where n denotes the list (list1style → list1, etc.).listpadding
— sets the padding for lists. Default is0em 0.25em
.
Default styles
bodystyle = background: #fdfdfd; border: 1px solid #aaa; font-size: 88%; margin: 0 auto -1px; vertical-align: middle; width: 60%;
titlestyle = background: #ccccff; border: 1px solid #aaa; padding: 0.25em 1em; text-align: center;
abovestyle = background: #ddddff; padding: 0.25em 1em; text-align: center;
belowstyle = background: #ddddff; padding: 0.25em 1em; text-align: center;
groupstyle = background: #ddddff; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%;
liststyle = background: transparent; padding: 0; text-align: left/center;
A list defaults to text-align: left;
if it has a group, if not it defaults to text-align: center;
. Although lists have their padding set to 0, as shown here, the actual value is 0 0.25em;
, which is defined in each list's <div> instead.
Layout
Without above and below
{{{title}}} | |
---|---|
{{{group1}}} |
{{{list1}}} |
{{{group2}}} |
{{{list2}}} |
{{{list3}}} without {{{group3}}} | |
{{{group4}}} |
{{{list4}}} |
With above and below
{{{title}}} | |
---|---|
{{{above}}} | |
{{{group1}}} |
{{{list1}}} |
{{{group2}}} |
{{{list2}}} |
{{{list3}}} without {{{group3}}} | |
{{{group4}}} |
{{{list4}}} |
{{{below}}} |
Without groups, above and below
{{{title}}} | |
---|---|
{{{list1}}} | |
{{{list2}}} | |
{{{list3}}} | |
{{{list4}}} |
Example
{{Navbox | name = Navbox/doc | title = [[Soil]] | state = expanded | navbar = off | titlestyle = background-color: #FFFF00; | basestyle = background-color: #C0C0C0; | group1 = Topsoil | list1 = [[Loam]] • [[Loamy sand]] • [[Peat]] • [[Sandy clay loam]] • [[Sandy loam]] • [[Silt]] • [[Silt loam]] • [[Silty clay loam]] | group2style = background-color: #00FFFF; color: white; | group2 = Ocean floor | list2 = [[Calcareous ooze]] • [[Pelagic clay]] • [[Siliceous ooze]] | group3 = [[Sand]] | list3 = [[Sand (tan)]] • [[Black sand]] • [[Red sand]] • [[White sand]] • [[Yellow sand]] | group4 = Clay | list4style = border: 1px solid black; font-size: 114%; | list4 = [[Clay]] • [[Clay loam]] • [[Fire clay]] • [[Sandy clay]] • [[Silty clay]] | below = See also: [[Template:DF2014 stones|Stones]] }}
Topsoil | |
---|---|
Ocean floor | |
Sand | |
Clay | |
See also: Stones |
Usage
{{Navbox | name = {{subst:PAGENAME}} | title = Title | group1 = [optional] | list1 = {{Navbox|child ...child navbox parameters... }} ... }}
Multiple subgroups example
{{Navbox | name = Navbox/doc | title = Multiple subgroups example | state = expanded | above = Above | group1 = Group 1 | list1 = List 1 | group2 = Group 2 | list2 = {{Navbox|child | group1 = Group 2.1 | list1 = List 2.1 | list2 = List 2.2 ''without Group 2.2'' | group3 = Group 2.3 | list3 = List 2.3 }} | group3 = Group 3 | list3 = List 3 | group4 = Group 4 | list4 = {{Navbox|child | group1 = Group 4.1 | list1 = List 4.1 | group2 = Group 4.2 | list2 = {{Navbox|child | group1 = Group 4.2.1 | list1 = List 4.2.1 | group2 = Group 4.2.2 | list2 = {{Navbox|child | group1 = Group 4.2.2.1 | list1 = List 4.2.2.1 }} | group3 = Group 4.2.3 | list3 = List 4.2.3 }} | group3 = Group 4.3 | list3 = List 4.3 }} | below = Below }}
Multiple subgroups example | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Above | |||||||||||||||
Group 1 |
List 1 | ||||||||||||||
Group 2 |
| ||||||||||||||
Group 3 |
List 3 | ||||||||||||||
Group 4 |
| ||||||||||||||
Below |
Collapsible subgroups example
{{Navbox | name = Navbox/doc | title = Collapsible subgroups example | state = expanded | list1 = {{Navbox|child | title = Collapsible subgroup 1 | group1 = Group 1.1 | list1 = List 1.1 | group2 = Group 1.2 | list2 = List 1.2 }} | list2 = {{Navbox|child | title = Collapsible subgroup 2 | state = expanded | above = Above | group1 = Group 2.1 | list1 = List 2.1 | group2 = Group 2.2 | list2 = List 2.2 | below = Below }} | group3 = Group 3 | list3 = {{Navbox|child | title = Collapsible subgroup 3 | group1 = Group 3.1 | list1 = List 3.1 | group2 = Group 3.2 | list2 = List 3.2 }} }}
Collapsible subgroups example | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
| |||||||||||
Group 3 |
|