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:Redbox: Difference between revisions

No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation}}
{{Documentation}}
<includeonly><onlyinclude>
<includeonly><onlyinclude>
{{#vardefine:width|{{{width|100%}}}}}
<div class="red-box" style="width:{{{width|95%}}}; float:{{{float|none}}}; margin:10px;">
{{#switch:{{{side|left}}}
<div class="red-top-left"><div style="color: var(--yel); text-transform: uppercase; font-size: larger; font-weight: bolder; padding-top:36px; margin-left:45px">{{{1|{{Error|{{Template|Box}} has mandatory parameters}}}}}</div></div>
| left = {{#vardefine:box|clip-path: polygon(0 0,calc({{#var:width}} - 20px) 0,{{#var:width}} 20px,{{#var:width}} calc({{#var:width}} - 20px),calc({{#var:width}} - 20px) {{#var:width}},0 {{#var:width}}); postition: absolute; left: -50 px;}}
<div class="red-top-mid"></div>
| right = {{#vardefine:box|clip-path: polygon(0 20px,20px 0,{{#var:width}} 0,{{#var:width}} {{#var:width}},20px {{#var:width}},0 calc({{#var:width}} - 20px));}}
<div class="red-top-right"></div>
}}
<div class="red-mid-left"></div>
<div style="border: 10px solid black; background-color: black; {{#var:box}}; float:{{{side|left}}}; padding-bottom: 5px;">
<div class="red-mid-mid"><div style="color: white; margin-left:30px;">{{{2|{{:{{FULLPAGENAME}}/{{{1}}}}}}}}</div></div>
<div style="border: 10px solid var(--red); {{#var:box}}; margin-right: 5px; padding-right: 5px; ">
<div class="red-mid-right"></div>
<div style="color: var(--yel); background-color: var(--red); text-transform: uppercase; font-size: larger; width: 100%;box-shadow: 10px">{{{1|{{Error|{{Template|Box}} has mandatory parameters}}}}}</div>
<div class="red-bot-left"></div>
<div style="color: white; background-color: var(--red); width: 90%; padding-right:20px; margin-bottom: 15px; padding: 0px 15px 10px 0px;"><div style="width: 90%">{{#if:{{{2|}}}||&nbsp;{{Edit|{{FULLPAGENAME}}/{{{1}}}}}}}{{{2|{{:{{FULLPAGENAME}}/{{{1}}}}}}}}</div></div>
<div class="red-bot-mid"></div>
<div class="red-bot-right"></div>
</div>
</div>
</onlyinclude></includeonly>
</onlyinclude></includeonly>

Latest revision as of 06:22, 19 November 2023

Template:Redbox

Template:Redbox is used to create styled text and image 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 a subpage of the article, using the header as the subpage name.

It also accepts two optional named parameters:

  • width accepts Xpx or X%, and controls the width of the box. If undefined, the box has 10% margins left and right.
  • 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.

Return

{{{Redbox|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.
{{Redbox|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.

The documentation above was transcluded from Template:Redbox/Documentation.