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) No edit summary |
||
Line 1: | Line 1: | ||
<div title=" | <div title="option" class="mw-collapsible" style="display:inline-flex;flex-flow:column nowrap;margin:1rem 1.5rem 0 0;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="{{{ds|d}}}{{{s|i}}}splay:none;margin-right:8px;width:24px;height:24px;border-radius:5px;background:#66DF00;{{{s|b}}}ackground:none;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;margin-left:0.5rem;font-size:1rem;">{{{1|Option}}}</div><div style="{{{df|d}}}isplay:none;width:11px;height:11px;border-radius:50%;background:rgb(211 211 211);"></div></div><div class="mw-collapsible-content" style="{{{dd|d}}}isplay:none;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:100%;padding-left:1.5rem;">{{{3|}}}</div></div><noinclude> | ||
== | == Example == | ||
{{option| | {{option|s=|dd=|Selected and description|Option description| | ||
{{option|Selected and default| | {{option|s=|df=|Selected and default|| | ||
{{option| | {{option|ds=|df=|dd=|Deselected, default and description|Sub-option description}} | ||
}} | }} | ||
}} | }} | ||
<code><nowiki>{{</nowiki>option| | <code><nowiki>{{</nowiki>option|s=|dd=|Selected and description|Option description| | ||
<nowiki>{{</nowiki>option| | <nowiki>{{</nowiki>option|s=|df=|Selected and default|| | ||
<nowiki>{{</nowiki>option| | <nowiki>{{</nowiki>option|ds=|df=|dd=|Deselected, default and description|Sub-option description<nowiki>}}</nowiki> | ||
<nowiki>}}</nowiki> | <nowiki>}}</nowiki> | ||
<nowiki>}}</nowiki></code> | <nowiki>}}</nowiki></code> | ||
== Parameters == | == Parameters == | ||
<div style="display:grid;grid-template-columns:2rem | <div style="display:grid;grid-template-columns:2rem auto 6rem auto auto;gap:0.5rem;overflow:auto;text-overflow:ellipsis;"> | ||
<div style="font-weight:bold;width:8rem;">Id</div> | <div style="font-weight:bold;width:8rem;">Id</div> | ||
<div style="font-weight:bold;width:8rem;">Name</div> | <div style="font-weight:bold;width:8rem;">Name</div> | ||
Line 43: | Line 39: | ||
<div><code>null</code></div> | <div><code>null</code></div> | ||
<div><code><nowiki>{{option|Value|Description|Sub-option}}</nowiki></code></div> | <div><code><nowiki>{{option|Value|Description|Sub-option}}</nowiki></code></div> | ||
<div>'''''Optional:''''' | <div>'''''Optional:''''' display a sub-option.</div> | ||
<div><code>s</code></div> | <div><code>s</code></div> | ||
<div><code>selected</code></div> | <div><code>selected</code></div> | ||
<div><code>n/a</code></div> | <div><code>n/a</code></div> | ||
<div><code><nowiki>{{option|s=}}</nowiki></code></div> | <div><code><nowiki>{{option|s=}}</nowiki></code></div> | ||
<div>'''''Optional:''''' | <div>'''''Optional:''''' display selected checkbox.</div> | ||
<div><code> | <div><code>ds</code></div> | ||
<div><code>deselected</code></div> | |||
<div><code>n/a</code></div> | |||
<div><code><nowiki>{{option|ds=}}</nowiki></code></div> | |||
<div>'''''Optional:''''' display deselected checkbox.</div> | |||
<div><code>df</code></div> | |||
<div><code>default</code></div> | <div><code>default</code></div> | ||
<div><code>n/a</code></div> | <div><code>n/a</code></div> | ||
<div><code><nowiki>{{option| | <div><code><nowiki>{{option|df=}}</nowiki></code></div> | ||
<div>'''''Optional:''''' | <div>'''''Optional:''''' display default marker.</div> | ||
<div><code> | <div><code>dd</code></div> | ||
<div><code> | <div><code>display description</code></div> | ||
<div><code>n/a</code></div> | |||
<div><code><nowiki>{{option|dd=}}</nowiki></code></div> | |||
<div>'''''Optional:''''' display description.</div> | |||
<div><code> | |||
<div><code><nowiki>{{option| | |||
<div>'''''Optional:''''' | |||
</div> | </div> | ||
</noinclude> | </noinclude> |
Revision as of 16:23, 27 February 2024
Option
Example
Selected and description
Option description
Selected and default
Deselected, default and description
Sub-option description
{{option|s=|dd=|Selected and description|Option description|
{{option|s=|df=|Selected and default||
{{option|ds=|df=|dd=|Deselected, default and description|Sub-option description}}
}}
}}
Parameters
Id
Name
Default value
Example
Description
1
value
Option
{{option|Value}}
Required: specify a text value.
2
description
null
{{option|Value|Description}}
Optional: specify a text description.
3
sub-option
null
{{option|Value|Description|Sub-option}}
Optional: display a sub-option.
s
selected
n/a
{{option|s=}}
Optional: display selected checkbox.
ds
deselected
n/a
{{option|ds=}}
Optional: display deselected checkbox.
df
default
n/a
{{option|df=}}
Optional: display default marker.
dd
display description
n/a
{{option|dd=}}
Optional: display description.