The forum pages are fully operational! See this link for the latest forum topics, where users can collaborate or discuss certain topics in one place!

Difference between revisions of "Template:Colorsquare"

From Arthur Wiki
Jump to navigationJump to search
(Created page with "<includeonly>{{#ifexpr:({{#if:{{#pos:{{{1}}}|perbang.dk}}|1|0}} and {{#if:{{#pos:{{{1}}}|<br}}|0|1}}) or {{#if:{{{2|}}}|1|0}}|<span style="background-color:#{{#ifeq:{{#len:{{{...")
Tag: sourceedit
 
m
 
Line 1: Line 1:
<includeonly>{{#ifexpr:({{#if:{{#pos:{{{1}}}|perbang.dk}}|1|0}} and {{#if:{{#pos:{{{1}}}|<br}}|0|1}}) or {{#if:{{{2|}}}|1|0}}|<span style="background-color:#{{#ifeq:{{#len:{{{1}}}}}|6|{{{1}}}|{{#explode:{{{1}}}|/|4}}}};">{{#ifexpr:{{#if:{{#explode:{{{1}}}|perbang.dk|2}}|1|0}} and {{#if:{{#explode:{{{1}}}|perbang.dk|3}}|0|1}}|<span style="padding:0 0.25em; color:#{{#sub:{{#explode:{{{1}}}|perbang.dk/rgb/|2}}|0|6}};">'''&curren;'''</span>|&emsp;}}</span>|}} {{#if:{{{2|}}}||{{{1}}}}}</includeonly><noinclude>A utility template currently used by {{T|Infobox character}}. When passed a parameter containing a [http://www.perbang.dk/ perbang.dk] URL, it will display a square of that color and then whatever the parameter was. The presence of at least one line break (<nowiki><br /></nowiki>) in the parameter will disable the square. If multiple links are present, only the first will be shown; if there are exactly two URLs, the square will have a character in it the color of the second one. Defining a second parameter makes the template not display the given parameter (this is for using the template manually). If defining the second parameter, you can also pass simply the hex color code (six digits) as the first parameter. Feel free to [[User talk:Bobogoobo|make suggestions]] for this template (or others).
<includeonly>{{#ifexpr:({{#if:{{#pos:{{{1}}}|perbang.dk}}|1|0}} and {{#if:{{#pos:{{{1}}}|<br}}|0|1}}) or {{#if:{{{2|}}}|1|0}}|<span style="background-color:#{{#ifeq:{{#len:{{{1}}}}}|6|{{{1}}}|{{#explode:{{{1}}}|/|4}}}};">{{#ifexpr:{{#if:{{#explode:{{{1}}}|perbang.dk|2}}|1|0}} and {{#if:{{#explode:{{{1}}}|perbang.dk|3}}|0|1}}|<span style="padding:0 0.25em; color:#{{#sub:{{#explode:{{{1}}}|perbang.dk/rgb/|2}}|0|6}};">'''&curren;'''</span>|&emsp;}}</span>|}} {{#if:{{{2|}}}||{{{1}}}}}</includeonly><noinclude>When passed a parameter containing a [http://www.perbang.dk/ perbang.dk] URL, it will display a square of that color and then whatever the parameter was. The presence of at least one line break (<nowiki><br /></nowiki>) in the parameter will disable the square. If multiple links are present, only the first will be shown; if there are exactly two URLs, the square will have a character in it the color of the second one. Defining a second parameter makes the template not display the given parameter (this is for using the template manually). If defining the second parameter, you can also pass simply the hex color code (six digits) as the first parameter. Feel free to [[User talk:Bobogoobo|make suggestions]] for this template (or others).
[[Category:Templates|{{PAGENAME}}]]</noinclude>
[[Category:Templates|{{PAGENAME}}]]</noinclude>

Latest revision as of 03:22, 20 July 2020

When passed a parameter containing a perbang.dk URL, it will display a square of that color and then whatever the parameter was. The presence of at least one line break (<br />) in the parameter will disable the square. If multiple links are present, only the first will be shown; if there are exactly two URLs, the square will have a character in it the color of the second one. Defining a second parameter makes the template not display the given parameter (this is for using the template manually). If defining the second parameter, you can also pass simply the hex color code (six digits) as the first parameter. Feel free to make suggestions for this template (or others).