Difference between revisions of "Template:BSto/doc"

From blackwiki
Jump to navigation Jump to search
imported>Jc86035
imported>Jc86035
m
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 +
{{Lua|Module:Routemap}}
  
 
This is a variant of {{tl|BSsplit}} that has the text in two different sizes.
 
This is a variant of {{tl|BSsplit}} that has the text in two different sizes.
Line 14: Line 15:
 
** <code>it=all</code> displays both lines in italics;
 
** <code>it=all</code> displays both lines in italics;
 
** <code>it=off</code> displays the second line in normal text.
 
** <code>it=off</code> displays the second line in normal text.
 +
* A 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).
  
 
=== Example ===
 
=== Example ===
 +
{{left|
 
{{BS-map
 
{{BS-map
 
|collapsible=0
 
|collapsible=0
 
|legend=0
 
|legend=0
 
|map=
 
|map=
{{BS1-2||'''Input:'''|'''Result:'''}}
+
{{BS-2|STR|O1=MFADEg|'''Input:'''|'''Result:'''}}
 
{{BS3-2|dCONTr|ABZrf|d|<tt><nowiki>{{BSto|Line Name|to Destination}}</nowiki></tt>|{{BSto|Line Name|to Destination}} }}
 
{{BS3-2|dCONTr|ABZrf|d|<tt><nowiki>{{BSto|Line Name|to Destination}}</nowiki></tt>|{{BSto|Line Name|to Destination}} }}
{{BS1-2||&nbsp;}}
+
{{BS-2|STR|&nbsp;}}
{{BS1-2||'''Input:'''|'''Result:'''}}
+
{{BS-2|STR|'''Input:'''|'''Result:'''}}
 
{{BS3-2|d|ABZlf|dCONTl|<tt><nowiki>{{BSto|Other Route|to Somewhere Else|align=right}}</nowiki></tt>|{{BSto|Other Route|to Somewhere Else|align=right}} }}
 
{{BS3-2|d|ABZlf|dCONTl|<tt><nowiki>{{BSto|Other Route|to Somewhere Else|align=right}}</nowiki></tt>|{{BSto|Other Route|to Somewhere Else|align=right}} }}
{{BS1-2||&nbsp;}}
+
{{BS-2|STR|&nbsp;}}
{{BS1-2||'''Input:'''|'''Result:'''}}
+
{{BS-2|STR|'''Input:'''|'''Result:'''}}
{{BS1-2|HST|<tt><nowiki>{{BSto|Station|for Nearby Town|Railway station|it=off}}</nowiki></tt>|{{BSto|Station|for Nearby Town|Railway station|it=off}} }}
+
{{BS-2|HST|<tt><nowiki>{{BSto|Station|for Nearby Town|Railway station|it=off}}</nowiki></tt>|{{BSto|Station|for Nearby Town|Railway station|it=off}} }}
{{BS1-2||&nbsp;}}
+
{{BS-2|STR|&nbsp;}}
{{BS1-2||'''Input:'''|'''Result:'''}}
+
{{BS-2|STR|'''Input:'''|'''Result:'''}}
{{BS1-2|CONTf|<tt><nowiki>{{BSto|Continuing line|to Terminus|it=all}}</nowiki></tt>|{{BSto|Continuing line|to Terminus|it=all}} }}
+
{{BS-2|CONTf|<tt><nowiki>{{BSto|Blue Line|to Terminus|it=all|bg1=#90C0FF|bg2=#lightgray}}</nowiki></tt>|{{BSto|Blue Line|to Terminus|it=all|bg1=#90C0FF|bg2=lightgray}} }}
 +
}}
 
}}
 
}}
<div style="clear: all;"></div>
 
  
 
{{clear}}
 
{{clear}}

Revision as of 09:06, 26 June 2016

This is a variant of {{BSsplit}} that has the text in two different sizes.

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

Usage

This template displays two lines of text in a text field of route diagram created with {{BS-map}}. It is intended for labeling connecting routes or adding other secondary information, as the second line is smaller and italicized.

  • The optional third parameter will provide a wikilink for the text.
  • The optional align parameter will left- or right-justify text; if omitted it will default to “inherit”.
  • The optional it parameter controls italicization:
    • it=all displays both lines in italics;
    • it=off displays the second line in normal text.
  • A 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).

Example

Input:
Template:Superimpose5
Result:
{{BSto|Line Name|to Destination}}
Line Name
to Destination
 
Input:
Result:
{{BSto|Other Route|to Somewhere Else|align=right}}
Other Route
to Somewhere Else
 
 
Input:
Result:
{{BSto|Station|for Nearby Town|Railway station|it=off}}
Station
for Nearby Town
 
Input:
Result:
{{BSto|Blue Line|to Terminus|it=all|bg1=#90C0FF|bg2=#lightgray}}
Blue Line
to Terminus

Incorrect uses

If either line of text is empty, the page that the template is used on will be a member of Category:Pages using BSto or BSsrws with missing text values.

See also