Jump to content

Template:Trait infobox: Difference between revisions

From inZOI Wiki
Undo revision 101 by Zoi (talk)
Tag: Undo
No edit summary
Tag: Reverted
Line 1: Line 1:
<includeonly>
<div class="infobox-n trait" style="width:300px; border:1px solid #aaa; background:#f9f9f9; font-family: sans-serif;">
  <!-- Header: Trait Name -->
  <div class="infobox-header" style="background:#e0e0e0; text-align:center; font-weight:bold; font-size:120%; padding:4px;">
    {{{name|{{PAGENAME}}}}
  </div>
 
  <!-- Icon: Display the trait icon if provided, or default to a file named as the trait -->
  <div class="infobox-icon" style="text-align:center; margin:8px 0;">
    {{#if: {{{icon|}}}
      | [[File:{{{icon}}}|80px]]
      | [[File:{{PAGENAME}}.png|80px]]
    }}
  </div>
 
  <!-- Trait Group (e.g. "Wise and Logical", "Jovial and Cheerful") -->
  <div class="infobox-group" style="text-align:center; font-style:italic; color:#555; margin-bottom:6px;">
    {{#if: {{{group|}}} | ({{{group}}}) }}
  </div>
 
  <!-- Description -->
  <div class="infobox-description" style="padding: 0 8px 8px 8px; font-size:90%;">
    {{{description|}}}
  </div>
 
  <div style="clear:both;"></div>
</div>
</includeonly>
<noinclude>
<noinclude>
This template creates an infobox for Inzoi traits.
<!--
    
Trait infobox template for Inzoi Wiki.
**Parameters:**
 
* **icon** – Filename for the trait’s icon (e.g. `Trait_Expert.png`)
Usage:
* **trait** – The trait’s name (e.g. `Expert`)
  {{Trait infobox
* **personality** – The personality group (e.g. `Wise and Logical`)
    | name = Expert
* **description** – A brief description of the trait
    | icon = Expert.png
    | group = Wise and Logical
    | description = Pursues exceptional knowledge and skills, interested in theory, technology, and detailed exploration.
   }}
 
Parameters:
  * name: The trait's name. Defaults to the page name ({{PAGENAME}}) if not provided.
  * icon: (Optional) The filename of the trait's icon. If not specified, the template will attempt to load a file named "{{PAGENAME}}.png".
  * group: (Optional) The trait’s group or archetype (for example, "Wise and Logical" or "Jovial and Cheerful"). It appears in parentheses under the trait name.
  * description: A brief description of the trait.


Usage example:
Be sure to add this template to the appropriate category:
 
[[Category:Inzoi Traits]]
    {{Trait infobox
-->
      | icon = Trait_Expert.png
      | trait = Expert
      | personality = Wise and Logical
      | description = Pursues exceptional knowledge and skills, interested in theory, technology, and detailed exploration.
    }}
</noinclude>
</noinclude>
{| class="infobox" style="width:300px; font-size:90%; border:1px solid #aaa; background:#fff;"
|-
! colspan="2" style="text-align:center; font-size:120%; background:#ccf; padding:4px;" | {{{trait}}}
|-
| style="text-align:center; vertical-align:middle; width:64px;" | [[File:{{{icon|Placeholder.png}}}|64px]]
| style="vertical-align:middle; padding:4px;" | <b>Personality:</b> {{{personality}}}
|-
| colspan="2" style="background:#f8f8f8; padding:6px; border-top:1px solid #ddd;" | {{{description}}}
|}

Revision as of 14:39, 12 February 2025