Difference between revisions of "Templates"

From Gladiabots Wiki
Jump to: navigation, search
(Used Templates)
Line 4: Line 4:
  
 
{|class="wikitable"
 
{|class="wikitable"
!Template!!Code!!Description!!Example
+
!Template!!Description!!Example code!!Example output
 
|-
 
|-
|[[Template:Red]]        ||<code><nowiki>style="background:#[Hexadecimal code]"</nowiki></code>
+
|[[Template:Red]]        ||Defines the red background color for table cells globally          ||<code><nowiki>{{red}}|red text              </nowiki></code>||{{red}}  |red text
|Defines the red background color for table cells globally          ||{{red}}  |red text
+
 
|-
 
|-
|[[Template:Yellow]]    ||<code><nowiki>style="background:#[Hexadecimal code]"</nowiki></code>
+
|[[Template:Yellow]]    ||Defines the yellow background color for table cells globally      ||<code><nowiki>{{yellow}}|yellow text        </nowiki></code>||{{yellow}}|yellow text
|Defines the yellow background color for table cells globally      ||{{yellow}}|yellow text
+
 
|-
 
|-
|[[Template:Green]]      ||<code><nowiki>style="background:#[Hexadecimal code]"</nowiki></code>
+
|[[Template:Green]]      ||Defines the green background color for table cells globally        ||<code><nowiki>{{green}}|green text          </nowiki></code>||{{green}} |green text
|Defines the green background color for table cells globally        ||{{green}} |green text
+
 
|-
 
|-
|[[Template:Blue]]      ||<code><nowiki>style="background:#[Hexadecimal code]"</nowiki></code>
+
|[[Template:Blue]]      ||Defines the blue background color for table cells globally        ||<code><nowiki>{{blue}}|blue text            </nowiki></code>||{{blue}}  |blue text
|Defines the blue background color for table cells globally        ||{{blue}}  |blue text
+
 
|-
 
|-
|[[Template:C]]          ||<code><nowiki>align="center"</nowiki></code>
+
|[[Template:C]]          ||Shortens the code needed for centered cells.                      ||<code><nowiki>{{c}}|center                 </nowiki></code>||{{c}}    |center
|Shortens the code needed for centered cells.                      ||{{c}}    |center
+
 
|-
 
|-
|[[Template:R]]          ||<code><nowiki>align="right"</nowiki></code>
+
|[[Template:R]]          ||Shortens the code needed for right aligned cells.                  ||<code><nowiki>{{r}}|right                   </nowiki></code>||{{r}}    |right
|Shortens the code needed for right aligned cells.                  ||{{r}}    |right
+
 
|-
 
|-
|[[Template:X]]          ||<code><nowiki>align="center" style="background:#[Hexadecimal code]"|X</nowiki></code>
+
|[[Template:X]]          ||Shortens the code needed for green centered cells named "X".      ||<code><nowiki>{{X}}                        </nowiki></code>||{{X}}
|Shortens the code needed for green centered cells named "X".      ||{{X}}
+
 
|-
 
|-
|[[Template:O]]          ||<code><nowiki></nowiki></code>
+
|[[Template:O]]          ||Shortens the code needed for normal uncentered cells not named "O".||<code><nowiki>{{O}}                        </nowiki></code>||{{O}}
|Shortens the code needed for normal uncentered cells not named "O".||{{O}}
+
 
|-
 
|-
|[[Template:Information]]||<code><nowiki>{|</nowiki><br/><nowiki>|valign="top"|[[File:Information.png]]</nowiki><br/><nowiki>|style="width: 5px; background-color: #[Hexadecimal code];"| </nowiki><br/><nowiki>|{{{1}}}</nowiki><br/><nowiki>|}</nowiki></code>
+
|[[Template:Information]]||Shows an information message.                                      ||<code><nowiki>{{Information|Precious hint.}}</nowiki></code>||{{Information|Precious hint.}}
|Shows an information message.                                      ||{{Information|Precious hint.}}
+
 
|-
 
|-
|[[Template:Warning]]    ||<code><nowiki>{|</nowiki><br><nowiki>|valign="top"|[[File:Warning.png]]</nowiki><br/><nowiki>|style="width: 5px; background-color: #[Hexadecimal code];"| </nowiki><br/><nowiki>|{{{1}}}</nowiki><br><nowiki>|}</nowiki></code>
+
|[[Template:Warning]]    ||Shows a warning message.                                          ||<code><nowiki>{{Warning|Take care.}}       </nowiki></code>||{{Warning|Take care.}}
|Shows a warning message.                                          ||{{Warning|Take care.}}
+
 
|-
 
|-
|[[Template:Ratio]]      ||<code><nowiki>{{#tip-text: +{{{1}}}% -{{{2}}}% ={{{3}}}% | Victories: {{{1}}}%; Defeats: {{{2}}}%; Draws: {{{3}}}%}}</nowiki></code>
+
|[[Template:Ratio]]      ||Shows a victory-defeat-draw ratio.                                ||<code><nowiki>{{Ratio|75|25|0}}             </nowiki></code>||{{Ratio|75|25|0}}
|Shows a victory-defeat-draw ratio.                                ||{{Ratio|75|25|0}}
+
 
|}
 
|}
  

Revision as of 07:45, 12 October 2017

Used Templates

Templates can be used to reuse colors or wiki code in the whole project. Templates in use are:

Template Description Example code Example output
Template:Red Defines the red background color for table cells globally {{red}}|red text red text
Template:Yellow Defines the yellow background color for table cells globally {{yellow}}|yellow text yellow text
Template:Green Defines the green background color for table cells globally {{green}}|green text green text
Template:Blue Defines the blue background color for table cells globally {{blue}}|blue text blue text
Template:C Shortens the code needed for centered cells. {{c}}|center center
Template:R Shortens the code needed for right aligned cells. {{r}}|right right
Template:X Shortens the code needed for green centered cells named "X". {{X}}
Template:O Shortens the code needed for normal uncentered cells not named "O". {{O}}
Template:Information Shows an information message. {{Information|Precious hint.}}
Information.png Precious hint.
Template:Warning Shows a warning message. {{Warning|Take care.}}
Warning.png Take care.
Template:Ratio Shows a victory-defeat-draw ratio. {{Ratio|75|25|0}} +75% -25% =0%

Examples

The second numeric column uses right aligned cells and is colored green, yellow and red. The third column is centered. The forth column contains a value that is highlighted in blue. The fifth column contains a checkmark or not.

Lorem Ipsum Dolor Sit Igur
Amet 123 AAA nonumy
Consetetur 10 AA nonumy
sadipscing 789 A nonumy
elitr -12 B nonumy
sed 20 C eirmod
diam 456 D nonumy
Information.png Precious hint.
Warning.png Take care.

A good player has stats like this: +85% -5% =10%.

Color schemes

What color scheme should be used in the wiki?

Microsoft Excel 2007

Lorem Ipsum Dolor Sit
Amet 123 AAA nonumy
Consetetur 10 AA nonumy
sadipscing 789 A nonumy
elitr -12 B nonumy
sed 20 C eirmod
diam 456 D nonumy

Google Docs 2017 bright 3

Lorem Ipsum Dolor Sit
Amet 123 AAA nonumy
Consetetur 10 AA nonumy
sadipscing 789 A nonumy
elitr -12 B nonumy
sed 20 C eirmod
diam 456 D nonumy

Google Docs 2017 bright 2

Lorem Ipsum Dolor Sit
Amet 123 AAA nonumy
Consetetur 10 AA nonumy
sadipscing 789 A nonumy
elitr -12 B nonumy
sed 20 C eirmod
diam 456 D nonumy

Google Docs 2017 bright 1

Lorem Ipsum Dolor Sit
Amet 123 AAA nonumy
Consetetur 10 AA nonumy
sadipscing 789 A nonumy
elitr -12 B nonumy
sed 20 C eirmod
diam 456 D nonumy

Google Docs 2017 normal

Lorem Ipsum Dolor Sit
Amet 123 AAA nonumy
Consetetur 10 AA nonumy
sadipscing 789 A nonumy
elitr -12 B nonumy
sed 20 C eirmod
diam 456 D nonumy

Google Docs 2017 normal - white color

Lorem Ipsum Dolor Sit
Amet 123 AAA nonumy
Consetetur 10 AA nonumy
sadipscing 789 A nonumy
elitr -12 B nonumy
sed 20 C eirmod
diam 456 D nonumy

Google Docs 2017 dark - white color

Lorem Ipsum Dolor Sit
Amet 123 AAA nonumy
Consetetur 10 AA nonumy
sadipscing 789 A nonumy
elitr -12 B nonumy
sed 20 C eirmod
diam 456 D nonumy

Source unknown

Previously used in the wiki.

Lorem Ipsum Dolor Sit
Amet 123 AAA nonumy
Consetetur 10 AA nonumy
sadipscing 789 A nonumy
elitr -12 B nonumy
sed 20 C eirmod
diam 456 D nonumy