Difference between revisions of "Template:S"

From Data JW United
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
This template is used for subtitles. It is mainly used for the WatchTower magazines, but it can be used for other types of literature.<br>
 
This template is used for subtitles. It is mainly used for the WatchTower magazines, but it can be used for other types of literature.<br>
= Parameters =
+
= Usage =
With <code>no parameter</code> the alignment will be left.
 
* <code>l</code> left
 
* <code>c</code> center
 
* <code>r</code> right
 
= One parameter =
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Code !! Example !! Result
 
! Code !! Example !! Result
 
|-
 
|-
| <code><nowiki>{{raw:data:s|text}}</nowiki></code> || <code><nowiki>{{s|the actual subtitle text}}</nowiki></code> || <div style="width:400px;">{{s|the actual subtitle text}}</div>
+
| <code><nowiki>{{raw:data:s|text}}</nowiki></code> || <code><nowiki>{{raw:data:s|the actual subtitle}}</nowiki></code> || <div style="width:400px;">{{s|The actual subtitle}}</div>
|}
 
 
 
= Two parameters =
 
The first parameter represents the desired alignment and can be one of the following:
 
* <code>l</code> - left
 
* <code>c</code> - center
 
* <code>r</code> - right
 
{| class="wikitable"
 
|-
 
! Code !! Example !! Result
 
|-
 
| <code><nowiki>{{raw:data:s|l|text}}</nowiki></code> || <code><nowiki>{{s|l|the actual subtitle text}}</nowiki></code> || <div style="width:400px;">{{s|l|the actual subtitle text}}</div>
 
 
|-
 
|-
| <code><nowiki>{{raw:data:s|c|text}}</nowiki></code> || <code><nowiki>{{s|c|the actual subtitle text}}</nowiki></code> || <div style="width:400px;">{{s|c|the actual subtitle text}}</div>
+
| <code><nowiki>{{raw:data:s|10|text}}</nowiki></code> || <code><nowiki>{{raw:data:s|10|the actual subtitle}}</nowiki></code> || <div style="width:400px;">{{s|10|The actual subtitle}}</div>
|-
 
| <code><nowiki>{{raw:data:s|r|text}}</nowiki></code> || <code><nowiki>{{s|r|the actual subtitle text}}</nowiki></code> || <div style="width:400px;">{{s|r|the actual subtitle text}}</div>
 
|}
 
 
 
= Tree parameters =
 
The second parameter represents the top and bottom distance in px. It can be whatever number.
 
* <code><a number></code> - distance top & bottom in pixels.
 
 
 
{| class="wikitable"
 
 
|-
 
|-
! Code !! Example !! Result
+
| <code><nowiki>{{raw:data:s|bold|text}}</nowiki></code> || <code><nowiki>{{raw:data:s|bold|the actual subtitle}}</nowiki></code> || <div style="width:400px;">{{s|bold|The actual subtitle}}</div>
 
|-
 
|-
| <code><nowiki>{{raw:data:s|c|10|text}}</nowiki></code> || <code><nowiki>{{s|c|10|the actual subtitle text}}</nowiki></code> || <div style="width:400px;">{{s|c|10|the actual subtitle text}}</div>
+
| <code><nowiki>{{raw:data:s|bold|10|text}}</nowiki></code> || <code><nowiki>{{raw:data:s|bold|10|the actual subtitle}}</nowiki></code> || <div style="width:400px;">{{s|bold|10|The actual subtitle}}</div>
</div>
 
 
|}
 
|}
= Four parameters =
+
= Usage in combination with other templates for align and set margins =  
The seconde parameter represents distance top in px.
 
The third parameter represents distance bottom in px.
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! Code !! Example !! Result
 
! Code !! Example !! Result
 
|-
 
|-
| <code><nowiki>{{raw:data:s|c|10|40|text}}</nowiki></code> || <code><nowiki>{{s|c|10|40|the actual subtitle text}}</nowiki></code> || <div style="width:400px;">{{s|c|10|40|the actual subtitle text}}</div>
+
| <code><nowiki>{{raw:data:m|50|{{raw:data:s|bold|10|text}}}}</nowiki></code> || <code><nowiki>{{raw:data:m|50|{{raw:data:s|bold|10|The actual subtitle}}}}</nowiki></code> || <div style="width:400px;">{{m|50|{{s|bold|10|The actual subtitle}}}}</div>
</div>
 
|}
 
 
 
= Six parameters =
 
The second parameter represents distance left in px.
 
The third parameter represents distance top in px.
 
The forth parameter represents distance right in px.
 
The fifth parameter represents distance bottom in px.
 
 
 
{| class="wikitable"
 
|-
 
! Code !! Example !! Result
 
 
|-
 
|-
| <code><nowiki>{{raw:data:s|c|100|50|50|5|text}}</nowiki></code> || <code><nowiki>{{s|c|100|50|50|5|the actual subtitle text}}</nowiki></code> || <div style="width:400px;">{{s|c|100|50|50|5|the actual subtitle text}}</div>
+
| <code><nowiki>{{raw:data:ai|1|r|{{raw:data:s|bold|10|text}}}}</nowiki></code> || <code><nowiki>{{raw:data:ai|1|r|{{raw:data:s|bold|10|The actual subtitle}}}}</nowiki></code> || <div style="width:400px;">{{ai|1|r|{{s|bold|10|The actual subtitle}}}}</div>
 
|}
 
|}
  
 
</noinclude>
 
</noinclude>
<includeonly>
+
<includeonly>{{#ifeq: {{{1}}} |bold| {{#ifeq:{{{3|}}}|{{{3}}} | <div style="font-size:{{{2}}}px;font-weight:bold;">{{{3}}}</div> | <div style="font-size:30px;font-weight:bold;">{{{2}}}</div> }} | {{#ifeq:{{{2|}}}|{{{2}}} | <div style="font-size:{{{1}}}px;">{{{2}}}</div> | <div style="font-weight:bold;">{{{1}}}</div>}} }}</includeonly>
{{#ifeq:{{{5|}}}|{{{5}}}
 
| {{#ifeq: {{{1}}} |l| <div style="padding-left:{{{2}}}px; padding-top:{{{3}}}px; padding-right:{{{4}}}px; padding-bottom:{{{5}}}px; text-align:left;font-weight:bold;">{{{6}}}</div>}}
 
{{#ifeq: {{{1}}} |r| <div style="padding-left:{{{2}}}px; padding-top:{{{3}}}px; padding-right:{{{4}}}px; padding-bottom:{{{5}}}px;text-align:right;font-weight:bold;">{{{6}}}</div>}}
 
{{#ifeq: {{{1}}} |c| <div style="padding-left:{{{2}}}px; padding-top:{{{3}}}px; padding-right:{{{4}}}px; padding-bottom:{{{5}}}px;text-align:center;font-weight:bold;">{{{6}}}</div>}}
 
|{{#ifeq:{{{4|}}}|{{{4}}}
 
|
 
{{#ifeq: {{{1}}} |l| <div style="padding-top:{{{2}}}px; padding-bottom:{{{3}}}px;text-align:left;font-weight:bold;">{{{4}}}</div>}}
 
{{#ifeq: {{{1}}} |r| <div style="padding-top:{{{2}}}px; padding-bottom:{{{3}}}px;text-align:right;font-weight:bold;">{{{4}}}</div>}}
 
{{#ifeq: {{{1}}} |c| <div style="padding-top:{{{2}}}px; padding-bottom:{{{3}}}px;text-align:center;font-weight:bold;">{{{4}}}</div>}}
 
 
 
 
 
|    {{#ifeq:{{{3|}}}|{{{3}}}
 
|
 
{{#ifeq: {{{1}}} |l| <div style="padding-top:{{{2}}}px; padding-bottom:{{{2}}}px;text-align:left;font-weight:bold;">{{{3}}}</div>}}
 
{{#ifeq: {{{1}}} |r| <div style="padding-top:{{{2}}}px; padding-bottom:{{{2}}}px;text-align:right;font-weight:bold;">{{{3}}}</div>}}
 
{{#ifeq: {{{1}}} |c| <div style="padding-top:{{{2}}}px; padding-bottom:{{{2}}}px;text-align:center;font-weight:bold;">{{{3}}}</div>}}
 
|
 
{{#ifeq:{{{2|}}}|{{{2}}}
 
|
 
  {{#ifeq: {{{1}}} |l| <div style="text-align:left;font-weight:bold;">{{{2}}}</div>}}
 
  {{#ifeq: {{{1}}} |r| <div style="text-align:right;font-weight:bold;">{{{2}}}</div>}}
 
  {{#ifeq: {{{1}}} |c| <div style="text-align:center;font-weight:bold;">{{{2}}}</div>}}
 
| <div style="text-align:left;font-weight:bold;">{{{1}}}</div>
 
}}
 
}}
 
}}
 
}}
 
</includeonly>
 

Latest revision as of 06:00, 1 October 2020

This template is used for subtitles. It is mainly used for the WatchTower magazines, but it can be used for other types of literature.

Usage

Code Example Result
{{raw:data:s|text}} {{raw:data:s|the actual subtitle}}
The actual subtitle
{{raw:data:s|10|text}} {{raw:data:s|10|the actual subtitle}}
The actual subtitle
{{raw:data:s|bold|text}} {{raw:data:s|bold|the actual subtitle}}
The actual subtitle
{{raw:data:s|bold|10|text}} {{raw:data:s|bold|10|the actual subtitle}}
The actual subtitle

Usage in combination with other templates for align and set margins

Code Example Result
{{raw:data:m|50|{{raw:data:s|bold|10|text}}}} {{raw:data:m|50|{{raw:data:s|bold|10|The actual subtitle}}}}
The actual subtitle
{{raw:data:ai|1|r|{{raw:data:s|bold|10|text}}}} {{raw:data:ai|1|r|{{raw:data:s|bold|10|The actual subtitle}}}}
The actual subtitle