Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:CharacterHubCardDefault: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
<div class="char-card-default">
<includeonly>
   <div class="char-img">
<div class="charcard" style="width: {{{width|250px}}}; display:inline-block; vertical-align:top; text-align:center; margin:8px; padding:6px; border:1px solid #AAA; border-radius:4px; background:#F9F9F9;">
     [[File:{{{image}}}|300px]]
  <!-- image -->
   <div class="charcard-image" style="margin-bottom:6px;">
     [[File:{{{image|}}}|{{{width|250px}}}x|link={{{page|}}}]]
   </div>
   </div>


   {{#if:{{{logo|}}}
   <!-- name/title -->
    |<div class="char-logo">[[File:{{{logo}}}|40px]]</div>
  <div class="charcard-title" style="font-size:1.2em; font-weight:bold; margin-bottom:4px;">
     |{{#if:{{{label|}}}
    [[{{{page|}}}|{{{name|Unnamed character}}}]]
       |<div class="char-label">{{{label}}}</div>
  </div>
 
  <!-- optional logos -->
  <div class="charcard-logos" style="margin-bottom:6px;">
     {{#if:{{{logo1|}}}
       | [[File:{{{logo1}}}|30px|link={{{logo1link|}}}]]
     }}
     }}
  }}
    {{#if:{{{logo2|}}}
      | [[File:{{{logo2}}}|30px|link={{{logo2link|}}}]]
    }}
  </div>


   <div class="char-title">
  <!-- optional blurb -->
     '''[[{{{link}}}|{{{title}}}]]'''
   <div class="charcard-blurb" style="font-size:0.9em; color:#333;">
     {{{blurb|}}}
   </div>
   </div>
</div>
</includeonly>


  {{#if:{{{blurb|}}}
<noinclude>
    |<div class="char-blurb">{{{blurb}}}</div>
== Usage ==
  }}
<pre>
</div>
{{CharacterCard
| image      = CharacterImage.jpg
| page        = Character_Main_Page_Name
| name        = Display Name Here
| logo1      = SeriesLogo1.png
| logo1link  = Series_Main_Page
| logo2      = SeriesLogo2.png
| logo2link  = Another_Series_Page
| blurb      = This is a short optional blurb describing the default version.
| width      = 280px                <!-- optional override of the card width -->
}}
</pre>
 
*Parameters:*
- **image** (required): filename of the portrait (rectangular, ~400×600px).
- **page** (required): target page for the name link.
- **name** (required): text to display.
- **logo1**, **logo2** (optional): filenames of small franchise logos.
- **logo1link**, **logo2link** (optional): target pages for each logo.
- **blurb** (optional): free‑form paragraph.
- **width** (optional): overall card width (e.g. “200px”, “15em”); default 250px.
 
You can place two (or more) of these inline at the top of your hub page:
 
```wikitext
{{CharacterCard
| image    = HeroMain.jpg
| page      = Hero_Main
| name      = “Valiant Hero”
| logo1    = SeriesA_Logo.png
| logo1link = SeriesA
| blurb     = The default incarnation of our world’s champion.
}}
{{CharacterCard
| image    = HeroAlt.jpg
| page      = Hero_Alt
| name      = “Valiant Hero (Stealth Suit)”
| logo1    = SeriesB_Logo.png
| logo1link = SeriesB
| logo2    = SeriesC_Logo.png
| logo2link = SeriesC
| blurb    = Specialized for covert ops.
| width    = 220px
}}

Revision as of 17:01, 19 April 2025


Usage

{{CharacterCard
 | image       = CharacterImage.jpg
 | page        = Character_Main_Page_Name
 | name        = Display Name Here
 | logo1       = SeriesLogo1.png
 | logo1link   = Series_Main_Page
 | logo2       = SeriesLogo2.png
 | logo2link   = Another_Series_Page
 | blurb       = This is a short optional blurb describing the default version.
 | width       = 280px                <!-- optional override of the card width -->
}}
  • Parameters:*

- **image** (required): filename of the portrait (rectangular, ~400×600px). - **page** (required): target page for the name link. - **name** (required): text to display. - **logo1**, **logo2** (optional): filenames of small franchise logos. - **logo1link**, **logo2link** (optional): target pages for each logo. - **blurb** (optional): free‑form paragraph. - **width** (optional): overall card width (e.g. “200px”, “15em”); default 250px.

You can place two (or more) of these inline at the top of your hub page:

```wikitext Template:CharacterCard Template:CharacterCard

Contents