Difference between revisions of "Template:Gacha preview infobox"
Jump to navigation
Jump to search
(13 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
td > .banner-image > a > img { | td > .banner-image > a > img { | ||
padding: 0px; | |||
width: 425px; | |||
height: auto; | |||
} | |||
td > .banner-image > img { | |||
padding: 0px; | padding: 0px; | ||
width: 425px; | width: 425px; | ||
Line 49: | Line 55: | ||
|searchlabel= | |searchlabel= | ||
}} | }} | ||
}}{{#vardefine:gacha id|{{#show:{{#var:gacha subobj}}|?Has ID}} | |||
}}{{#vardefine:gacha filename|{{#show:{{#var:gacha subobj}}|?Has filename}} | |||
}}{{#vardefine:banner image|[[File:{{#show:{{#var:gacha subobj}}|?Has banner image}}|link={{#var:gacha subobj}}]] | |||
}}{{#if:{{#var:gacha subobj}}|<table id="gacha{{#gachanumber}}" class="preview-infobox" style="{{#ifeq:{{{floats|false}}}|true|float: right;}}"> | }}{{#if:{{#var:gacha subobj}}|<table id="gacha{{#gachanumber}}" class="preview-infobox" style="{{#ifeq:{{{floats|false}}}|true|float: right;}}"> | ||
<tr> | <tr> | ||
Line 54: | Line 63: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td colspan="2">{{# | <td colspan="2"><div class="banner-image">{{#if:{{#var:gacha filename|}}| | ||
{{#tag:mediator|https://cdn.housamo.xyz/housamo/unity/Android/banner/banner_{{#var:gacha filename|}}.png}} | |||
|{{#var:banner image|}}}}</div> | |||
</td> | </td> | ||
</tr> | </tr> | ||
{{#if:{{{show news link|}}}|<tr> | {{#if:{{{show news link|}}}|<tr> | ||
< | <th colspan="2">[{{#show:{{#var:gacha subobj}}|?Has news link}} News link]</th> | ||
</tr>}} | </tr>}} | ||
{{#vardefine:duration array|{{#show:{{#var:gacha subobj}}|?Has duration date}}}}{{#if:{{#var:duration array|}}| | {{#vardefine:duration array|{{#show:{{#var:gacha subobj}}|?Has duration date}}}}{{#if:{{#var:duration array|}}| | ||
Line 93: | Line 103: | ||
{{#vardefine:duration array tag|{{#ifexpr:{{#time: U|now}} >= {{#time:U|{{#var:duration array piece start}}}} and {{#time: U|now}} <= {{#time: U|{{#var:duration array piece end}}}}|b|s}}}} | {{#vardefine:duration array tag|{{#ifexpr:{{#time: U|now}} >= {{#time:U|{{#var:duration array piece start}}}} and {{#time: U|now}} <= {{#time: U|{{#var:duration array piece end}}}}|b|s}}}} | ||
<td><{{#var:duration array tag}}>{{#explode:{{#var:duration array piece}}|!|0}}</{{#var:duration array tag}}> | <td><{{#var:duration array tag}}>{{#explode:{{#var:duration array piece}}|!|0}}</{{#var:duration array tag}}> | ||
</td>{{#vardefine:duration format|F d\, Y | </td>{{#vardefine:duration format|F d\, Y H\:i}} | ||
{{#vardefine:duration array piece start|{{#time:{{#var:duration format}}|{{#replace:{{#replace:{{#var:duration array piece start}}|@|}}|+09:00|+00:00}}}} | {{#vardefine:duration array piece start|{{#time:{{#var:duration format}}|{{#replace:{{#replace:{{#var:duration array piece start}}|@|}}|+09:00|+00:00}}}} | ||
}}{{#vardefine:duration array piece end|{{#time:{{#var:duration format}}|{{#replace:{{#replace:{{#var:duration array piece end}}|@|}}|+09:00|+00:00}}}} | }}{{#vardefine:duration array piece end|{{#time:{{#var:duration format}}|{{#replace:{{#replace:{{#var:duration array piece end}}|@|}}|+09:00|+00:00}}}} |
Latest revision as of 18:31, 25 April 2021
Description
This template displays a gacha's information through an infobox.
Usage
{{Gacha preview infobox | en name = | jp name = | banners = | floats = }}
Parameters
- en name
- English name of gacha
- jp name
- Japanese name of gacha (optional if en name is provided; required if not).
- banners
- Number of banners to show; defaults to 1. Provide 0 to show all.
- floats
- Determines if it should float to the right; only "true" enables it.
Examples
{{Gacha preview infobox | en name = Honorless Great Summer Festival Struggle | banners = 2 }}
Honorless Great Summer Festival Struggle | |
---|---|
Durations | |
July 05, 2018 18:00 to August 05, 2018 23:59 |