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/doc"
Jump to navigation
Jump to search
Doorkeeper (talk | contribs) m (→Layout) |
Doorkeeper (talk | contribs) |
||
Line 51: | Line 51: | ||
====Default styles==== | ====Default styles==== | ||
<syntaxhighlight lang="css"> | <syntaxhighlight lang="css"> | ||
− | bodystyle = | + | bodystyle = background: #fdfdfd; border: 1px solid #aaa; font-size: 90%; margin: 0 auto -1px; padding: 1px; vertical-align: middle; width: 60%; |
− | titlestyle = | + | titlestyle = background: #bbbbdb; border: 1px solid #aaa; padding: 0.25em 1em; text-align: center; line-height: 1.5em; |
− | abovestyle = | + | abovestyle = background: #cdcde5; padding: 0.25em 1em; text-align: center; |
− | belowstyle = | + | belowstyle = background: #cdcde5; padding: 0.25em 1em; text-align: center; |
− | groupstyle = | + | groupstyle = background: #cdcde5; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%; |
− | liststyle = | + | liststyle = background: transparent; padding: 0 0.25em; text-align: left/center; |
+ | </syntaxhighlight> | ||
− | |||
A list defaults to <code>text-align: left;</code> if it has a group, if not it defaults to <code>text-align: center;</code>. | A list defaults to <code>text-align: left;</code> if it has a group, if not it defaults to <code>text-align: center;</code>. | ||
Revision as of 01:56, 10 January 2022
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:void|Don't change anything on this line. It will change itself when you save.}} | title = | above = | below = | group1 = | list1 = | group2 = | list2 = | group3 = | list3 = <!-- ... (up to group20 & list20) --> }}
Parameters
WIP
Setup parameters
name
state
navbar
Cells
title
above
groupn
listn
below
Style parameters
bodystyle
titlestyle
basestyle
abovestyle
groupstyle
groupnstyle
liststyle
listnstyle
belowstyle
Default styles
bodystyle = background: #fdfdfd; border: 1px solid #aaa; font-size: 90%; margin: 0 auto -1px; padding: 1px; vertical-align: middle; width: 60%;
titlestyle = background: #bbbbdb; border: 1px solid #aaa; padding: 0.25em 1em; text-align: center; line-height: 1.5em;
abovestyle = background: #cdcde5; padding: 0.25em 1em; text-align: center;
belowstyle = background: #cdcde5; padding: 0.25em 1em; text-align: center;
groupstyle = background: #cdcde5; padding: 0.25em 1em; text-align: right; white-space: nowrap; width: 1%;
liststyle = background: transparent; padding: 0 0.25em; text-align: left/center;
A list defaults to text-align: left;
if it has a group, if not it defaults to text-align: center;
.
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]] | titlestyle = background-color: #c0e1d1; | basestyle = background-color: #b0cabd; | below = See also: [[Template:DF2014 stones|Stones]] | group1 = Topsoil | list1 = [[Loam]] • [[Loamy sand]] • [[Peat]] • [[Sandy clay loam]] • [[Sandy loam]] • [[Silt]] • [[Silt loam]] • [[Silty clay loam]] | 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 | list4 = [[Clay]] • [[Clay loam]] • [[Fire clay]] • [[Sandy clay]] • [[Silty clay]] }}
Topsoil | |
---|---|
Ocean floor | |
Sand | |
Clay | |
See also: Stones |
TBD