Template:CharacterInfoBox: Difference between revisions

Template page
No edit summary
No edit summary
 
(71 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<includeonly>__NOTOC__
This template is used to create character info boxes. Use it like so:
<div class="infobox" style="width: 300px; float: right; border: solid 2px darkgrey; margin: 10px; padding: 5px; background-color: #282828; clear: right;">
 
  <div style="text-align: center;">
<pre>
    {{#if: {{{Portrait|}}}
{{CharacterInfoBox
      | {{#ifexist: File:{{{Portrait}}}| [[File:{{{Portrait}}}|300px|center|frameless|alt={{{FullName}}}]]
| image=http://example.com/image.jpg  (if it's an external image URL)
        | [[File:Default_Profile.png|300px|center|frameless|alt=Default Profile]]
| image=Example.jpg  (if it's an uploaded [[File:Example.jpg]] here)
      }}
| species=Human
       | [[File:Default_Profile.png|300px|center|frameless|alt=Default Profile]]
| sex=Male
| homeworld=Earth
| occupation=Explorer
}}
</pre>
</noinclude><includeonly>__NOTOC__
{| class="infobox" style="border: 1px solid #000; width: 250px; float: right;"
|-
! colspan="2" style="text-align: center; font-size: 1.25em;" | Character Information
|-
| colspan="2" style="text-align: center;" |
{{#if: {{{image|}}}
  | {{#switch: {{#pos:{{{image}}}|http}}
      | 0 = <img src="{{{image}}}" alt="Profile Image" style="max-width: 250px;" />
       | #default = [[File:{{{image}}}|250px|Profile Image]]
     }}
     }}
   | <img src="https://i.imgur.com/U2BrC9O.jpg" alt="Profile Image" style="max-width: 250px;" />
   </div>
}}
  <div class="sci-fi-font" style="text-align: center; font-size: 1.5em; color: #f0f0f0;">{{{FullName}}}</div>
|-
  <hr style="border-color: #333333; margin-top: 10px; margin-bottom: 10px;"/>
| colspan="2" style="text-align: center;" | <hr />
  <div style="color: #f0f0f0;">
|-
{{#if: {{{Species|}}} | <div><b>Species:</b> {{{Species}}}</div>}}{{#if: {{{Sex|}}} | <div><b>Sex:</b> {{{Sex}}}</div>}}{{#if: {{{Title|}}} | <div><b>Title:</b> {{{Title}}}</div>}}{{#if: {{{Occupation|}}} | <div><b>Occupation:</b> {{{Occupation}}}</div>}}{{#if: {{{Homeworld|}}} | <div><b>Homeworld:</b> {{{Homeworld}}}</div>}}{{#if: {{{Residence|}}} | <div><b>Residence:</b> {{{Residence}}}</div>}}{{#if: {{{Group|}}} | <div><b>Group:</b> {{{Group}}}</div>}}
|'''Species:''' || {{{species|}}}
  </div>
|-
</div>
|'''Sex:''' || {{{sex|}}}
|-
|'''Homeworld:''' || {{{homeworld|}}}
|-
|'''Occupation:''' || {{{occupation|}}}
|}
[[Category:Characters]]
</includeonly>
</includeonly>

Latest revision as of 04:14, 20 May 2024