Template:Font color/doc

From EnigmaGuy Wiki
Revision as of 12:57, 21 March 2015 by Enigmaguy (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{{#ifeq:doc |doc

    | 

{{#ifeq:show |show

|

        }}{{#if: |
         |   {{#ifexist:Template:Font color
                  | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  | 
                 }}
        }}
    | 
   }}

Usage

Parameters

Use / description Default
{{{1}}} font color default
{{{2}}} text
link page link
Or
Use / description Default
{{{1}}} font color default
{{{2}}} background color default
{{{3}}} text
link page link


{{{{#if: |subst:}}font color{{#if:<text color> ||<text color>}}{{#if:<background color> ||<background color>}}{{#if:<text> ||<text>}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||}}}}

Examples:

{{#if: ||+ {{{title}}}}} {{#if: |
Markup Renders as

}}{{#if:{{font color|green|green text}} |

{{font color|green|green text}} 
{{ safesubst:#if: {{ safesubst:#if: yes [[|]] [[|]]
     }}
   }}
{{ safesubst:#if: yes green text [[|green text]]
   }}
green text
 }}

}}

}}{{#if:{{font color|blue|do not style text as a link}}  |
{{font color|blue|do not style text as a link}} 
{{ safesubst:#if: {{ safesubst:#if: yes [[|]] [[|]]
     }}
   }}
{{ safesubst:#if: yes do not style text as a link [[|do not style text as a link]]
   }}
do not style text as a link
 }}

}}

}}{{#if:{{font color|white|black|white with black background}}  |
{{font color|white|black|white with black background}} 
{{ safesubst:#if: white with black background {{ safesubst:#if: yes white with black background [[|white with black background]]
     }}
white with black background
   }}
{{ safesubst:#if: yes black [[|black]]
   }}
black
 }}

}}

}}{{#if:{{font color||yellow|default text in yellow background}}  |
{{font color||yellow|default text in yellow background}} 
{{ safesubst:#if: default text in yellow background {{ safesubst:#if: yes default text in yellow background [[|default text in yellow background]]
     }}
default text in yellow background
   }}
{{ safesubst:#if: yes yellow [[|yellow]]
   }}
yellow
 }}

}}

}}{{#if:  |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}

The |{{#if:link|link=}} parameter is useful where a link is placed in a colored header such as a navbox. For example, if the header was blue, you would leave the background color blank and set the font color to white. |{{#if:link|link=}}yes sets the link to the text, otherwise it is set to the value of |{{#if:link|link=}}.

{{#if: ||+ {{{title}}}}} {{#if: |
Markup Renders as

}}{{#if:{{font color|white|blue|Wikipedia:Example|link=yes}} |

{{font color|white|blue|Wikipedia:Example|link=yes}} 
{{ safesubst:#if: Wikipedia:Example {{ safesubst:#if: yes yes Wikipedia:Example Wikipedia:Example
     }}
Wikipedia:Example
   }}
{{ safesubst:#if: yes yes blue blue
   }}
blue
 }}

}}

}}{{#if:{{font color|white|blue|Wikipedia:Example|link=Wikipedia:Sandbox}}  |
{{font color|white|blue|Wikipedia:Example|link=Wikipedia:Sandbox}} 
{{ safesubst:#if: Example {{ safesubst:#if: Wikipedia:Sandbox yes Example Example
     }}
Example
   }}
{{ safesubst:#if: Wikipedia:Sandbox yes blue blue
   }}
blue
 }}

}}

}}{{#if:  |
 
}}{{#if:  |
 
}}{{#if:  |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}{{#if: |
 
}}

See also