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) (+preferred width, -dd) |
||
Line 1: | Line 1: | ||
<div title="option" class="mw-collapsible" style="display:inline-flex;flex-flow:column nowrap; | <div title="option" class="mw-collapsible" style="display:inline-flex;flex-flow:column nowrap;margin-top:0.125rem;border-radius:5px;width:clamp(4rem,{{{w|500}}}px,100%);box-shadow:rgb(0 0 0/25%) 2px 2px 5px 0;font-family:Roboto,Arial,sans-serif;color:rgb(78 78 78);"><div class="mw-collapsible-toggle" style="display:flex;align-items:center;z-index:2;padding:0.5rem;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="{{{s|v}}}{{{ds|i}}}sibility:hidden;margin-right:1rem;{{{s|m}}}{{{ds|a}}}rgin:0;width:1.5rem;height:1.5rem;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;font-size:1rem;">{{{1|Option}}}</div><div style="{{{df|v}}}isibility:hidden;margin-left:1rem;width:0.6875rem;height:0.6875rem;border-radius:50%;background:rgb(211 211 211);"></div></div><div class="mw-collapsible-content" style="z-index:1;margin-top:-5px;padding:5px 0.5rem 0 0.5rem;border-radius:5px;background:linear-gradient(180deg,rgb(224,223,222) 5px,rgb(243,243,243) 2rem);">{{{2|}}}</div><div class="mw-collapsible-content" style="display:flex;flex-flow:column wrap;width:calc(100% - 1.5rem);margin-top:-5px;padding:5px 0 0 1.5rem;border-radius:5px;background:#f2f2f2;">{{{3|}}}</div></div><noinclude> | ||
== Example == | == Example == | ||
{{option|s | {{option|s=|Selected and description|Option description| | ||
{{option|s=|df=| | {{option|s=|df=|Sub-option, selected and default|| | ||
{{option|ds=|df=| | {{option|ds=|df=|Sub-option, deselected, default and description|Sub-option description}} | ||
}} | }} | ||
}} | }} | ||
<code><nowiki>{{</nowiki>option|s | <code><nowiki>{{</nowiki>option|s=|Selected and description|Option description| | ||
<nowiki>{{</nowiki>option|s=|df=| | <nowiki>{{</nowiki>option|s=|df=|Sub-option, selected and default|| | ||
<nowiki>{{</nowiki>option|ds=|df=| | <nowiki>{{</nowiki>option|ds=|df=|Sub-option, deselected, default and description|Sub-option description<nowiki>}}</nowiki> | ||
<nowiki>}}</nowiki> | <nowiki>}}</nowiki> | ||
Line 55: | Line 55: | ||
<div><code><nowiki>{{option|df=}}</nowiki></code></div> | <div><code><nowiki>{{option|df=}}</nowiki></code></div> | ||
<div>'''''Optional:''''' display default marker.</div> | <div>'''''Optional:''''' display default marker.</div> | ||
<div><code> | <div><code>w</code></div> | ||
<div><code> | <div><code>preferred width</code></div> | ||
<div><code> | <div><code>500</code></div> | ||
<div><code><nowiki>{{option| | <div><code><nowiki>{{option|w=600}}</nowiki></code></div> | ||
<div>'''''Optional:''''' | <div>'''''Optional:''''' specify the preferred width in px units.</div> | ||
</div> | </div> | ||
</noinclude> | </noinclude> |
Revision as of 17:08, 8 March 2024
Option
Example
Selected and description
Option description
Sub-option, selected and default
Sub-option, deselected, default and description
Sub-option description
{{option|s=|Selected and description|Option description|
{{option|s=|df=|Sub-option, selected and default||
{{option|ds=|df=|Sub-option, 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.
w
preferred width
500
{{option|w=600}}
Optional: specify the preferred width in px units.