Difference between revisions of "Template:BSsplit/doc"

From blackwiki
Jump to navigation Jump to search
imported>Useddenim
m (→‎See also: {{BSsrws}})
imported>Jc86035
m
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Categories and interwikis go at the bottom of this page. -->
 
<!-- Categories and interwikis go at the bottom of this page. -->
 +
{{Lua|Module:Routemap}}
  
 
== Usage ==
 
== Usage ==
Line 6: Line 7:
 
This template displays two lines of text in a text field of a [[Wikipedia:Route diagram template|route diagram]] created with {{tl|BS-map}}.
 
This template displays two lines of text in a text field of a [[Wikipedia:Route diagram template|route diagram]] created with {{tl|BS-map}}.
  
* The text will inherit the alignment of the parent cell, but can be overridden by applying the parameter <code>align=left</code>or <code>align=right</code>.
+
* The text will inherit the alignment of the parent cell, but can be overridden by applying the parameter "<code>align=left</code>" or "<code>align=right</code>".
 
+
* The third parameter (alternatively "<code>L=</code>") defines a shared wikilink for both lines of text (no <code>[[</code> or <code>]]</code> are needed).
* The third parameter (alternatively <code>L=</code>) defines a shared wikilink for both lines of text (no <code>[[</code> or <code>]]</code> are needed).
+
* The fourth parameter (alternatively "<code>4=</code>") will change both lines to ''italic'' text. Any character or text can be used.
 
+
* The fifth parameter (alternatively "<code>5=</code>") will change both lines to '''bold''' text. Any character or text can be used.
* The fourth parameter (alternatively <code>4=</code>) will change both lines to ''italic'' text. Any character or text can be used.
+
* The separating line can be forced to appear by providing an argument for the parameter "<code>line=</code>''anything''".
 
+
* Background colors can be specified by providing a valid [[Web colors#X11 color names|X11 color name]] (e.g. <code style="color:HotPink;">HotPink</code>) or [[Web colors#Hex triplet|RGB hex triplet]] (e.g. <code style="color:#12A3BC;">#12A3BC</code>) for the parameters "<code>bg1=</code>" (top line) and "<code>bg2=</code>" (bottom line).
* The fifth parameter (alternatively <code>5=</code>) will change both lines to '''bold''' text. Any character or text can be used.
 
 
 
* The separating line can be forced to appear by providing an argument for the parameter <code>line=</code>''anything''.
 
 
 
* Background colors can be specified by providing a valid [[Web colors#HTML color names|html color]] or [[Web colors#Hex triplet|hex triplet]] for the parameters <code>bg1=</code> (top line) and <code>bg2=</code> (bottom line).
 
  
 
=== Examples ===
 
=== Examples ===

Revision as of 08:40, 26 June 2016

Usage

This template displays two lines of text in a text field of a route diagram created with {{BS-map}}.

  • The text will inherit the alignment of the parent cell, but can be overridden by applying the parameter "align=left" or "align=right".
  • The third parameter (alternatively "L=") defines a shared wikilink for both lines of text (no [[ or ]] are needed).
  • The fourth parameter (alternatively "4=") will change both lines to italic text. Any character or text can be used.
  • The fifth parameter (alternatively "5=") will change both lines to bold text. Any character or text can be used.
  • The separating line can be forced to appear by providing an argument for the parameter "line=anything".
  • Background colors can be specified by providing a valid X11 color name (e.g. HotPink) or RGB hex triplet (e.g. #12A3BC) for the parameters "bg1=" (top line) and "bg2=" (bottom line).

Examples

Input:
{{BSsplit|opened 1900|closed 1969}}
Result:
opened 1900
closed 1969
Station
 
Input:
{{BSsplit|open|9 am–3 pm|align=left}}
Result:
open
9 am–3 pm
Station
 
Input:
{{BSsplit|Llanfairpwllgwyngyllgogerychwyrn-|drobwllllantysiliogogogoch|Llanfairpwllgwyngyll}}
Result:
Llanfairpwllgwyngyllgogerychwyrn-
drobwllllantysiliogogogoch
 
Input:
{{BSsplit|DC|AC|line=yes}}
Result:
DC
AC
 
Input:
{{BSsplit|Zone A|free-fare|4=it|line=yes|5=b}}
Result:
Zone A
free-fare
 
Input:
{{BSsplit|Canada|USA|bg1=#f00|bg2=lightblue|align=center}}
Result:
Canada
USA

Note: Text in the  Time/Dist. column is normally right-aligned.

See also

  • {{BSsrws}} for a railway station name on two lines
  • {{BSto}} for two lines of unequal-height text
  • {{BScvt}} for two distances

See project:ROUTE#Fractional text display template for usage instruction.