Difference between revisions of "Template:Colorbull/doc"
Jump to navigation
Jump to search
imported>YBG (→Examples: remove #REDIRECT) |
imported>GKFX (→Usage: Convert to {{Format TemplateData}}) |
||
| Line 5: | Line 5: | ||
== Usage == | == Usage == | ||
| − | |||
| − | + | {{Format TemplateData|TOC=1|JSON= | |
| − | + | { | |
| − | :: | + | "params": { |
| − | + | "1": { | |
| − | + | "label": "Color", | |
| − | + | "description": "Most commonly specified as either a color keyword or as the hexadecimal triplet representing an RGB combination. See the article [[web colors]] for details.", | |
| − | + | "example": "red", | |
| − | + | "type": "string", | |
| − | + | "default": "Black (or standard link color for links)", | |
| − | + | "suggested": true | |
| − | + | }, | |
| − | + | "2": { | |
| − | + | "label": "Shape", | |
| − | + | "description": "One of <noexport><table class=\"wikitable\"><tr> | |
| − | + | <td>c / circle / r / round</td> | |
| − | + | <td>●</td></tr> | |
| − | + | <tr> | |
| − | + | <td>d / diamond</td> | |
| − | + | <td>◆</td></tr> | |
| − | + | <tr> | |
| + | <td>tu / up / uptriangle</td> | ||
| + | <td>▲</td></tr> | ||
| + | <tr> | ||
| + | <td>td / dn / downtriangle</td> | ||
| + | <td>▼</td></tr> | ||
| + | <tr> | ||
| + | <td>tl / lt / lefttriangle</td> | ||
| + | <td>◀</td></tr> | ||
| + | <tr> | ||
| + | <td>tr / rt / righttriangle</td> | ||
| + | <td>▶</td></tr> | ||
| + | <tr> | ||
| + | <td><i>default</i></td> | ||
| + | <td>■</td> | ||
| + | </tr></table><i>Or for VisualEditor readers:</i><br></noexport>c / circle / r / round gives ●; d / diamond gives ◆; tu / up / uptriangle gives ▲; td / dn / downtriangle gives ▼; tl / lt / lefttriangle gives ◀; tr / rt / righttriangle gives ▶; default is ■", | ||
| + | "type": "string", | ||
| + | "suggested": true, | ||
| + | "default": "■" | ||
| + | }, | ||
| + | "3": { | ||
| + | "label": "Link target", | ||
| + | "description": "Optionally, a page name to link to.", | ||
| + | "type": "wiki-page-name", | ||
| + | "suggested": true | ||
| + | }, | ||
| + | "size": { | ||
| + | "label": "Size", | ||
| + | "description": "The size of the bullet relative to surrounding text, as a percentage. Omit the % sign.", | ||
| + | "example": "80", | ||
| + | "type": "number", | ||
| + | "default": "The same size as surrounding text (100)", | ||
| + | "suggested": true | ||
| + | } | ||
| + | }, | ||
| + | "paramOrder": [ | ||
| + | "1", | ||
| + | "2", | ||
| + | "3", | ||
| + | "size" | ||
| + | ], | ||
| + | "description": "This template inserts a colored bullet, with an optional [[wikilink]]. The bullet’s shape and size can also be changed.<noexport><br><code>{{colorbull{{!}}<i>colour</i>{{!}}<i>shape</i>{{!}}<i>wikilink</i>{{!}}<i>size</i>{{=}}}}</code></noexport>", | ||
| + | "format": "inline" | ||
| + | } }} | ||
=== Examples === | === Examples === | ||
Revision as of 22:04, 31 January 2018
| This is a documentation subpage for Template:Colorbull. It contains usage information, categories and other content that is not part of the original template page. |
This template inserts a colored bullet, with an optional wikilink. The bullet’s shape and size can also be changed.
Usage
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Colorbull
INTERNAL: mw.text.jsonDecode: Control character error, possibly incorrectly encoded
Examples
| Visual effect |
Markup |
|---|---|
| ■ | {{colorbull}}
|
| ■ | {{colorbull|#039}}
|
| ■ | {{colorbull|size=50}}
|
| ● | {{colorbull|red|round}}
|
| ◆ | {{colorbull|green|d}}
|
| ▲ | {{colorbull||tu|triangle}}
|
See also
| Template | Description | Example |
|---|---|---|
| {{Color box}} | a small color box with black borders and text color | or ORANGE |
| {{Color box striped}} | a striped version | |
| {{RouteBox}} | a borderless version with text color and wikilinks | Template:RouteBox |
| {{Colorbull}} | a colored bullet with wikilinks | ■ |
| {{Legend2}} | another borderless version | |
| {{Color sample}} | a small color box with black borders | |
| {{Swatch inline}} | Template:Swatch inline | |
| {{Background color}} | orange | |
| {{Rail color box}} | a version with more display options (part of Module:Adjacent stations) |
Template:Rcb, Template:Rcb, etc. |
| {{Diagonal split color box}} | a small color box split diagonally | |
| {{Motor type}} | A small color box corresponding to the motor type | Template:Motor type, etc. |
- REDIRECT Template:•)