Difference between revisions of "Template:Navbox"

From comp.tf
Jump to navigation Jump to search
(Applying styles)
Line 1: Line 1:
{| class="mw-collapsible {{#if:{{{collapsed|}}} | mw-collapsed |}}" style="font-size: 11px; background: #f9f9f9; border: 1px solid #ccc; width: 100%;"
+
{| class="mw-collapsible {{#if:{{{collapsed|}}} | mw-collapsed |}} navbox"
 
|-
 
|-
! colspan=2 style="background: #1c1c1c; font-size: 12px;" | {{#if:{{{templatename|}}}|<span style="float: left; margin-left: 5px; font-size: 9px; font-weight: normal; color: #fff;">[[Template:{{{templatename}}}|<span style="color: #fff">v</span>]] &middot; [[Template talk:{{{templatename}}}|<span style="color: #fff">d</span>]] &middot; <span class="plainlinks">[{{fullurl:Template:{{{templatename}}}|action=edit}} <span style="color: #fff">e</span>]</span></span>|}}<span style="color: #fff">{{{title}}}</span>
+
! {{#if:{{{templatename|}}}|<span class="controls">[[Template:{{{templatename}}}|v]] &middot; [[Template talk:{{{templatename}}}|d]] &middot; <span class="plainlinks">[{{fullurl:Template:{{{templatename}}}|action=edit}} e]</span></span>|}}{{{title}}}
 
|-
 
|-
 
{{#if:{{{group1|}}} |
 
{{#if:{{{group1|}}} |
{{!}} style="width: 8em; text-align: right; background: #d9d9d9; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group1}}}'''
+
{{!}} class="group" {{!}} '''{{{group1}}}'''
{{!}} style="background: #fdfdfd;" {{!}} {{{list1}}}
+
{{!}} class="row1" {{!}} {{{list1}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group2|}}} |
 
{{#if:{{{group2|}}} |
{{!}} style="width: 8em; text-align: right; background: #d9d9d9; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group2}}}'''
+
{{!}} class="group" {{!}} '''{{{group2}}}'''
 
{{!}} {{{list2}}}
 
{{!}} {{{list2}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group3|}}} |
 
{{#if:{{{group3|}}} |
{{!}} style="width: 8em; text-align: right; background: #d9d9d9; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group3}}}'''
+
{{!}} class="group" {{!}} '''{{{group3}}}'''
{{!}} style="background: #fdfdfd;" {{!}} {{{list3}}}
+
{{!}} class="row1" {{!}} {{{list3}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group4|}}} |
 
{{#if:{{{group4|}}} |
{{!}} style="width: 8em; text-align: right; background: #d9d9d9; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group4}}}'''
+
{{!}} class="group" {{!}} '''{{{group4}}}'''
 
{{!}} {{{list4}}}
 
{{!}} {{{list4}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group5|}}} |
 
{{#if:{{{group5|}}} |
{{!}} style="width: 8em; text-align: right; background: #d9d9d9; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group5}}}'''
+
{{!}} class="group" {{!}} '''{{{group5}}}'''
{{!}} style="background: #fdfdfd;" {{!}} {{{list5}}}
+
{{!}} class="row1" {{!}} {{{list5}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group6|}}} |
 
{{#if:{{{group6|}}} |
{{!}} style="width: 8em; text-align: right; background: #d9d9d9; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group6}}}'''
+
{{!}} class="group" {{!}} '''{{{group6}}}'''
 
{{!}} {{{list6}}}
 
{{!}} {{{list6}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group7|}}} |
 
{{#if:{{{group7|}}} |
{{!}} style="width: 8em; text-align: right; background: #d9d9d9; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group7}}}'''
+
{{!}} class="group" {{!}} '''{{{group7}}}'''
{{!}} style="background: #fdfdfd;" {{!}} {{{list7}}}
+
{{!}} class="row1" {{!}} {{{list7}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group8|}}} |
 
{{#if:{{{group8|}}} |
{{!}} style="width: 8em; text-align: right; background: #d9d9d9; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group8}}}'''
+
{{!}} class="group" {{!}} '''{{{group8}}}'''
 
{{!}} {{{list8}}}
 
{{!}} {{{list8}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group9|}}} |
 
{{#if:{{{group9|}}} |
{{!}} style="width: 8em; text-align: right; background: #d9d9d9; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group9}}}'''
+
{{!}} class="group" {{!}} '''{{{group9}}}'''
{{!}} style="background: #fdfdfd;" {{!}} {{{list9}}}
+
{{!}} class="row1" {{!}} {{{list9}}}
 
|}}
 
|}}
 
|-
 
|-
 
{{#if:{{{group10|}}} |
 
{{#if:{{{group10|}}} |
{{!}} style="width: 8em; text-align: right; background: #d9d9d9; padding-left: 11.25px; padding-right: 11.25px; " {{!}} '''{{{group10}}}'''
+
{{!}} class="group" {{!}} '''{{{group10}}}'''
 
{{!}} {{{list10}}}
 
{{!}} {{{list10}}}
 
|}}
 
|}}

Revision as of 09:19, 31 July 2013

Usage

This template creates a navigation box, same as the ones on other wikis. This template should not be used directly on pages, but it should be used to create other templates. These are linked on pages to prevent redundancy.

Syntax:

{{Navbox
| templatename = Maps navbox //This is the name of the sub-template page you'll be creating, without the Template: prefix.
| collapsed = true //Omitting this parameter completely will leave the navbox uncollapsed.
| title = [[Maplist|<span style="color: #fff">List of maps played in competitive TF2</span>]]
| group1 = [[5CP]]
| list1 = [[cp_badlands|Badlands]] · [[cp_granary|Granary]]
...
}}

will yield