TenthFleet:Navbox construction

From TenthFleet
Revision as of 02:34, 17 July 2026 by MDGarcia (talk | contribs) (Create editor documentation page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This page explains how the wiki's navigation boxes are built. A navbox is the collapsible bar of links you see at the foot of related pages, such as the one below this text.

The wiki's navboxes share one dark style, called tf-anav. The Awards navbox and the Editor documentation navbox are both built this way.

The pattern

A navbox is a table with the tf-anav class, plus mw-collapsible so readers can hide it. The stylesheet is shared: a navbox pulls it in with <templatestyles src="Awards/styles.css" />.

The rows use three roles:

Class Role
tf-anav-title A gold banner heading, spanning the full width.
tf-anav-group The label on the left of a row, such as "Orders".
tf-anav-list The links on the right of a row.
tf-anav-exit A steel-blue banner for a link that leaves this topic, such as a portal.

A minimal example

<templatestyles src="Awards/styles.css" />
{| class="tf-anav mw-collapsible"
|-
! class="tf-anav-title" colspan=2 | [[Some hub page|My Topic]]
|-
| class="tf-anav-group" | Group one
| class="tf-anav-list" | [[Page A]] · [[Page B]] · [[Page C]]
|}

Separate the links with &middot;, which shows as a small dot.

The hide button appears on its own
Adding mw-collapsible is all you need for the show and hide button. The software adds the button when the page loads, so it only appears in a real browser, not in a preview of the raw template.

Putting a navbox on pages

Once the template exists, add its name in double braces at the foot of each related page, above the categories. Every documentation page, for instance, ends with the Editor documentation navbox.


Tenth Fleet Wiki — Editor Documentation
Start here Contributor's guide · Introduction · Be bold · Editing basics
Style & layout Manual of Style · Guide to layout · Naming conventions · Namespaces · Citing sources
Building content Peerage page · Award page · Ship page · Echelon page · Order · News item
Templates Template guide
Deep dives Styling & theme · Infoboxes · Navboxes · Dynamic lists (DPL) · Supersession · Categories
Policies & Guidelines