Anonymous
×
Create a new article
Write your page title here:
We currently have 55 articles on SR5 Foundry VTT System Wiki. Type your article name above or click on one of the titles below and start writing!



SR5 Foundry VTT System Wiki

Template:Whitebox/Documentation: Difference between revisions

(Created page with "<includeonly><!--Template Subcategories--></includeonly> <!--Template Description--> ==Usage== <!--Parameters and such go here.--> ==Returns== <!--Examples go here.-->")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!--Template Subcategories--></includeonly>
<includeonly>[[Category:Box Template]]</includeonly>
<!--Template Description-->
{{Template|Whitebox}} is used to create formatted text boxes.
==Usage==
==Usage==
<!--Parameters and such go here.-->
It accepts one {{Parameter|mandatory|string}} and one {{Parameter|optional|string}}.
==Returns==
* {{Code|1}} is the name of the article and the header for the text box.
<!--Examples go here.-->
* {{Code|2}}, if supplied, is the contents of the text box. If not supplied, the contents is transcluded from page in the Stub namespace with a name matching the header of the article. It also uses {{Template|Edit}} to add a link to directly edit the stub article.
It also accepts two {{Parameter|optional|named}}s:
* {{Code|width}} accepts {{Code|Xpx}} or {{Code|X%}}, and controls the width of the box to a minimum of 300px.
* {{Code|float}} accepts {{Code|left}}, {{Code|right}}, or {{code|clear}}.
** If {{Code|left}} or {{Code|right}}, the box is floated to the selected side of the screen and the margins and padding are setup coorespondingly.
** If {{code|clear}}, the box is arranged clear of all content, above and below.
==Return==
{{Code|<nowiki>{{{Whitebox|Lorem Ipsum|{{Lorem Ipsum|2}}}}</nowiki>}} returns: {{Return| {{Whitebox|Lorem Ipsum|{{Lorem Ipsum|2}}}}}}
 
{{Code|<nowiki>{{Whitebox|Sample}}</nowiki>}} returns: {{Return|{{Whitebox|Sample}}}}
 
No examples are included for {{code|float}}, as they don't appear correctly inside {{Template|Return}}.

Latest revision as of 16:37, 28 November 2023

Template:Whitebox is used to create formatted text boxes.

Usage

It accepts one mandatory string parameter and one optional string parameter.

  • 1 is the name of the article and the header for the text box.
  • 2, if supplied, is the contents of the text box. If not supplied, the contents is transcluded from page in the Stub namespace with a name matching the header of the article. It also uses Template:Edit to add a link to directly edit the stub article.

It also accepts two optional named parameters:

  • width accepts Xpx or X%, and controls the width of the box to a minimum of 300px.
  • float accepts left, right, or clear.
    • If left or right, the box is floated to the selected side of the screen and the margins and padding are setup coorespondingly.
    • If clear, the box is arranged clear of all content, above and below.

Return

{{{Whitebox|Lorem Ipsum|{{Lorem Ipsum|2}}}} returns:

Lorem Ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis quis metus nunc. Fusce est libero, interdum vel iaculis et, blandit quis odio. Integer ac magna nunc. In quis libero purus. Praesent mattis eget justo in efficitur. Aenean tempor congue dictum. Mauris hendrerit nunc a auctor dictum.

{{Whitebox|Sample}} returns:

Sample
This page intentionally left blank... or something.

No examples are included for float, as they don't appear correctly inside Template:Return.