This is a documentation for Board Game Arena: play board games online !

Template:Option: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
No edit summary
(+preferred width, -dd)
Line 1: Line 1:
<div title="option" class="mw-collapsible" style="display:inline-flex;flex-flow:column nowrap;min-width:4rem;font-family:Roboto,Arial,sans-serif;color:rgb(78 78 78);"><div class="mw-collapsible-toggle" style="display:flex;align-items:center;z-index:1;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="{{{dd|d}}}isplay:none;margin-top:-5px;padding:0.5625rem 0.5rem 0.5rem 0.5rem;border-radius:0 0 5px 5px;background:linear-gradient(180deg,rgb(224,223,222),rgb(243,243,243) 0.9375rem);">{{{2|}}}</div><div class="mw-collapsible-content" style="display:flex;flex-flow:column wrap;margin-top:0.125rem;width:calc(100% - 1.5rem);padding-left:1.5rem;">{{{3|}}}</div></div><noinclude>
<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=|dd=|Selected and description|Option description|
{{option|s=|Selected and description|Option description|
  {{option|s=|df=|Selected and default||
  {{option|s=|df=|Sub-option, selected and default||
   {{option|ds=|df=|dd=|Deselected, default and description|Sub-option description}}
   {{option|ds=|df=|Sub-option, deselected, default and description|Sub-option description}}
  }}
  }}
}}
}}
<code><nowiki>{{</nowiki>option|s=|dd=|Selected and description|Option description|
<code><nowiki>{{</nowiki>option|s=|Selected and description|Option description|


&nbsp;<nowiki>{{</nowiki>option|s=|df=|Selected and default||
&nbsp;<nowiki>{{</nowiki>option|s=|df=|Sub-option, selected and default||


&nbsp;&nbsp;<nowiki>{{</nowiki>option|ds=|df=|dd=|Deselected, default and description|Sub-option description<nowiki>}}</nowiki>
&nbsp;&nbsp;<nowiki>{{</nowiki>option|ds=|df=|Sub-option, deselected, default and description|Sub-option description<nowiki>}}</nowiki>


&nbsp;<nowiki>}}</nowiki>
&nbsp;<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>dd</code></div>
   <div><code>w</code></div>
   <div><code>display description</code></div>
   <div><code>preferred width</code></div>
   <div><code>n/a</code></div>
   <div><code>500</code></div>
   <div><code><nowiki>{{option|dd=}}</nowiki></code></div>
   <div><code><nowiki>{{option|w=600}}</nowiki></code></div>
   <div>'''''Optional:''''' display description.</div>
   <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.