Difference between revisions of "Template:Collapse top"
Jump to navigation
Jump to search
no edit summary
>Verdy p (more translatibility) |
>Verdy p |
||
Line 48: | Line 48: | ||
; {{Para|1}} <span style="font-weight:normal"><translate>(or first unnamed parameter)</translate></span>, {{Para|title}}, {{Para|reason}}, {{Para|header}}, {{Para|heading}} | ; {{Para|1}} <span style="font-weight:normal"><translate>(or first unnamed parameter)</translate></span>, {{Para|title}}, {{Para|reason}}, {{Para|header}}, {{Para|heading}} | ||
: <translate>Will give the collapsed box a title, which occurs on the same line as the ''show'' link and is always visible. It defaults to "Extended content". For example, <tvar|1><code><nowiki>{{Collapse top|title=This is the title text}}</nowiki></code></> or <tvar|2><code><nowiki>{{Collapse top|This is the title text}}</nowiki></code></>. Note: The shorter, unnamed markup will not work if the title value contain an equals (<tvar|3><code>=</code></>) character.</translate> | : <translate>Will give the collapsed box a title, which occurs on the same line as the ''show'' link and is always visible. It defaults to "Extended content".</translate> | ||
: <translate>For example, <tvar|1><code><nowiki>{{Collapse top|title=This is the title text}}</nowiki></code></> or <tvar|2><code><nowiki>{{Collapse top|This is the title text}}</nowiki></code></>. Note: The shorter, unnamed markup will not work if the title value contain an equals (<tvar|3><code>=</code></>) character.</translate> | |||
; {{Para|warning|yes}} | ; {{Para|warning|yes}} | ||
: <translate>Will display a default warning line under the main title which reads "The following is a closed debate. {{<tvar|1>Strong|style=color:red</>|Please do not modify it.}}" Any non-empty value supplied to this parameter will have this effect (i.e. <tvar|2>{{Para|warning|<span style="color:red">no</span>}}</> will not work as expected).</translate> | : <translate>Will display a default warning line under the main title which reads "The following is a closed debate. {{<tvar|1>Strong|style=color:red</>|Please do not modify it.}}"</translate> | ||
: <translate>Any non-empty value supplied to this parameter will have this effect (i.e. <tvar|2>{{Para|warning|<span style="color:red">no</span>}}</> will not work as expected).</translate> | |||
; {{Para|2}} <span style="font-weight:normal"><translate>(or second unnamed parameter)</translate></span> | ; {{Para|2}} <span style="font-weight:normal"><translate>(or second unnamed parameter)</translate></span> | ||
: <translate>This is optional warning-line text. It will override the standard warning line above; it is not necessary to also use <tvar|1>{{Para|warning|yes}}</> in this case, though doing so is harmless.</translate> | : <translate>This is optional warning-line text. It will override the standard warning line above; it is not necessary to also use <tvar|1>{{Para|warning|yes}}</> in this case, though doing so is harmless.</translate> | ||
; {{Para|left|yes}} | ; {{Para|left|yes}} | ||
: <translate>Will align the title along the left margin (in RTL languages, along the right margin instead). By default, text is centered, specifically between the left edge of the green box and the left edge of the "show" link. Any value will | : <translate>Will align the title along the left margin (in RTL languages, along the right margin instead).</translate> | ||
: <translate>By default, text is centered, specifically between the left edge of the green box and the left edge of the "show" link.</translate> | |||
: <translate>Any non-empty value supplied to this parameter will have this effect (i.e. <tvar|1>{{Para|left|<span style="color:#8B0000">no</span>}}</> will not work as expected).</translate> | |||
; {{Para|expand|yes}} | ; {{Para|expand|yes}} | ||
: <translate>Will leave the material uncollapsed with the border and coloring. Default is to collapse the material. Any value will have this effect (i.e. <tvar|1>{{Para|expand|<span style="color:#8B0000">no</span>}}</> will not work as expected).</translate> | : <translate>Will leave the material uncollapsed with the border and coloring. Default is to collapse the material. </translate> | ||
: <translate>Any non-empty value supplied to this parameter will have this effect (i.e. <tvar|1>{{Para|expand|<span style="color:#8B0000">no</span>}}</> will not work as expected).</translate> | |||
; {{Para|bg}} | ; {{Para|bg}} | ||
: <translate>Sets the background color of the title of the collapsible bar. Defaults to "#F8FCFF", a whitish color. Named colors are listed at [[List of colors]]. For example, <tvar|1><code><nowiki>{{Collapse top|This is the title text|bg=#008000}}</nowiki></code></> or <tvar|2><code><nowiki>{{Collapse top|This is the title text|bg=green}}</nowiki></code></> (HTML color codes require the leading <tvar|H><code>#</code></>).</translate> | : <translate>Sets the background color of the title of the collapsible bar. Defaults to "#F8FCFF", a whitish color. Named colors are listed at [[List of colors]].</translate> | ||
: <translate>For example, <tvar|1><code><nowiki>{{Collapse top|This is the title text|bg=#008000}}</nowiki></code></> or <tvar|2><code><nowiki>{{Collapse top|This is the title text|bg=green}}</nowiki></code></> (numeric HTML color codes require the leading <tvar|H><code>#</code></>).</translate> | |||
; {{Para|fc}} | ; {{Para|fc}} | ||
: <translate>Sets the font color of the title of the collapsible bar. Defaults to "black". See <tvar| | : <translate>Sets the font color of the title of the collapsible bar. Defaults to "black".</translate> | ||
: <translate>See <tvar|bg>{{Para|bg}}</>, above, for details on color options.</translate> | |||
; {{Para|border}} | ; {{Para|border}} | ||
: <translate>Sets the width of the border line on the collapsed material. Defaults to <code>1px</code>. For example, <tvar|1><code><nowiki>{{Collapse top|border=2px}}</nowiki></code></>; going much thicker than this is not very useful.</translate> | : <translate>Sets the width of the border line on the collapsed material. Defaults to <code>1px</code>.</translate> | ||
: <translate>For example, <tvar|1><code><nowiki>{{Collapse top|border=2px}}</nowiki></code></>; going much thicker than this is not very useful.</translate> | |||
; {{Para|b-color}} | ; {{Para|b-color}} | ||
: <translate>Sets the border color. Defaults to <tvar|1><code>silver</code></> (<tvar|2><code>#C0C0C0</code></>). See <tvar| | : <translate>Sets the border color. Defaults to <tvar|1><code>silver</code></> (<tvar|2><code>#C0C0C0</code></>).</translate> | ||
: <translate>See <tvar|bg>{{Para|bg}}</>, above, for details on color options.</translate> | |||
; {{Para|padding}} | ; {{Para|padding}} | ||
: <translate>Sets the padding (distance from borders) on the collapsed material inside the colored area. Defaults to <tvar|1><code>8px</code></>.</translate> | : <translate>Sets the padding (distance from borders) on the collapsed material inside the colored area. Defaults to <tvar|1><code>8px</code></>.</translate> | ||
Line 70: | Line 79: | ||
: <translate>Sets the width of the overall template relative to the page (or a block element containing the collapse box). This should virtually always be given as a percentage, e.g. <tvar|1>{{Para|width|50%}}</>, or in relative <tvar|2><code>em</code></> units, e.g. <tvar|3>{{Para|width|30em}}</>. Pixel-based values should be avoided, as they are effectively meaningless – the result will be different depending on each user's browser and local CSS settings (which browser and operating system it is, zoom level, font sizes, etc.).</translate> | : <translate>Sets the width of the overall template relative to the page (or a block element containing the collapse box). This should virtually always be given as a percentage, e.g. <tvar|1>{{Para|width|50%}}</>, or in relative <tvar|2><code>em</code></> units, e.g. <tvar|3>{{Para|width|30em}}</>. Pixel-based values should be avoided, as they are effectively meaningless – the result will be different depending on each user's browser and local CSS settings (which browser and operating system it is, zoom level, font sizes, etc.).</translate> | ||
; {{Para|border2}} | ; {{Para|border2}} | ||
: <translate>Sets the properties of the border of the box that appears when template is expanded | : <translate>Sets the properties of the border of the box that appears when template is expanded. Defaults to <code>1px silver</code> (there is no provision to change from a solid line).</translate> | ||
: <translate>For example, <tvar|1><code><nowiki>{{Collapse top|border2=2px}}</nowiki></code></> (only width or color will be changed if only one value is supplied).</translate> | |||
: <translate>See <tvar|bg>{{Para|bg}}</>, above, for details on color options.</translate> | |||
; {{Para|bg2}} | ; {{Para|bg2}} | ||
: <translate>Sets the background color of the box that appears when template is expanded; defaults to <tvar|1><code>white</code></> (<tvar|2><code>#FFF</code></>). See <tvar| | : <translate>Sets the background color of the box that appears when template is expanded; defaults to <tvar|1><code>white</code></> (<tvar|2><code>#FFF</code></>).</translate> | ||
: <translate>See <tvar|bg>{{Para|bg}}</>, above, for details on color options.</translate> | |||
; {{Para|indent}} | ; {{Para|indent}} | ||
: <translate>Indents the box from the left of the page. Defaults to no indentation. Each <tvar|1><code>:</code></> in talk page markup is approximately equivalent to <tvar|2><code>1.6em</code></> of indent (e.g., to match <tvar|3><code>::::</code></> indentation level, use <tvar|4>{{Para|indent|6.4em}}</>. You can also use a percentage value. Pixel-based values should be avoided (see <tvar|5>{{Para|width}}</>, above, for the reason).</translate> | : <translate>Indents the box from the left of the page. Defaults to no indentation. Each <tvar|1><code>:</code></> in talk page markup is approximately equivalent to <tvar|2><code>1.6em</code></> of indent (e.g., to match <tvar|3><code>::::</code></> indentation level, use <tvar|4>{{Para|indent|6.4em}}</>. You can also use a percentage value.</translate> | ||
: <translate>Pixel-based values should be avoided (see <tvar|5>{{Para|width}}</>, above, for the reason).</translate> | |||
<translate> | <translate> |