(Should fix the Card still being on its own line (the space was messing it up probably)) |
m (small cleanup) |
||
Line 1: | Line 1: | ||
{{#vardefine:gameTable|{{#if:{{{game|}}}|{{{game|}}}|{{BASEPAGENAME}}}}}}<!-- If a game is not provided, fall back to the base page name --><nowiki> | {{#vardefine:gameTable|{{#if:{{{game|}}}|{{{game|}}}|{{BASEPAGENAME}}}}}}<!-- If a game is not provided, fall back to the base page name --><nowiki> | ||
</nowiki>{{#vardefine:targetChara|{{#if:{{{chara|}}}|{{{chara|}}}|{{#titleparts:{{PAGENAME}}|1|2}}}}}}<!-- If a game is not provided, fall back to the base page name --><nowiki> | </nowiki>{{#vardefine:targetChara|{{#if:{{{chara|}}}|{{{chara|}}}|{{#titleparts:{{PAGENAME}}|1|2}}}}}}<!-- If a game is not provided, fall back to the base page name --><nowiki> | ||
</nowiki><includeonly>{{Tt|{{{label|{{{input}}}}}}|{{#cargo_query:tables=MoveData_{{#var:gameTable}},MoveData_{{#var:gameTable}}__images|join on=MoveData_{{#var:gameTable}}._ID=MoveData_{{#var:gameTable}}__images._rowID|fields=images=image,name,guard,startup,recovery,onBlock|where=chara="{{#var:targetChara}}" and input="{{{input}}}"|format=template|template=TooltipMovePreview|named args=yes|limit=1|more results text=}}}}</includeonly> | </nowiki><includeonly>{{Tt|{{{label|{{{input}}}}}}|{{#cargo_query:tables=MoveData_{{#var:gameTable}},MoveData_{{#var:gameTable}}__images|join on=MoveData_{{#var:gameTable}}._ID=MoveData_{{#var:gameTable}}__images._rowID|fields=images=image,name,guard,startup,recovery,onBlock|where=chara="{{#var:targetChara}}" and input="{{{input}}}"|format=template|template=TooltipMovePreview|named args=yes|limit=1|more results text=}}}}</includeonly> | ||
<noinclude>A template for shorthand writing cargo queries for displaying a mini move card. | |||
==Usage== | ==Usage== | ||
Due to weirdness with mediawiki, you must use the MiniMoveCard inside of a container, such as a div. This will be automatically done for you if it's in a move card on the overview, but for other pages you will need to add the div yourself. | Due to weirdness with mediawiki, you must use the MiniMoveCard inside of a container, such as a div. This will be automatically done for you if it's in a move card on the overview, but for other pages you will need to add the div yourself. | ||
Line 20: | Line 22: | ||
===With label=== | ===With label=== | ||
<pre><div>Lorem ipsum dolor sit amet, {{MiniMoveCard|chara=Sol Badguy|input=214S|game=GGST|label=Grand Viper}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div></pre> | <pre><div>Lorem ipsum dolor sit amet, {{MiniMoveCard|chara=Sol Badguy|input=214S|game=GGST|label=Grand Viper}}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div></pre> | ||
<div>Lorem ipsum dolor sit amet, {{MiniMoveCard|chara=Sol Badguy|input=214S|game=GGST|label=Grand Viper}}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div> | <div>Lorem ipsum dolor sit amet, {{MiniMoveCard|chara=Sol Badguy|input=214S|game=GGST|label=Grand Viper}}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div> | ||
</noinclude> | </noinclude> |
Revision as of 13:16, 2 March 2022
A template for shorthand writing cargo queries for displaying a mini move card.
Usage
Due to weirdness with mediawiki, you must use the MiniMoveCard inside of a container, such as a div. This will be automatically done for you if it's in a move card on the overview, but for other pages you will need to add the div yourself.
Expects 2 arguments: chara = name of the character for the cargo query input = input for the move for the cargo query
optional arguments: game = name of the game as it appears in the cargo table. If this is not provided, it will assume the game from the BasePageName of the current page. label = whatever text you want the tooltip to appear over. If not provided, uses the move input instead
Examples
Default Behavior
<div>Lorem ipsum dolor sit amet, {{MiniMoveCard|chara=Testament|input=236P|game=GGML}}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
Lorem ipsum dolor sit amet,
236PGuardAllStartup18RecoveryAdvantage+3
With label
<div>Lorem ipsum dolor sit amet, {{MiniMoveCard|chara=Sol Badguy|input=214S|game=GGST|label=Grand Viper}}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>