Difference between revisions of "Template:Box-header colour/doc"
Jump to navigation
Jump to search
imported>Evad37 (start) |
imported>Zyxw (update count, template will round and format it) |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| + | {{high-use| 2882 }} | ||
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | ||
{{Lua|Module:Box-header}} | {{Lua|Module:Box-header}} | ||
| Line 15: | Line 16: | ||
:Title to show in box header | :Title to show in box header | ||
;{{para|2}} {{nobold|(or second unnamed parameter)}} | ;{{para|2}} {{nobold|(or second unnamed parameter)}} | ||
| − | :Optional: | + | :Optional: the target page for the edit link. |
| + | :If not included, no edit link will be shown. | ||
;{{para|colour}} {{nobold|(or {{para|color}})}} | ;{{para|colour}} {{nobold|(or {{para|color}})}} | ||
| − | :Base colour to use when calculating appropriate colours. May either be a [[hue]] value (a number between <code>0</code> and <code>359</code>), or a [[X11_ color names#Color name chart|X11 colour name]] (like <code>aqua</code>), or a [[hex triplet]] (like <code>#92c</code> or <code>#6956D7</code>) | + | :Optional: Base colour to use when calculating appropriate colours. May either be a [[hue]] value (a number between <code>0</code> and <code>359</code>), or a [[X11_ color names#Color name chart|X11 colour name]] (like <code>aqua</code>), or a [[hex triplet]] (like <code>#92c</code> or <code>#6956D7</code>) |
| + | :If not specified, a "random" colour will be chosen (based on the characters in the root page name) | ||
;{{para|mode}} | ;{{para|mode}} | ||
| − | :Optional: How light or dark the calculated title background colour should be. Either <code>lightest</code>, <code>light</code>, <code>normal</code>, <code>dark</code>, or <code>darkest</code> | + | :Optional: How light or dark the calculated title background colour should be. Either <code>lightest</code>, <code>light</code>, <code>normal</code>, <code>dark</code>, or <code>darkest</code> |
| + | :Defaults to "normal" if not specified. | ||
Other parameters that are accepted by [[Template:Box-header]] can also be used in this template, apart from the following (which will be ignored if specified): | Other parameters that are accepted by [[Template:Box-header]] can also be used in this template, apart from the following (which will be ignored if specified): | ||
| Line 31: | Line 35: | ||
*{{!xt|background}} | *{{!xt|background}} | ||
| + | ==See Also== | ||
| + | {{Portal templates navbox}} | ||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
<!-- Categories below this line, please; interwikis at Wikidata --> | <!-- Categories below this line, please; interwikis at Wikidata --> | ||
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 04:14, 2 November 2018
| This is a documentation subpage for Template:Box-header colour. It contains usage information, categories and other content that is not part of the original template page. |
| This template is used on approximately 2,900 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Transclusion count updated automatically (see documentation). |
| This template uses Lua: |
This template can be used to easily create a box-header with MOS:COLOUR-compliant colours. It is intended to mainly be used in portals, but can also be used elsewhere.
Usage
Basic:
{{Box-header colour | Title | colour= | mode= }}
With an edit link:
{{Box-header colour | Title | Page to be edited | colour= | mode= }}
Parameters
|1=(or first unnamed parameter)- Title to show in box header
|2=(or second unnamed parameter)- Optional: the target page for the edit link.
- If not included, no edit link will be shown.
|colour=(or|color=)- Optional: Base colour to use when calculating appropriate colours. May either be a hue value (a number between
0and359), or a X11 colour name (likeaqua), or a hex triplet (like#92cor#6956D7) - If not specified, a "random" colour will be chosen (based on the characters in the root page name)
|mode=- Optional: How light or dark the calculated title background colour should be. Either
lightest,light,normal,dark, ordarkest - Defaults to "normal" if not specified.
Other parameters that are accepted by Template:Box-header can also be used in this template, apart from the following (which will be ignored if specified):
- title
- editpage
- noedit
- border
- titleforeground
- titlebackground
- foreground
- background