Difference between revisions of "Template:UB Gender"

From Nookipedia, the Animal Crossing wiki
(fix filename)
(removing template's reliance on the Variables extension)
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{userbox
 
{{userbox
| border-c = {{#switch: {{{1|Male}}}
+
| border-c = {{#if:{{{color1|}}}|{{{color1|}}}|{{#switch: {{lc:{{{1|}}}}}|female=#db7093|male=#4169e1|#default=#8580a2}}}}
|Male=#4169e1
+
| id      = {{{2|{{#switch:{{lc:{{{1|}}}}}
|Female=#db7093}}
+
|female=[[File:Player {{{num|6}}} NH.png{{!}}x40px]]
| id      = {{{2|{{#switch: {{{1|Male}}}
+
|male=[[File:Player {{{num|1}}} NH.png{{!}}x40px]]
|Male=[[File:BoyBCC NL.png{{!}}30px]]
+
|#default={{#if:{{{num|}}}|[[File:Player {{{num|1}}} NH.png{{!}}x40px]]|[[File:Rover Series Art 2D.png{{!}}x42px]]}}}}}}}
|Female=[[File:NLGirl1.png{{!}}24px]]}}}}}
+
| id-c    = {{#if:{{{color1|}}}|{{{color1|}}}|{{#switch: {{lc:{{{1|}}}}}|female=#db7093|male=#4169e1|#default=#8580a2}}}}
| id-c    = {{#switch: {{{1|Male}}}
+
| info    = This user's gender is {{#switch:{{lc:{{{1|}}}}}|male=male|female=female|#default={{{1|undisclosed}}}}}.
|Male=#4169e1
+
| info-c  = {{#if:{{{color2|}}}|{{{color2|}}}|{{#switch: {{lc:{{{1|}}}}}|female=#ffb6c1|male=#6495ed|#default=#bfb7e8}}}}
|Female=#db7093}}
 
| info    = This user is {{#switch: {{{1|Male}}}
 
|Male=male
 
|Female=female}}.
 
| info-c  = {{#switch: {{{1|Male}}}
 
|Male=#6495ed
 
|Female=#ffb6c1}}
 
 
}}<noinclude>
 
}}<noinclude>
{{clr}}
+
{{clear}}<br>{{Documentation}}
 
 
==Usage==
 
===Base===
 
<pre>{{UB Gender|<Gender>}}</pre>
 
 
 
===Customization===
 
This userbox may be customized to display a different gender. Replace ''<Gender>'' in the above code with one of the options below to change the template.
 
 
 
*'''Male''' <small>(Default)</small>
 
*'''Female'''
 
 
 
Additionally, the image displayed in this userbox may be customized:
 
<pre>{{UB Gender|<Gender>|<Image>}}</pre>
 
Replace ''<Image>'' with the desired image code.
 
 
 
===Examples===
 
{{UBDisplay
 
|box={{UB Gender|Female}}
 
|use=<nowiki>{{UB Gender|Female}}</nowiki>
 
}}
 
{{UBDisplay
 
|box={{UB Gender|Male|[[File:NLBoy3.png|20px]]}}
 
|use=<nowiki>{{UB Gender|Male|[[File:NLBoy3.png|20px]]</nowiki>
 
}}
 
{{UBDisplay
 
|box={{UB Gender|Female|[[File:NLGirl2.png|26px]]}}
 
|use=<nowiki>{{UB Gender|Female|[[File:NLGirl2.png|26px]]</nowiki>
 
}}
 
 
[[Category:Userboxes]]</noinclude>
 
[[Category:Userboxes]]</noinclude>

Latest revision as of 13:00, November 1, 2022

Rover Series Art 2D.png This user's gender is undisclosed.


Template documentation (view)


Usage

Base

{{UB Gender|<Gender>}}

Customization

This userbox accepts and displays any gender value entered. It will display pre-defined colors for the following inputs:

  • Female
  • Male

The border and image background color can be customized using the color1 parameter. (example: color1=#bfb7e8)

The text background color can be customized using the color2 parameter. (example: color2=#8580a2)

Additionally, the image displayed in this userbox may be customized:

  • By assigning the num parameter a value from 1 to 10 to cycle through New Horizons player images.
  • By entering a custom image code as the second input. (example: {{UB Gender|Genderless|[[File:Player 1 NH.png|20px]]}})

Examples

Rover Series Art 2D.png This user's gender is undisclosed.
{{UB Gender|undisclosed}}
Player 6 NH.png This user's gender is female.
{{UB Gender|female}}
Player 1 NH.png This user's gender is male.
{{UB Gender|male}}
Player 10 NH.png This user's gender is non-binary.
{{UB Gender|non-binary|num=10|color1=#7e21c9|color2=#fff94c}}