Template:Compare: Difference between revisions
Jump to navigation
Jump to search
MDFW>SungHerSong m (Text replacement - "includeonly" to "onlyinclude") |
No edit summary |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude><table class=" | <onlyinclude><table class="TwoWorldsWiki" width="{{{width|}}}" style="text-align: center; margin-left: auto; margin-right: auto;"> | ||
{{#if: {{{title|}}} | <caption>{{{title}}}</caption> | }} | {{#if: {{{title|}}} | <caption>{{{title}}}</caption> | }} | ||
<tr><th {{#switch: {{{mode|horizontal}}} | vertical1 = | vertical2 = width="20%" | #default = width="50%"}} > {{#if: {{{leftt|}}} | {{{leftt}}} | Prototype }}</th> | <tr><th {{#switch: {{{mode|horizontal}}} | vertical1 = | vertical2 = width="20%" | #default = width="50%"}} > {{#if: {{{leftt|}}} | {{{leftt}}} | Prototype }}</th> | ||
Line 35: | Line 35: | ||
You can use <tt>leftt</tt> and <tt>rightt</tt> to change the titles of the two boxes, <tt>title</tt> to give it a caption, and <tt>width</tt> to specify the overall width. | You can use <tt>leftt</tt> and <tt>rightt</tt> to change the titles of the two boxes, <tt>title</tt> to give it a caption, and <tt>width</tt> to specify the overall width. | ||
== Layout options == | ==Layout options== | ||
Default horizontal layout ''horizontal'': (with and without caption, and with changed width respectively) | Default horizontal layout ''horizontal'': (with and without caption, and with changed width respectively) | ||
Line 52: | Line 52: | ||
{{compare|mode=vertical2|width=800}} | {{compare|mode=vertical2|width=800}} | ||
== Alignment options == | ==Alignment options== | ||
''Left'' alignment: | ''Left'' alignment: | ||
Line 70: | Line 70: | ||
''Top'' vertical alignment: | ''Top'' vertical alignment: | ||
{{compare|valign=top|right=[[File: | {{compare|valign=top|right=[[File:Two Worlds Logo.png|240px]]}} | ||
''Bottom'' vertical alignment: | ''Bottom'' vertical alignment: | ||
{{compare|valign=bottom|right=[[File: | {{compare|valign=bottom|right=[[File:Two Worlds Logo.png|240px]]}} | ||
Default ''middle'' vertical alignment: | Default ''middle'' vertical alignment: | ||
{{compare|valign=middle|right=[[File: | {{compare|valign=middle|right=[[File:Two Worlds Logo.png|240px]]}} | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 10:22, January 29, 2024
Prototype | Final |
---|---|
{{{left}}} | {{{right}}} |
Overview[edit source]
Compare is used for comparisons.
Syntax:
{{compare | width = Specify the total width of the comparison table. Each side will use a different percentage of this based on the mode set. | title = Caption for the whole table (optional, defaults to blank) | leftt = Title of left column (this line is optional, defaults to "Prototype") | rightt = Title of right column (this is also optional, defaults to "Final") | left = Content of the left box | right = Content of the right box | mode = ''mode'' can be set to the following: - ''horizontal'' for horizontal display. This is the standard display and ''mode'' need not be set explicitly to this. - ''vertical1'' for vertical layout where Prototype is on top of Final version and the pictures below their description boxes. - ''vertical2'' for vertical layout where Prototype is on top of Final version and the pictures next to their description boxes. | align = If set, inline elements (text, img etc.) in content cells will be aligned to this value. It defaults to '''center''' if not set. Common values are '''left''' and '''right'''. | valign = The same as align, but for aligning elements vertically. It defaults to '''middle''' if not set. Common values are '''top''' and '''bottom'''. Pointless with the vertical layout options. }}
You can use leftt and rightt to change the titles of the two boxes, title to give it a caption, and width to specify the overall width.
Layout options[edit source]
Default horizontal layout horizontal: (with and without caption, and with changed width respectively)
Prototype | Final |
---|---|
{{{left}}} | {{{right}}} |
Prototype | Final |
---|---|
{{{left}}} | {{{right}}} |
Prototype | Final |
---|---|
{{{left}}} | {{{right}}} |
Alternative vertical layout vertical1: (with and without caption, and with changed width respectively)
Prototype |
---|
{{{left}}} |
Final |
{{{right}}} |
Prototype |
---|
{{{left}}} |
Final |
{{{right}}} |
Prototype |
---|
{{{left}}} |
Final |
{{{right}}} |
Alternative vertical layout vertical2: (with and without caption, and with changed width respectively)
Prototype | {{{left}}} |
---|---|
Final | {{{right}}} |
Prototype | {{{left}}} |
---|---|
Final | {{{right}}} |
Prototype | {{{left}}} |
---|---|
Final | {{{right}}} |
Alignment options[edit source]
Left alignment:
Prototype | Final |
---|---|
{{{left}}} | {{{right}}} |
Prototype |
---|
{{{left}}} |
Final |
{{{right}}} |
Prototype | {{{left}}} |
---|---|
Final | {{{right}}} |
Right alignment:
Prototype | Final |
---|---|
{{{left}}} | {{{right}}} |
Prototype |
---|
{{{left}}} |
Final |
{{{right}}} |
Prototype | {{{left}}} |
---|---|
Final | {{{right}}} |
Default center alignment:
Prototype | Final |
---|---|
{{{left}}} | {{{right}}} |
Prototype |
---|
{{{left}}} |
Final |
{{{right}}} |
Prototype | {{{left}}} |
---|---|
Final | {{{right}}} |
Top vertical alignment:
Prototype | Final |
---|---|
{{{left}}} | ![]() |
Bottom vertical alignment:
Prototype | Final |
---|---|
{{{left}}} | ![]() |
Default middle vertical alignment:
Prototype | Final |
---|---|
{{{left}}} | ![]() |