Actions

Template

Difference between revisions of "AbilityCard"

From P6 Spheres

(Created page with "<noinclude>Creates a card, styled to create a common theme for Class Ability cards. == Usage == Parameters: [Title] | [TitleSize] | [CardWidth] | Body Title, TitleSize and C...")
 
Line 46: Line 46:
 
|}
 
|}
  
</noinclude><includeonly>{{#vardefine:color|white}}<!--
+
</noinclude><includeonly><!--
 +
-->{{#vardefine:width|450px}}<!--
 +
-->{{#vardefine:color|white}}<!--
 
-->{{#if: {{{2|}}}|
 
-->{{#if: {{{2|}}}|
 
{{#if: {{{3|}}}|
 
{{#if: {{{3|}}}|
Line 57: Line 59:
 
{{#ifeq:{{{1}}}|"none"||{{#vardefine:title|{{{1}}}}}}}
 
{{#ifeq:{{{1}}}|"none"||{{#vardefine:title|{{{1}}}}}}}
 
{{#vardefine:titlesize|{{{2}}}}}
 
{{#vardefine:titlesize|{{{2}}}}}
{{#vardefine:width|450px}}
 
 
{{#vardefine:body|{{{3}}}}}
 
{{#vardefine:body|{{{3}}}}}
 
}}
 
}}
Line 63: Line 64:
 
{{#ifeq:{{{1}}}|"none"||{{#vardefine:title|{{{1}}}}}}}
 
{{#ifeq:{{{1}}}|"none"||{{#vardefine:title|{{{1}}}}}}}
 
{{#vardefine:titlesize|4}}
 
{{#vardefine:titlesize|4}}
{{#vardefine:width|450px}}
 
 
{{#vardefine:body|{{{2}}}}}
 
{{#vardefine:body|{{{2}}}}}
 
}}
 
}}
 
|
 
|
 
{{#vardefine:titlesize|4}}
 
{{#vardefine:titlesize|4}}
{{#vardefine:width|450px}}
 
 
{{#vardefine:body|{{{1}}}}}
 
{{#vardefine:body|{{{1}}}}}
 
}}{{#ifeq: {{#var:width}}|S|
 
}}{{#ifeq: {{#var:width}}|S|

Revision as of 12:40, 9 May 2021

Creates a card, styled to create a common theme for Class Ability cards.

Usage

Parameters: [Title] | [TitleSize] | [CardWidth] | Body

Title, TitleSize and CardWidth are optional.

Number Parameters Title TitleSize CardWidth Body
4 1 2 3 4
3 1 2 - 3
2 1 - - 2
1 - - - 1

Example:

	{{Card|Title|2|W|This is the body}} 

or

	{{Card|Title|This is the body}}

Title: If no title text is given, the card is created without a header. If title is 'none' card will also be created without a header.

TitleSize: Titlesize defaults to Level 3. It accepts '2', '3' and '4' as values.

CardWidth: CardWidth defaults to '300px'. It accepts any css compatible width value. It also accepts the enum values below. Contributors are encouraged to use the default or enum values. If another value seems widely needed, a discussion should be started on whether another static value is needed.

Enum Value
'S' 200px
'M' 300px
'W' 450px
'VW' 650px
'XW' 945px