Template:Gametip: Difference between revisions

From Homecoming Wiki
Jump to navigation Jump to search
imported>Konoko (historical)
(well it works, but the text isn't centered...)
m (increase right padding)
 
(21 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<!-- includeonly
<div role="note" class="boilerplate metadata" id="{{{game}}}" style="display: flow-root; position: relative; background-color: #eee; border: 2px solid #{{#switch:{{lc:{{{game|}}}}}|h|hero|heroes=3364B3|v|vill|villains=721C1F|both|x|n|neutral|#default=202020}}; margin: 0.5em; padding: 0.5em 1em 0.5em 70px; max-width: 70ch;">
<div style="margin: 0.5em;">
 
{| style="text-align:center; border: 1px solid #000000; border-collapse: collapse; {{#ifeq: {{{game}}} | hero |background-color: #82a0be;| {{#ifeq: {{{game}}} | vill |background-color:#ff6f75;|background-color:#CCCCCC;}}}} width:100%;"
<div style="position: absolute; left: 1em; top: 50%; margin-top: -20px;">[[File:{{#switch:{{lc:{{{game|}}}}}
|-
|h|hero|heroes=CoH
|Rowspan=2 Valign=top|{{#ifeq: {{{game}}} | hero | [[Image:CoH_Game_Icon.png|left]] | {{#ifeq: {{{game}}} | vill | [[Image:CoV_Game_Icon.png|left]] | [[Image:CoX_Game_Icon.png|left]]}}}} ||
|v|vill|villains=CoV
|-
|both|x=CoX
| style="{{#ifeq: {{{game}}} | hero | width:100%;color:black;" | {{#ifeq: {{{game}}} | vill | width:100%;color:black;" | width:100%;color:black;"}}}} | '''{{{tip}}}'''
|n|neutral|#default=Neutral
|-
}}_Game_Icon.png|link=|alt=Tip]]</div>
|}
 
</div>
{{{tip}}}
/includeonly --><div class="boilerplate metadata" id="{{{game}}}" style="background-color: #{{#switch:{{lc:{{{game|}}}}}
</div><noinclude>
|h
{{Documentation}}
|hero
{{DEFAULTSORT:Gametip}}
|heroes=82a0be
</noinclude>
|v
|vill
|villains=ff6f75
|both
|x
|#default=CCCCCC}}; border: 1px solid #AAF; margin: 0.5em; padding: 0.5em;"> [[Image:Co{{#switch:{{lc:{{{game|}}}}}
|h
|hero
|heroes=H
|v
|vill
|villains=V
|both
|x
|#default=X}}_Game_Icon.png]] '''{{{tip}}}'''</div>
<noinclude>{{{{PAGENAME}}/Doc}}[[Category:Standardized Text Templates]]</noinclude>

Latest revision as of 09:34, 20 April 2022

[edit] [purge] Documentation

The Gametip template creates a text box containing a general tip for the game. Tips can be Hero-specific, Villain-specific, or generic. Switch statements are used to alter the background and text colors of the boxes depending on the game specified in the template call.

Hero-specific tips will appear in blue boxes with white text and an City of Heroes icon.

Villain-specific tips will appear in red boxes with white text and an City of Villains icon.

Generic tips which apply to both games will appear in gray boxes with black text and an icon that is a hybrid of the City of Heroes and City of Villains icons.

Syntax

{{Gametip | game=game_id | tip=tip_text}}

where:

game_id

Indicates whether the tip is specific to Heroes, specific to Villains, or generic.
  • For Hero-specific tips, set this value to h, hero, or heroes.
  • For Villain-specific tips, set this value to v, vill, or villains.
  • For Neutral tips, set this value to n or neutral. (Default if nothing is passed to game.)
  • For tips that pertain to both 'sides,' set this value to x, or both.

tip_text

The text of the game tip.

Examples

{{Gametip|game=hero|tip=This will create a Hero-specific game tip.}}

{{Gametip|game=vill|tip=This will create a Villain-specific game tip.}}

{{Gametip|game=both|tip=This will create a generic game tip.}}

{{Gametip|game=n|tip=This will create a neutral game tip.}}