Template:Shipwreck list toc/doc
This is a documentation subpage for Template:Shipwreck list toc. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
[edit]Creates a table of contents in grid form specifically for the list of shipwrecks lists. Those lists are collected in Category:Lists of shipwrecks by year. Because the template uses the magic word {{PAGENAME}}
it cannot be used here a an example. This example is derived from the template's underlying code:
2010 | |||
---|---|---|---|
Jan | Feb | Mar | Apr |
May | Jun | Jul | Aug |
Sep | Oct | Nov | Dec |
In the actual template, each month is linked to a matching section heading.
The template takes one optional parameter. Some shipwreck lists have a section, usually the last section, under a level 2 heading named 'Unknown date'. Individual month sections may also have 'Unknown date' sections under level 3 headings. Use |ud=
to include the 'Unknown date' link in the TOC. When there is only one heading, set |ud=y
; when more than one 'Unknown date' heading, count the number of 'Unknown date' headings and set |ud=
to the number of the one heading that is the target. For example, if there are three 'Unknown date' headings, one each in May and October, and the third is the level 2 heading at the end of the list, set |ud=3
. The result should look like this (with links):
2010 | |||
---|---|---|---|
Jan | Feb | Mar | Apr |
May | Jun | Jul | Aug |
Sep | Oct | Nov | Dec |
Unknown date |
technical details
[edit]This template includes a table caption (|+
using wikimarkup; <caption>...</caption>
using html markup) for accessibility. The caption is hidden from sighted readers by setting the element's opacity to 0. Because the caption is still present but hidden, the excess blank space between the bottom of the preceding text and the top of the TOC table is reduced by setting the table's top margin to -1.5em
.