Difference between revisions of "Template:Color"

From Nookipedia, the Animal Crossing wiki
m
m
Line 40: Line 40:
 
| Colorful = linear-gradient(to right, #ff9999,#adebad {{#if:{{{small|}}}|50|40}}%, #adebad, #adebad {{#if:{{{small|}}}|50|60}}%, #9999ff)
 
| Colorful = linear-gradient(to right, #ff9999,#adebad {{#if:{{{small|}}}|50|40}}%, #adebad, #adebad {{#if:{{{small|}}}|50|60}}%, #9999ff)
 
| #default= {{{1|#e6e6e6}}}
 
| #default= {{{1|#e6e6e6}}}
}}; {{roundy|{{{roundy|9px}}}}} {{#if:{{{display|}}}|display:{{{display|inline-block}}};}} text-align:center; padding:3px; margin:{{{margin|3px}}}{{#if:{{{center|}}}|<nowiki> </nowiki>auto}}; {{#switch:{{{1|}}}|white|White= border:1px solid #ccc;}} {{#if:{{{small|}}}|width:{{{width|5px}}}; line-height:{{{height|5px}}}; display:inline-block;">&nbsp;</div><div style="display:inline-block;"><small>{{#if:{{{no-text|}}}||{{{1|N/A}}}}}</small></div>| width:{{{width|4.5em}}}; {{#if:{{{height|}}}|line-height:{{{height|}}};}}"><small>{{#switch:{{{link|}}}| Yes =  
+
}}; {{roundy|{{{roundy|9px}}}}} {{#if:{{{display|}}}|display:{{{display|inline-block}}};}} text-align:center; padding:3px; margin:{{{margin|3px}}}{{#if:{{{center|}}}|<nowiki> </nowiki>auto}}; {{#switch:{{{1|}}}|white|White= border:1px solid #ccc;}} {{#if:{{{small|}}}|width:{{{width|5px}}}; line-height:{{{height|5px}}}; display:inline-block;">&nbsp;</div><div style="display:inline-block;"><small>{{#if:{{{text|}}}|{{{text|}}}|{{{1|N/A}}}}}</small></div>| width:{{{width|4.5em}}}; {{#if:{{{height|}}}|line-height:{{{height|}}};}}"><small>{{#switch:{{{link|}}}| Yes =  
 
{{#switch:{{{1|}}}
 
{{#switch:{{{1|}}}
 
| Red      = [[List of red furniture items|<span style="color:black">Red</span>]]
 
| Red      = [[List of red furniture items|<span style="color:black">Red</span>]]
Line 56: Line 56:
 
| Black    = [[List of black furniture items|<span style="color:black">Black</span>]]
 
| Black    = [[List of black furniture items|<span style="color:black">Black</span>]]
 
| Colorful  = [[List of colorful furniture items|<span style="color:black">Colorful</span>]]
 
| Colorful  = [[List of colorful furniture items|<span style="color:black">Colorful</span>]]
}}|#default = {{#if:{{{no-text|}}}||{{{1|N/A}}}}}}}</small></div>}}
+
}}|#default = {{#if:{{{text|}}}|{{{text|}}}|{{{1|N/A}}}}}}}</small></div>}}
 
<noinclude>{{Documentation}}</noinclude>
 
<noinclude>{{Documentation}}</noinclude>

Revision as of 05:23, April 2, 2022

N/A

Template documentation (view)


Emotion Surprise NH Icon cropped.png
This template is complex or is transcluded on a large number of pages.
Due to the sensitive nature of this template, caution is advised before editing. Any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.
Emotion Surprise NH Icon cropped.png
This template is complex or is transcluded on a large number of pages.
Due to the sensitive nature of this template, caution is advised before editing. Any changes should first be tested in a sandbox. Please consider discussing planned changes on the talk page or with staff members before implementing them.

Usage

{{Color|<color>|height=<optional>|width=<optional>|margin=<optional>|display=<optional>|roundy=<optional>|small=<optional>|center=<optional>}}

This template creates a div with a background of a given color, with the name of the color centered inside. If no value is entered, a default color is used and box displays 'N/A'. Setting any value for the small parameter will result in the colored box being placed to the left of the text rather than enveloping it.

 Supported Colors
Red
Green
Blue
Yellow
Orange
Pink
Purple
L. Blue
Beige
Brown
Gray
White
Colorful
Black
Default

Example

{{Color|Red|width=100px}}
Red
{{Color|Red|small=yes}}
 
Red