User:Flashjay/templates/GCDissueTOCtest01: Difference between revisions
No edit summary |
No edit summary |
||
(48 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
--><!-- | --><!-- | ||
-->'''Active test start''' | -->'''Active test start''' | ||
<ol style="list-style: outside none none;"> | <div style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 20px; border-spacing: 0px 0px; border: 2px solid black; background: none; font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 1em;"> | ||
<li style="background-color: {{#ifeq: {{#expr:{{{tocnumber|1}}}mod2 }} | 0 | | {| style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 0px; border-spacing: 0px 0px; border: 2px solid black; background: none; font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 1em;" | ||
<li style="background-color: {{#ifeq: {{#expr:{{{tocnumber|2}}}mod2 }} | 0 | | |- style="height: 30px; font-size: 1.2em; background-color: black; color: white;" | ||
| style="text-align: left; padding-left: 10px; padding-right: 10px;"|'''Table of Contents''' | |||
|- | |||
|} | |||
<ol style="list-style: outside none none; margin: 0;"> | |||
<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{{tocnumber|1}}}mod2 }} | 0 | white | #ddd }};">{{{tocnumber|1}}}. About the author</li> | |||
<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{{tocnumber|2}}}mod2 }} | 0 | white | #ddd }};">{{{tocnumber|2}}}. Foreword to the first edition<br /> | |||
Feature is</li> | Feature is</li> | ||
<li style="background-color: {{#ifeq: {{#expr:{{{tocnumber|3}}}mod2 }} | 0 | yellow | {{ | <li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{{tocnumber|3}}}mod2 }} | 0 | yellow | {{#var:testcolour}} }};">{{{tocnumber|3}}}. Foreword to the second edition</li> | ||
</ol> | </ol> | ||
</div> | |||
'''Active test finish'''<!-- | '''Active test finish'''<!-- | ||
--> | |||
<!-- | |||
-->'''Active test start 2''' | |||
<div style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 20px; border-spacing: 0px 0px; border: 2px solid black; background: none; font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 1em;"> | |||
{| style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 0px; border-spacing: 0px 0px; border: 2px solid black; background: none; font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 1em;" | |||
|- style="height: 30px; font-size: 1.2em; background-color: black; color: white;" | |||
| style="text-align: left; padding-left: 10px; padding-right: 10px;"|'''Table of Contents''' | |||
|- | |||
|} | |||
<ol style="list-style: outside none none; margin: 0;"> | |||
<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{{tocnumber|1}}}mod2 }} | 0 | white | #ddd }};">{{{tocnumber|1}}}. {{#var:toctitle.1}}</li> | |||
{{#vardefine:tocnumber|{{#expr:{{#var:tocnumber}}+3}}}} | |||
{{ #if:{{#var:toctitle.4|}}|<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{#explode:{{#var:toctitle.4}}|.|0}}mod2 }} | 0 | white | #ddd }};">{{#var:toctitle.4}}<br /> | |||
Feature is</li> }} | |||
<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{{tocnumber|3}}}mod2 }} | 0 | yellow | {{#var:testcolour}} }};"><span id="toc2">{{#var:TestSeqNOT2}}. [[#Unique anchor name 1|{{#var:TestTitleorFirstline2}}]]</span><br /> | |||
TocCounter:{{#var:TocCounter}}</li> | |||
<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{#var:TocSeq2}}mod2 }} | 0 | yellow | green }};"><span id="toc4">{{#var:TocSeq2}}. [[#Unique anchor name 1|{{#var:TocTitle2}}]]</span>{{ #if:{{#var:TocFeature2|}}|<br />{{#var:TocFeature2}}|<br />{{#var:TocFeature2|No feature selected Test Default}}}}</li> | |||
</ol> | |||
</div> | |||
'''Active test finish 2'''<!-- | |||
--> | |||
<!-- | |||
-->'''Active test start 3''' | |||
<div style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 20px; border-spacing: 0px 0px; border: 2px solid black; background: none; font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 1em;"> | |||
{| style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 0px; border-spacing: 0px 0px; border: 2px solid black; background: none; font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 1em;" | |||
|- style="height: 30px; font-size: 1.2em; background-color: black; color: white;" | |||
| style="text-align: left; padding-left: 10px; padding-right: 10px;"|'''Table of Contents''' | |||
|- | |||
|} | |||
<ol style="list-style: outside none none; margin: 0;">{{#vardefine:TocNum|1}}<!-- | |||
--><!-- | |||
--><!-- | |||
-->{{ #if:{{#var:TocSeq{{#var:TocNum}}|}}|<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{#var:TocSeq{{#var:TocNum}}}}mod2 }} | 0 | yellow | red }};"><span id="toc{{#var:TocNum}}">{{#var:TocSeq{{#var:TocNum}}}}. [[#Unique anchor name {{#var:TocNum}}|{{#var:TocTitle{{#var:TocNum}}}}]]</span>{{ #if:{{#var:TocFeature{{#var:TocNum}}|}}|<br />{{#var:TocFeature{{#var:TocNum}}}}}}</li>}}<!-- | |||
-->{{#vardefine:TocNum|{{#expr:{{#var:TocNum}}+1}}}}<!-- | |||
--><!-- | |||
-->{{ #if:{{#var:TocSeq{{#var:TocNum}}|}}|<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{#var:TocSeq{{#var:TocNum}}}}mod2 }} | 0 | yellow | red }};"><span id="toc{{#var:TocNum}}">{{#var:TocSeq{{#var:TocNum}}}}. [[#Unique anchor name {{#var:TocNum}}|{{#var:TocTitle{{#var:TocNum}}}}]]</span>{{ #if:{{#var:TocFeature{{#var:TocNum}}|}}|<br />{{#var:TocFeature{{#var:TocNum}}}}}}</li>}}<!-- | |||
-->{{#vardefine:TocNum|{{#expr:{{#var:TocNum}}+1}}}}<!-- | |||
--><!-- | |||
-->{{ #if:{{#var:TocSeq{{#var:TocNum}}|}}|<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{#var:TocSeq{{#var:TocNum}}}}mod2 }} | 0 | yellow | red }};"><span id="toc{{#var:TocNum}}">{{#var:TocSeq{{#var:TocNum}}}}. [[#Unique anchor name {{#var:TocNum}}|{{#var:TocTitle{{#var:TocNum}}}}]]</span>{{ #if:{{#var:TocFeature{{#var:TocNum}}|}}|<br />{{#var:TocFeature{{#var:TocNum}}}}}}</li>}}<!-- | |||
-->{{#vardefine:TocNum|{{#expr:{{#var:TocNum}}+1}}}}<!-- | |||
--><!-- | |||
-->{{ #if:{{#var:TocSeq{{#var:TocNum}}|}}|<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{#var:TocSeq{{#var:TocNum}}}}mod2 }} | 0 | yellow | red }};"><span id="toc{{#var:TocNum}}">{{#var:TocSeq{{#var:TocNum}}}}. [[#Unique anchor name {{#var:TocNum}}|{{#var:TocTitle{{#var:TocNum}}}}]]</span>{{ #if:{{#var:TocFeature{{#var:TocNum}}|}}|<br />{{#var:TocFeature{{#var:TocNum}}}}}}</li>}}<!-- | |||
-->{{#vardefine:TocNum|{{#expr:{{#var:TocNum}}+1}}}}<!-- | |||
--><!-- | |||
-->{{ #if:{{#var:TocSeq{{#var:TocNum}}|}}|<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{#var:TocSeq{{#var:TocNum}}}}mod2 }} | 0 | yellow | red }};"><span id="toc{{#var:TocNum}}">{{#var:TocSeq{{#var:TocNum}}}}. [[#Unique anchor name {{#var:TocNum}}|{{#var:TocTitle{{#var:TocNum}}}}]]</span>{{ #if:{{#var:TocFeature{{#var:TocNum}}|}}|<br />{{#var:TocFeature{{#var:TocNum}}}}}}</li>}}<!-- | |||
-->{{#vardefine:TocNum|{{#expr:{{#var:TocNum}}+1}}}}<!-- | |||
--><!-- | |||
-->{{ #if:{{#var:TocSeq{{#var:TocNum}}|}}|<li style="margin: 0; padding-left: 10px; background-color: {{#ifeq: {{#expr:{{#var:TocSeq{{#var:TocNum}}}}mod2 }} | 0 | yellow | red }};"><span id="toc{{#var:TocNum}}">{{#var:TocSeq{{#var:TocNum}}}}. [[#Unique anchor name {{#var:TocNum}}|{{#var:TocTitle{{#var:TocNum}}}}]]</span>{{ #if:{{#var:TocFeature{{#var:TocNum}}|}}|<br />{{#var:TocFeature{{#var:TocNum}}}}}}</li>}}<!-- | |||
-->{{#vardefine:TocNum|{{#expr:{{#var:TocNum}}+1}}}}<!-- | |||
--> | |||
</ol> | |||
</div> | |||
'''Active test finish 3'''<!-- | |||
--></includeonly><!-- | --></includeonly><!-- | ||
--><noinclude>Divide 0 by 2 = remainder {{#expr:0mod2}} {{#ifeq: {{#expr:0mod2 }} | 0 | Even false | Odd true }} | --><noinclude> | ||
Result of explode (101&&&this. is a. title) = {{#explode:101&&&this. is a. title|&&&|0}} | |||
Result of explode (101&&&this. is a. title) = {{#explode:101&&&this. is a. title|&&&|-1}} | |||
Result of explode (101.this. is a. title) = {{#explode:101.this. is. a. .title|.|2}} | |||
<nowiki>{{User:Flashjay/templates/GCDissueTOCtest01 | |||
|testcolour=red | |||
}}</nowiki> | |||
{{#vardefine:toctitle.1|First title}}<!-- | |||
-->{{#vardefine:toctitle.2|Second title}}<!-- | |||
-->{{#vardefine:toctitle.3|Third title}}<!-- | |||
-->{{#vardefine:toctitle.4|982. Fourth title with number added}}<!-- | |||
-->{{#vardefine:testcolour|red}}<!-- | |||
-->{{#vardefine:tocnumber|1}} | |||
Result of explode (#explode:{{#var:toctitle.4}}|.|0) = {{#explode:{{#var:toctitle.4}}|.|0}} | |||
{{User:Flashjay/templates/GCDissueTOCtest01}} | |||
Divide 0 by 2 = remainder {{#expr:0mod2}} {{#ifeq: {{#expr:0mod2 }} | 0 | Even false | Odd true }} | |||
Divide 2 by 2 = remainder {{#expr:2mod2}} {{#ifeq: {{#expr:2mod2 }} | 0 | Even false | Odd true }} | Divide 2 by 2 = remainder {{#expr:2mod2}} {{#ifeq: {{#expr:2mod2 }} | 0 | Even false | Odd true }} | ||
Line 21: | Line 115: | ||
<ol start="2" style="list-style | <ol start="2" style="list-style: outside none none;"> | ||
<li>About the author</li> | <li>About the author</li> | ||
<li style="background-color: #ddd;">Foreword to the first edition<br /> | <li style="background-color: #ddd;">Foreword to the first edition<br /> | ||
Line 27: | Line 121: | ||
<li style="background-color: {{{testcolour|yellow}}};">Foreword to the second edition</li> | <li style="background-color: {{{testcolour|yellow}}};">Foreword to the second edition</li> | ||
</ol> | </ol> | ||
<div style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 20px; border-spacing: 0px 0px; border: 2px solid black; background: none; font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 1em;"> | |||
{| style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 0px; border-spacing: 0px 0px; border: 2px solid black; background: none; font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 1em;" | |||
|- style="height: 30px; font-size: 1.2em; background-color: black; color: white;" | |||
| style="text-align: left; padding-left: 10px; padding-right: 10px;"|'''Table of Contents''' | |||
|- | |||
|} | |||
<ol start="2" style="list-style: outside none none; margin-left: 0;"> | |||
<li>About the author</li> | |||
<li style="background-color: #ddd; padding-left: 5px;">Foreword to the first edition<br /> | |||
Feature is</li> | |||
<li style="background-color: {{{testcolour|yellow}}};">Foreword to the second edition</li> | |||
</ol> | |||
</div> | |||
<ol style="list-style: | <ol style="list-style-type: decimal;"> | ||
<li style="background-color: {{#ifeq: {{#expr:{{{tocnumber|1}}}mod2 }} | 0 | yellow | red }};">{{{tocnumber|1}}}. About the author</li> | <li style="background-color: {{#ifeq: {{#expr:{{{tocnumber|1}}}mod2 }} | 0 | yellow | red }};">{{{tocnumber|1}}}. About the author</li> | ||
<li style="background-color: {{#ifeq: {{#expr:{{{tocnumber|2}}}mod2 }} | 0 | yellow | red }};">{{{tocnumber|2}}}. Foreword to the first edition<br /> | <li style="background-color: {{#ifeq: {{#expr:{{{tocnumber|2}}}mod2 }} | 0 | yellow | red }};">{{{tocnumber|2}}}. Foreword to the first edition<br /> | ||
Line 64: | Line 173: | ||
|- | |- | ||
| style="text-align: left; padding: 5px 10px 5px 10px; background-color: yellow;"| | | style="text-align: left; padding: 5px 10px 5px 10px; background-color: yellow;"| | ||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px;"|'''Script:''' John Smith | |||
|- | |||
|} | |||
{| style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 20px; border-spacing: 0px 0px; border: 2px solid black; background: none; font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 1em;" | |||
|- style="height: 30px; font-size: 1.2em; background-color: black; color: white;" | |||
| style="text-align: left; padding-left: 10px; padding-right: 10px;"|'''Table of Contents''' | |||
|- | |||
| style="text-align: left; padding: 5px 10px 5px 10px;"| | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px; background-color: yellow;"|'''0.''' Title<br />Feature Name | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px;"|'''Script:''' John Smith | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px; background-color: yellow;"|'''Script:''' John Smith | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px;"|'''Script:''' John Smith | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px; background-color: yellow;"|'''Script:''' John Smith | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px;"|'''Script:''' John Smith | |||
|- | |||
|} | |||
{| style="width: 100%; margin-left: auto; margin-right: auto; margin-top: 20px; border-spacing: 0px 0px; border: 2px solid black; background: none; font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 1em;" | |||
|- style="height: 30px; font-size: 1.2em; background-color: black; color: white;" | |||
| style="text-align: left; padding-left: 10px; padding-right: 10px;"|'''Table of Contents''' | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px; background-color: yellow;"|'''0.''' Title<br />Feature Name | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px;"|'''Script:''' John Smith | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px; background-color: yellow;"|'''Script:''' John Smith | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px;"|'''Script:''' John Smith | |||
|- | |||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px; background-color: yellow;"|'''Script:''' John Smith | |||
|- | |- | ||
| style="height: 20px; text-align: left; padding: 0px 10px 0px 10px;"|'''Script:''' John Smith | | style="height: 20px; text-align: left; padding: 0px 10px 0px 10px;"|'''Script:''' John Smith | ||
|- | |- | ||
|} | |} |
Latest revision as of 13:00, 11 January 2020
Result of explode (101&&&this. is a. title) = 101
Result of explode (101&&&this. is a. title) = this. is a. title
Result of explode (101.this. is a. title) = is
{{User:Flashjay/templates/GCDissueTOCtest01
|testcolour=red
}}
Result of explode (#explode:982. Fourth title with number added|.|0) = 982
Active test start
Table of Contents |
- 1. About the author
- 2. Foreword to the first edition
Feature is - 3. Foreword to the second edition
Active test finish
Active test start 2
Table of Contents |
- 1. First title
- 982. Fourth title with number added
Feature is - . [[#Unique anchor name 1|]]
TocCounter: - . [[#Unique anchor name 1|]]
No feature selected Test Default
Active test finish 2
Active test start 3
Table of Contents |
Active test finish 3
Divide 0 by 2 = remainder 0 Even false
Divide 2 by 2 = remainder 0 Even false
Divide 3 by 2 = remainder 1 Odd true
{{#ifeq: {{#expr: expression }} | 0 | value if false | value if true }}
Zero is false, any number is true
- About the author
- Foreword to the first edition
Feature is - Foreword to the second edition
Table of Contents |
- About the author
- Foreword to the first edition
Feature is - Foreword to the second edition
- 1. About the author
- 2. Foreword to the first edition
Feature is - 3. Foreword to the second edition
- About the author
- Foreword to the first edition
- Foreword to the second edition
{{User:Flashjay/templates/GCDissueTOCtest01 |testcolour=red }}
Active test start
Table of Contents |
- 1. About the author
- 2. Foreword to the first edition
Feature is - 3. Foreword to the second edition
Active test finish
Active test start 2
Table of Contents |
- 1. First title
- 982. Fourth title with number added
Feature is - . [[#Unique anchor name 1|]]
TocCounter: - . [[#Unique anchor name 1|]]
No feature selected Test Default
Active test finish 2
Active test start 3
Table of Contents |
Active test finish 3
Table of Contents |
Script: John Smith |
Table of Contents |
0. Title Feature Name |
Script: John Smith |
Script: John Smith |
Script: John Smith |
Script: John Smith |
Script: John Smith |
Table of Contents |
0. Title Feature Name |
Script: John Smith |
Script: John Smith |
Script: John Smith |
Script: John Smith |
Script: John Smith |