User:Wlgrin/Sandbox/TDoc

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Documentationview · edit · history · purge ]
This documentation is transcluded from User:Wlgrin/Sandbox/TDoc/doc.

{{TDoc}} is a small collection of templates that can be used to lay out the documentation of other templates. This is useful to developers of templates interested in documenting their work.

Purpose[edit]

{{TDoc}} is not a template but, rather, a small collection of helper templates that can be used when writing the documentation of other templates.

Contents[edit]

This section gives a brief overview of the templates included in the collection.

  • All callable templates are in sub-pages of sub-page “/i” of {{TDoc}}.
  • For more information about any particular template, please refer to its individual documentation page.

{{TDoc/i/Doc header}} and {{TDoc/i/Doc footer}}[edit]

These templates provide basic styling for documentation pages within the box produced by the {{Documentation}} template. To take effect, {{TDoc/i/Doc header}} should be placed at the top of the documentation page and {{TDoc/i/Doc footer}}.

This includes:

  • Painting the background white.
  • Limiting the length of lines to 50 ems, to make the text easier to read.

{{TDoc/i/Detail}}[edit]

Intended for text that provides additional but unessential information, this template produces a text box, shifted to the right, containing text with reduced font size.

For example:

Ecce autem Inachiis sese referebat ab Argis saeua Iouis coniunx aurasque inuecta tenebat, et laetum Aenean classemque ex aethere longe Dardaniam Siculo prospexit ab usque Pachyno. moliri iam tecta uidet, iam fidere terrae, deseruisse rates: stetit acri fixa dolore.
Sometimes, one might want to clarify a point or provide some background about the topic at hand. That type of information will be of interest to the more curious reader, but it may be skipped without impairing overall comprehension of the topic.
Sic memorat; simul Aenean in regia ducit tecta, simul divom templis indicit honorem. Nec minus interea sociis ad litora mittit viginti tauros, magnorum horrentia centum terga suum, pinguis centum cum matribus agnos, munera laetitiamque dii.

{{TDoc/i/Filler}}[edit]

This template provides samples of filler text, in various lengths and types.

For example:

Abcd efghijk lmnopqrstu vwxyz abcd efghijk lmnopqrstu vwxyz abcd efghijk lmnopqrstu vwxyz abcd efghijk lmnopqrstu vwxyz.

Ecce autem Inachiis sese referebat ab Argis saeua Iouis coniunx aurasque inuecta tenebat, et laetum Aenean classemque ex aethere longe Dardaniam Siculo prospexit ab usque Pachyno. moliri iam tecta uidet, iam fidere terrae, deseruisse rates: stetit acri fixa dolore.

{{TDoc/i/Sample output}}[edit]

Intended for illustrative runs of templates, this template produces a text box reminiscent of a top of page. Optionally, it frames the supplied content with filler paragraphs. The view can be scaled up or down.

For example:

Ecce autem Inachiis sese referebat ab Argis saeua Iouis coniunx aurasque inuecta tenebat, et laetum Aenean classemque ex aethere longe Dardaniam Siculo prospexit ab usque Pachyno. moliri iam tecta uidet, iam fidere terrae, deseruisse rates: stetit acri fixa dolore.
Sometimes, one might want to clarify a point or provide some background about the topic at hand. That type of information will be of interest to the more curious reader, but it may be skipped without impairing overall comprehension of the topic.
Sic memorat; simul Aenean in regia ducit tecta, simul divom templis indicit honorem. Nec minus interea sociis ad litora mittit viginti tauros, magnorum horrentia centum terga suum, pinguis centum cum matribus agnos, munera laetitiamque dii.
Ecce autem Inachiis sese referebat ab Argis saeua Iouis coniunx aurasque inuecta tenebat, et laetum Aenean classemque ex aethere longe Dardaniam Siculo prospexit ab usque Pachyno. moliri iam tecta uidet, iam fidere terrae, deseruisse rates: stetit acri fixa dolore.
Sometimes, one might want to clarify a point or provide some background about the topic at hand. That type of information will be of interest to the more curious reader, but it may be skipped without impairing overall comprehension of the topic.
Sic memorat; simul Aenean in regia ducit tecta, simul divom templis indicit honorem. Nec minus interea sociis ad litora mittit viginti tauros, magnorum horrentia centum terga suum, pinguis centum cum matribus agnos, munera laetitiamque dii.
Ecce autem Inachiis sese referebat ab Argis saeua Iouis coniunx aurasque inuecta tenebat, et laetum Aenean classemque ex aethere longe Dardaniam Siculo prospexit ab usque Pachyno. moliri iam tecta uidet, iam fidere terrae, deseruisse rates: stetit acri fixa dolore.
Sometimes, one might want to clarify a point or provide some background about the topic at hand. That type of information will be of interest to the more curious reader, but it may be skipped without impairing overall comprehension of the topic.
Sic memorat; simul Aenean in regia ducit tecta, simul divom templis indicit honorem. Nec minus interea sociis ad litora mittit viginti tauros, magnorum horrentia centum terga suum, pinguis centum cum matribus agnos, munera laetitiamque dii.

{{TDoc/i/Sample code}}[edit]

Intended for code samples that illustrate how to use a template, this template produces a collapsible table, collapsed by default to reduce visual clutter on documentation pages. It is designed to be used immediately after a call to {{TDoc/i/Sample output}} to show how the sample output was obtained.

For example:

Ecce autem Inachiis sese referebat ab Argis saeua Iouis coniunx aurasque inuecta tenebat, et laetum Aenean classemque ex aethere longe Dardaniam Siculo prospexit ab usque Pachyno. moliri iam tecta uidet, iam fidere terrae, deseruisse rates: stetit acri fixa dolore.
Sometimes, one might want to clarify a point or provide some background about the topic at hand. That type of information will be of interest to the more curious reader, but it may be skipped without impairing overall comprehension of the topic.
Sic memorat; simul Aenean in regia ducit tecta, simul divom templis indicit honorem. Nec minus interea sociis ad litora mittit viginti tauros, magnorum horrentia centum terga suum, pinguis centum cum matribus agnos, munera laetitiamque dii.

{{TDoc/i/Parameter}}[edit]

This template formats information about a template parameter.

For example (size reduced):

parameter-name
This is the basic description of the parameter.
More information can be included to cover the details of what the parameter does, how to use it, how not to abuse it, and more.
Optional. Default value: fallback (If no default-value is supplied, the parameter is marked as required.)
Examples
  1. |parameter-name=Some value that is meaningful in the <span style="font-weight:bold;">[[en:Context (computing)|context]]</span> at hand.
    The sample code must be in a <syntaxhighlight> (or <nowiki>) element to prevent execution.
  2. |parameter-name=Some other interesting case
  3. |parameter-name=Yet something else
    Up to 9 examples can be provided.