Template:Infobox character: Difference between revisions
m (category) |
m (Automated Formatting) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
< | <noinclude>{{Documentation/sandbox|doc= | ||
| | This is an infobox used on articles about an in-game character. | ||
| | ==Usage== | ||
| | {{Infobox character | ||
| | |name=name | ||
| | |image=Image.png | ||
|image2=Image.png | |||
|image3=Image.png | |||
|image4=Image.png | |||
|image5=Image.png | |||
|image_name=image1 | |||
|image_name2=image2 | |||
|image_name3=image3 | |||
|image_name4=image4 | |||
|image_name5=image5 | |||
|nickname=nickname | |||
|sex=sex | |||
|personality=personality | |||
|occupation=occupation | |||
|traits=traits | |||
|location=location | |||
|coordinates=coordinates | |||
<!-- ITEMS --> | |||
|items=items | |||
}} | |||
<syntaxhighlight lang=text>{{Infobox character | |||
|name= | |||
|image= | |||
|image2= | |||
|image3= | |||
|image4= | |||
|image5= | |||
|image_name= | |||
|image_name2= | |||
|image_name3= | |||
|image_name4= | |||
|image_name5= | |||
<!-- GENERAL --> | |||
|nickname= | |||
|sex= | |||
|personality= | |||
|occupation= | |||
|traits= | |||
|location= | |||
|coordinates= | |||
<!-- ITEMS --> | |||
|items= | |||
}}</syntaxhighlight> | |||
{{Clear}} | |||
==Example== | |||
{{Infobox character | |||
| | |name=Kate Smith | ||
| | |image=805 max.jpg | ||
|image2=Kate.png | |||
| | |image3=Kate Smith.png | ||
| | |image4=K&B intro.png | ||
|image_name=Concept art | |||
| | |image_name2=Outfit | ||
| | |image_name3=In-game (past) | ||
|image_name4=In-game (future) | |||
| | |sex=Female | ||
| | |personality=Friendly | ||
|location=Bob and Kate's safehouse | |||
| | |coordinates=10746x9415 | ||
| | |items=Crutches, Bandages, Painkillers, Pillow | ||
}} | |||
| | <syntaxhighlight lang=text>{{Infobox character | ||
| | |name=Kate Smith | ||
|image=805 max.jpg | |||
| | |image3=Kate Smith.png | ||
| | |image4=K&B intro.png | ||
|image_name=Concept art | |||
| | |image_name2=Outfit | ||
| | |image_name3=In-game (past) | ||
|image_name4=In-game (future) | |||
| | |sex=Female | ||
|personality=Friendly | |||
|location=Bob and Kate's safehouse | |||
|coordinates=10746x9415 | |||
|items=Crutches, Bandages, Painkillers, Pillow | |||
}}</syntaxhighlight> | |||
{{Clear}} | |||
{{Translation guide|<syntaxhighlight lang="html"> | |||
{{#switch: {{{1|}}} | |||
<!-- section --> | |||
| general = General | |||
| items = Items | |||
<!-- data --> | |||
| nickname = Nickname | |||
| sex = Sex | |||
| personality = Personality | |||
| occupation = Occupation | |||
| traits = Traits | |||
| location = Location | |||
| #default = [[Category:Incorrect template usage]] | |||
}} | |||
</syntaxhighlight>}} | |||
}} | |||
{{ll|Category:Infobox}} | |||
</noinclude><includeonly>{{Infobox/sandbox | |||
| title = {{{name|{{#getdisplaytitle:{{FULLPAGENAME}}}}}}} | |||
| color = var(--color-red) | |||
| {{Infobox/image <!-- ## Image --> | |||
| p1 = {{#if:{{{image|}}}|[[File:{{{image}}}|{{{image_size|}}}|{{{image_name|{{{name|}}}}}}]]}} | |||
| 1 = {{#if:{{{image2|}}}|[[File:{{{icon|{{{image}}}}}}|{{{icon_name|{{{image_name|{{{name|}}}}}}}}}|link=]]}} | |||
| p2 = {{#if:{{{image2|}}}|[[File:{{{image2}}}|{{{image_size2|}}}|{{{image_name2|{{{name|}}}}}}]]}} | |||
| 2 = {{#if:{{{image2|}}}|[[File:{{{icon2|{{{image2}}}}}}|{{{icon_name2|{{{image_name2|{{{name|}}}}}}}}}|link=]]}} | |||
| p3 = {{#if:{{{image3|}}}|[[File:{{{image3}}}|{{{image_size3|}}}|{{{image_name3|{{{name|}}}}}}]]}} | |||
| 3 = {{#if:{{{image3|}}}|[[File:{{{icon3|{{{image3}}}}}}|{{{icon_name3|{{{image_name3|{{{name|}}}}}}}}}|link=]]}} | |||
| p4 = {{#if:{{{image4|}}}|[[File:{{{image4}}}|{{{image_size4|}}}|{{{image_name4|{{{name|}}}}}}]]}} | |||
| 4 = {{#if:{{{image4|}}}|[[File:{{{icon4|{{{image4}}}}}}|{{{icon_name4|{{{image_name4|{{{name|}}}}}}}}}|link=]]}} | |||
| p5 = {{#if:{{{image5|}}}|[[File:{{{image5}}}|{{{image_size5|}}}|{{{image_name5|{{{name|}}}}}}]]}} | |||
| 5 = {{#if:{{{image5|}}}|[[File:{{{icon5|{{{image5}}}}}}|{{{icon_name5|{{{image_name5|{{{name|}}}}}}}}}|link=]]}} | |||
| caption = {{#if: {{{image_caption|}}}|''{{{image_caption|}}}''}} | |||
}}{{#if:{{{nickname|}}}{{{sex|}}}{{{personality|}}}{{{occupation|}}}{{{traits|}}}{{{location|}}} | |||
| {{Infobox/section <!-- ## General ## --> | |||
| {{tt|name=Infobox character|default=General|arg1=general}} | |||
| color = var(--color-red) | |||
| id = character-general | |||
| {{#if:{{{nickname|}}} | |||
|{{Infobox/sandbox/row | |||
|{{tt|name=Infobox character|default=Nickname|arg1=nickname}} | |||
|{{{nickname|}}} | |||
}} | |||
}}{{#if:{{{sex|}}} | |||
|{{Infobox/sandbox/row | |||
|{{tt|name=Infobox character|default=Sex|arg1=sex}} | |||
|{{{sex|}}} | |||
}} | |||
}}{{#if:{{{personality|}}} | |||
|{{Infobox/sandbox/row | |||
|{{tt|name=Infobox character|default=Personality|arg1=personality}} | |||
|{{{personality|}}} | |||
}} | |||
}}{{#if:{{{occupation|}}} | |||
|{{Infobox/sandbox/row | |||
|{{tt|name=Infobox character|default=Occupation|arg1=occupation}} | |||
|{{{occupation|}}} | |||
}} | |||
}}{{#if:{{{traits|}}} | |||
|{{Infobox/sandbox/row | |||
|{{tt|name=Infobox character|default=Traits|arg1=traits}} | |||
|{{{traits|}}} | |||
}} | |||
}}{{#if:{{{location|}}} | |||
|{{Infobox/sandbox/row | |||
|{{tt|name=Infobox character|default=Location|arg1=location}} | |||
|{{{location|}}}<br>{{#if:{{{coordinates|}}}|[[File:Geographylogo.png{{!}}26px{{!}}link=https://map.projectzomboid.com/?#{{{coordinates}}}{{!}}Show location on an interactive map.]]<span class="plainlinks" title="Show location on an interactive map.">[https://map.projectzomboid.com/?#{{{coordinates}}} {{{coordinates}}}]</span>}} | |||
}} | |||
}} | |||
}} | |||
}}{{#if:{{{items|}}} | |||
|{{Infobox/section <!-- ## Items ## --> | |||
| {{tt|name=Infobox character|default=Items|arg1=items}} | |||
| color = var(--color-red) | |||
| id = character-items | |||
| <div style{{=}}"padding:0em 0.5em 0.5em;">{{{items|}}}</div> | |||
}} | |||
}} | |||
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 14:09, 14 April 2024
This is an infobox used on articles about an in-game character.
Usage
{{Infobox character
|name=
|image=
|image2=
|image3=
|image4=
|image5=
|image_name=
|image_name2=
|image_name3=
|image_name4=
|image_name5=
<!-- GENERAL -->
|nickname=
|sex=
|personality=
|occupation=
|traits=
|location=
|coordinates=
<!-- ITEMS -->
|items=
}}
Example
{{Infobox character
|name=Kate Smith
|image=805 max.jpg
|image3=Kate Smith.png
|image4=K&B intro.png
|image_name=Concept art
|image_name2=Outfit
|image_name3=In-game (past)
|image_name4=In-game (future)
|sex=Female
|personality=Friendly
|location=Bob and Kate's safehouse
|coordinates=10746x9415
|items=Crutches, Bandages, Painkillers, Pillow
}}
How to translate
This template is translatable.
Template code
Paste the following code into the <includeonly>
tag of the translated template and translate the text after each =
sign (except for #default =
).
{{#switch: {{{1|}}}
<!-- section -->
| general = General
| items = Items
<!-- data -->
| nickname = Nickname
| sex = Sex
| personality = Personality
| occupation = Occupation
| traits = Traits
| location = Location
| #default = [[Category:Incorrect template usage]]
}}
Template documentation
Copy the code wrapped in the <noinclude>
tag in this template and translate the text after doc =
in the {{Documentation}}
template.
{{Translation guide}}
template should be removed from the translated documentation.