Template:Sidebox: Difference between revisions
No edit summary |
TechAngel85 (talk | contribs) mNo edit summary |
||
(88 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<div style="width: | {{TOC}}<includeonly><div class="sideBox float-lg-{{{float|right}}} text-justify" style="width:{{{width|50}}}%;"><p class="sideBoxHeader" >'''{{{title}}}'''</p><hr>{{{text}}}</div></includeonly><noinclude>__NOTOC__[[Category:Instruction Templates]][[Category:Formatting Templates]][[Category:Layout Templates]][https://stepmodifications.org/forum/topic/19102-sidebox/ '''Forum Topic'''] | ||
== Purpose & Usage == | |||
This template creates a left or right floating "sidebox." It is generally desirable to call the <code><nowiki>{{clear}}</nowiki></code> template after it to clear the float. | |||
=== Required Parameters === | |||
<span class="salmontx">'''header'''</span> - The heading or title | |||
: '''Values''' | |||
:: Default: n/a, <code>title=Title Text</code> | |||
<span class="salmontx">'''text'''</span> - The body text | |||
: '''Values''' | |||
:: Default: n/a, <code>body=body text ...</code> | |||
=== Optional Parameters === | |||
<span class="salmontx">'''width'''</span> - Sets the % width of the sidebox | |||
: '''Values''' | |||
:: Default: <code>width=50</code> | |||
:* 1-100 (always use 10%-50% ) | |||
<span class="salmontx">'''float'''</span> - Sets the direction the sidebox floats | |||
: '''Values''' | |||
:: Default: <code>float=right</code> | |||
:* left | |||
:* ''right'' | |||
== Examples == | |||
===Default Call=== | |||
The simplest call returns defaults for the template. | |||
: '''Code:''' | |||
<pre>{{Sidebox | |||
|title=This is a heading | |||
|text=This is my sidebar with as much text as I could quickly write.}} | |||
</pre> | |||
: '''Result:''' | |||
{{Sidebox | |||
|title=This is a heading | |||
|text=This is my sidebar with as much text as I could quickly write.}} | |||
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? | |||
===Optional Call=== | |||
{{Alert|text=Use <code><nowiki>{{clear}}</nowiki></code> when using this template near headings or other markup that should clear the Sidebox.}} | |||
: '''Code:''' | |||
<pre>{{Sidebox | |||
|width=75 | |||
|float=left | |||
|title=This is a heading | |||
|text=This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write.}} | |||
{{clear}}</pre> | |||
:<dt>Result:</dt> | |||
::{{Sidebox | |||
|width=75 | |||
|float=left | |||
|title=This is a heading | |||
|text=This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write.}} | |||
{{clear}} | |||
== Related Templates == | |||
<!-- | |||
*[[:RELATED TEMPLATE NAME AND ARGUMENTS]] | |||
--> | |||
None | |||
</noinclude> |
Latest revision as of 04:58, October 5, 2023
Purpose & Usage
This template creates a left or right floating "sidebox." It is generally desirable to call the {{clear}}
template after it to clear the float.
Required Parameters
header - The heading or title
- Values
- Default: n/a,
title=Title Text
- Default: n/a,
text - The body text
- Values
- Default: n/a,
body=body text ...
- Default: n/a,
Optional Parameters
width - Sets the % width of the sidebox
- Values
- Default:
width=50
- 1-100 (always use 10%-50% )
- Default:
float - Sets the direction the sidebox floats
- Values
- Default:
float=right
- left
- right
- Default:
Examples
Default Call
The simplest call returns defaults for the template.
- Code:
{{Sidebox |title=This is a heading |text=This is my sidebar with as much text as I could quickly write.}}
- Result:
This is a heading
This is my sidebar with as much text as I could quickly write.
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
Optional Call
NOTE
Use{{clear}}
when using this template near headings or other markup that should clear the Sidebox.- Code:
{{Sidebox |width=75 |float=left |title=This is a heading |text=This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write.}} {{clear}}
- Result:
This is a heading
This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write. This is my sidebar with as much text as I could quickly write.
Related Templates
None