This is a documentation for Board Game Arena: play board games online !
Template:Option: Difference between revisions
Jump to navigation
Jump to search
Sammy McSam (talk | contribs) No edit summary |
Sammy McSam (talk | contribs) (sub-option) |
||
Line 1: | Line 1: | ||
<div title="{{{d|default}}} option" class="mw-collapsible mw-{{{st|}}}" style="display:inline-flex;flex-flow:column nowrap;margin:1rem | <div title="{{{d|default}}} option" class="mw-collapsible mw-{{{st|}}}" style="display:inline-flex;flex-flow:column nowrap;margin-top:1rem;min-width:250px;font-family:Roboto,Arial,sans-serif;color:rgb(78 78 78);"><div class="mw-collapsible-toggle" style="display:flex;align-items:center;width:100%;padding:8px;border-radius:5px;box-shadow:rgb(0 0 0/25%) 2px 2px 5px 0;background:linear-gradient(#f0f0f0,#f3f3f3 30%,#ebebeb);font-weight:700;"><div style="width:24px;height:24px;margin-right:1rem;border-radius:5px;{{{s|b}}}ackground:#66DF00;box-shadow:inset rgb(0 0 0 /40%) 1px 1px 5px,rgb(0 0 0 /10%) 0 0 1px;"></div><div style="flex:1 1 0;font-size:1rem;">{{{1|Option}}}</div><div style="display:flex;width:11px;height:11px;border-radius:50%;{{{d|b}}}ackground:rgb(211 211 211);"></div></div><div class="mw-collapsible-content" style="display:none;display:fle{{{h|x}}};width:100%;padding:0.25rem 0.5rem 0.5rem 0.5rem;border-radius:0 0 5px 5px;background:linear-gradient(180deg,rgb(224,223,222),rgb(243,243,243) 15px);">{{{2|​}}}</div><div style="display:flex;flex-flow:column wrap;width:calc(100% - 1.5rem);padding-left:1.5rem;">{{{3|​}}}</div></div><noinclude> | ||
== Examples == | == Examples == | ||
{{option|d=|Selected and non-default| | {{option|d=|Selected and non-default|Option description| | ||
{{option|Selected and default|Sub-option 1 description| | |||
{{option|s=|Deselected and default|Sub-option 2 description}} | |||
}} | |||
}} | }} | ||
<code><nowiki>{{</nowiki>option|d=|Selected and non-default|Description of the option| | |||
<nowiki>{{</nowiki>option|Sub-option 1 selected and default|Sub-option description| | |||
<nowiki>{{</nowiki>option|s=|Sub-option 2 deselected and default|Sub-option description<nowiki>}}</nowiki> | |||
<nowiki>}}</nowiki> | |||
{{option| | <nowiki>}}</nowiki></code> | ||
---- | |||
{{option|s=|h=|Deselected, default and hidden description}} | |||
<code><nowiki>{{option|s=|h=| | |||
}} | Deselected, default and hidden description}}</nowiki></code> | ||
== Parameters == | == Parameters == | ||
Line 37: | Line 39: | ||
<div><code><nowiki>{{option|Value|Description}}</nowiki></code></div> | <div><code><nowiki>{{option|Value|Description}}</nowiki></code></div> | ||
<div>'''''Optional:''''' specify a text description.</div> | <div>'''''Optional:''''' specify a text description.</div> | ||
<div><code>3</code></div> | |||
<div><code>sub-option</code></div> | |||
<div><code>&ZeroWidthSpace;</code></div> | |||
<div><code><nowiki>{{option|Value|Description|Sub-option}}</nowiki></code></div> | |||
<div>'''''Optional:''''' specify an indented sub-option.</div> | |||
<div><code>s</code></div> | <div><code>s</code></div> | ||
<div><code>selected</code></div> | <div><code>selected</code></div> | ||
Line 47: | Line 54: | ||
<div><code><nowiki>{{option|d=}}</nowiki></code></div> | <div><code><nowiki>{{option|d=}}</nowiki></code></div> | ||
<div>'''''Optional:''''' hide default marker.</div> | <div>'''''Optional:''''' hide default marker.</div> | ||
<div><code>h</code></div> | <div><code>h</code></div> | ||
<div><code>hide</code></div> | <div><code>hide</code></div> |
Revision as of 16:01, 26 February 2024
Option
Examples
Selected and non-default
Selected and default
Deselected and default
{{option|d=|Selected and non-default|Description of the option|
{{option|Sub-option 1 selected and default|Sub-option description|
{{option|s=|Sub-option 2 deselected and default|Sub-option description}}
}}
}}
Deselected, default and hidden description
{{option|s=|h=|
Deselected, default and hidden description}}
Parameters
Id
Name
Default value
Example
Description
1
value
Option
{{option|Value}}
Required: specify a text value.
2
description
​
{{option|Value|Description}}
Optional: specify a text description.
3
sub-option
​
{{option|Value|Description|Sub-option}}
Optional: specify an indented sub-option.
s
selected
n/a
{{option|s=}}
Optional: hide checkbox color.
d
default
n/a
{{option|d=}}
Optional: hide default marker.
h
hide
x
{{option|h=}}
Optional: hide the description.
st
state
null
{{option|st=collapsed}}
Optional: collapse description by default.