模板:Rail color box/doc
| 此页面是Template:Rail color box的模板文档。 此页面可能包含了模板的使用说明、分类和其他内容。 |
| 这是 Rail color box 模板的说明文件页面。 本文件并不是为直接浏览而撰写。若是其中使用了跨维基计划连结,某些连结可能会显示损毁。请勿将这些连结替换为硬编码的页面名称或网址。 |
| 有关以下模块的模板 |
| 模块:Adjacent stations |
|---|
| (讨论 | 沙盒 | 子页面) |
{{Infobox station}} |
| (沙盒 | 测试样例) |
{{Station link}} |
| (沙盒 | 测试样例) |
{{Rail color}} |
| (沙盒 | 测试样例) |
{{Rail icon}} |
| (沙盒 | 测试样例) |
{{Line link}} |
| (沙盒 | 测试样例) |
{{Rail color box}} |
| (沙盒 | 测试样例) |
{{Adjacent stations}} |
| (沙盒 | 测试样例) |
{{Line terminus link}} |
| (沙盒 | 测试样例) |
{{RenderStations}} |
| (沙盒 | 测试样例) |
Usage
[编辑]This template is intended to be used within station and line infoboxes, diagrams, navboxes and tables to show a small color box and a link to the associated line or service name. Its use should be avoided within body text.
| Parameter | Description |
|---|---|
system or 1
|
An identifier to specify which system's color and line article name convention should be used; either Module:Adjacent stations/system or Template:system color must exist, e.g. Template:Amtrak color or Module:Adjacent stations/Taipei Metro
|
line or 2
|
The line or service to be linked |
inline or 3
|
An optional parameter to create a colorbox and link suitable for use inline with other text Valid arguments are yes, small, link, box, route, xroute and croute |
type
|
This adds " – type" to the end, where type is the parameter value (which may be changed by a module subpage), and also passes the value to the data template or module. Typically a service or branch of the line |
note
|
An optional note with more information, added at the end |
For systems where multiple colors are used to designate different lines, the appropriate color will be selected based on the combination of the system and line parameters. The same is done for systems where types/services have their own colors.
The template can be abbreviated as {{rcb}}. All examples use this abbreviated form.
Examples
[编辑]{{rcb|system=Amtrak|line=Southwest Chief}} and {{rcb|Amtrak|Southwest Chief}} produce
Template:Rcb using {{Amtrak color}} and {{Amtrak lines}}
{{rcb|SEPTA|Wilmington/Newark|note=(rush hour service only)}} produces
Template:Rcb
The optional parameter |inline= (or the third unnamed parameter) allows different display options for inline text.
yes |
Template:Rcb | Template:Rcb | inline color box with link |
small |
Template:Rcb | Template:Rcb | smaller color box with link |
dot |
Template:Rcb | Template:Rcb | small circle with link |
square |
Template:Rcb | Template:Rcb | small square with link |
link |
Template:Rcb | Template:Rcb | linked box |
ldot |
Template:Rcb | Template:Rcb | linked circle |
lsquare |
Template:Rcb | Template:Rcb | linked square |
box |
Template:Rcb | Template:Rcb | box with link omitted |
route |
Template:Rcb | Template:Rcb | box with background color |
croute |
Template:Rcb | Template:Rcb | box with background color and border radius |
xroute |
Template:Rcb | Template:Rcb | box with colored text and border radius |
Some options, such as setting the text color, border color, and the short name for the latter three, require the use of a module subpage. Each line can have its own values, as can each type. The table keys for line and type tables are the same: "border color", "text color" and "short name". Note that the "background color" key is not used by this template.
System abbreviations
[编辑]Lists of available systems are at Category:Rail transport color templates and Special:PrefixIndex/Module:Adjacent stations/.
TemplateData
[编辑]Template which generates colored boxes to indicate rail lines, optionally with a link to the line's article.
| 参数 | 描述 | 类型 | 状态 | |
|---|---|---|---|---|
| System | 1 system | 无描述 | 字符串 | 必需 |
| Line | 2 line | 无描述 | 字符串 | 推荐 |
| Inline display type | 3 inline | 无描述 | 字符串 | 推荐 |
| Type (branch/service) | type | 无描述 | 字符串 | 可选 |
| Note | note | 无描述 | 字符串 | 可选 |