Jump to content

Template:Aside: Difference between revisions

m
Finish template.
(Replacing the very clunky 'infobox' template.)
 
m (Finish template.)
Line 1: Line 1:
<includeonly><onlyinclude><div style="float: {{{float|right}}}; clear: {{{float|right}}}; background-color: rgba(0, 0, 0, 0.05); border: 2px solid rgba(0, 0, 0, 0.15); padding: 1em; font-size: 95%;"><div style="font-weight: bold; text-align: center; font-size: initial;">{{{2|}}}</div>{{{1}}}</div></onlyinclude></includeonly>
<includeonly><onlyinclude><div style="max-width: min(100vw, 360px + 2em); float: {{{float|right}}}; clear: {{{float|right}}}; background-color: #{{{color|888888}}}22; border: 2px solid #{{{color|888888}}}44; padding: 1em; font-size: 95%;"><div style="font-weight: bold; text-align: center; font-size: initial;">{{{2|}}}</div>{{{1}}}</div></onlyinclude></includeonly>


== Usage ==
== Usage ==
<code><nowiki>{{Aside | <content> | <heading> | float = left }}</nowiki></code>
This template sets its content to one side of the article in a colorable box.
 
<code><nowiki>{{Aside | <content> | <heading> | color = RRGGBB | float = left }}</nowiki></code>
 
Only <code>content</code> is required. All other parameters are optional.


=== Examples ===
=== Examples ===
Line 13: Line 17:


==== Optional Parameters ====
==== Optional Parameters ====
<code><nowiki>{{Aside|This is some test text.|Test Heading|float=left}}</nowiki></code>
<code><nowiki>{{Aside|Lorem ipsum...|Test Heading|color=00AA44|float=left}}</nowiki></code>
----
----
{{Aside|This is some test text.|Test Heading|float=left}}
{{Aside|Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Sociis natoque penatibus et magnis.|Test Heading|float=left|color=00AA44|float=left}}