Difference between revisions of "Template:Event preview infobox"
Jump to navigation
Jump to search
(Blanked the page) |
|||
Line 1: | Line 1: | ||
<includeonly>{{#css: | |||
table.preview-infobox { | |||
background-color: #f9f9f9; | |||
border: 1px solid #aaa; | |||
font-size: 11px; | |||
margin: 1em 0em 1em 2em; | |||
padding: 2px; | |||
text-align: center; | |||
width: 250px; | |||
{{#ifeq:{{{floats|false}}}|true|float: right;}} | |||
overflow: visible; | |||
position: relative; | |||
width: 250px; | |||
} | |||
table.preview-infobox th { | |||
padding: 0em 1em 0em 1em; | |||
} | |||
table.preview-infobox tr:first-child th { | |||
background-color: #ccf; | |||
padding: 0.5em 1em 0.5em 1em; | |||
font-size: 1.2em; | |||
} | |||
table.preview-infobox tr:not(:first-child) th { | |||
background-color: #ddf; | |||
} | |||
table.preview-infobox tr:not(:first-child) th + th { | |||
background-color: #e4e4ff; | |||
} | |||
table.preview-infobox td { | |||
text-align: left; | |||
padding: 0px 7px 0px 7px; | |||
} | |||
}}{{#vardefine:event subobj| | |||
{{#ask: | |||
[[Has game context::Event]] | |||
{{#if:{{{en name|}}}|[[Has English name::~{{{en name}}}]]}} | |||
{{#if:{{{jp name|}}}|[[Has Japanese name::{{{jp name}}}]]}} | |||
|link=none | |||
|limit=1 | |||
|headers=hide | |||
|searchlabel= | |||
}} | |||
}}{{#if:{{#var:event subobj}}|<table id="event{{#eventnumber}}" class="preview-infobox"> | |||
<tr> | |||
<th colspan="2">[[{{#var:event subobj}}|{{{en name|{{{jp name|???}}}}}}]]</th> | |||
</tr> | |||
<tr> | |||
<td colspan="2">{{#vardefine:banner image array|{{#show:{{#var:event subobj}}|?Has banner image}}}}{{#vardefine:banner image loop|{{#ifeq:{{{banners|1}}}|0|999|{{{banners|1}}}}}}}{{#while:|{{#var:banner image loop}}| | |||
[[File:{{#sub:{{#var:banner image array}}|0|{{#pos:{{#var:banner image array}}|;}}}}|400px|link={{#show:{{#var:event subobj}}|?Has news link}}]] | |||
{{#if:{{#pos:{{#var:banner image array}}|;}}|{{#vardefine:banner image loop|{{#expr:{{#var:banner image loop}}-1}}}}|{{#vardefine:banner image loop|}}}} | |||
{{#vardefine:banner image array|{{#sub:{{#var:banner image array}}|{{#expr:{{#pos:{{#var:banner image array}}|;}}+1}}}}}} | |||
}} | |||
</td> | |||
</tr> | |||
<tr> | |||
<th colspan="2">Durations</th> | |||
</tr> | |||
{{#vardefine:duration array|{{#show:{{#var:event subobj}}|?Has duration date}}}}{{#vardefine:duration loop|1}}{{#vardefine:duration loop|1}}{{#while:|{{#var:duration loop}}| | |||
{{#vardefine:duration array piece|{{#sub:{{#var:duration array}}|0|{{#pos:{{#var:duration array}}|;}}}}}}{{#vardefine:duration array piece start|{{#explode:{{#explode:{{#var:duration array piece}}|!|1}}|->|0}}}}{{#vardefine:duration array piece end|{{#explode:{{#explode:{{#var:duration array piece}}|!|1}}|->|1}}}} | |||
<tr> | |||
<td><b>{{#explode:{{#var:duration array piece}}|!|0}}</b> | |||
</td> | |||
<td>From {{#var:duration array piece start}} until {{#var:duration array piece end}}</td> | |||
</tr> | |||
{{#if:{{#pos:{{#var:duration array}}|;}}||{{#vardefine:duration loop|}}}}{{#vardefine:duration array|{{#sub:{{#var:duration array}}|{{#expr:{{#pos:{{#var:duration array}}|;}}+1}}}}}} | |||
}} | |||
</table> | |||
}}</includeonly><noinclude> | |||
== Description == | |||
This template displays. | |||
== Usage == | |||
<pre>{{Event preview infobox | |||
| en name = | |||
| jp name = | |||
| banners = | |||
| floats = | |||
}}</pre> | |||
=== Parameters === | |||
; en name : English name of event | |||
; jp name : Japanese name of event (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 === | |||
<pre>{{Event preview infobox | |||
| en name = Honorless Great Summer Festival Struggle | |||
| banners = 2 | |||
}} | |||
</pre> | |||
{{Event preview infobox | |||
| en name = Honorless Great Summer Festival Struggle | |||
| banners = 2 | |||
}} | |||
[[Category:Formatting templates]]</noinclude> |
Revision as of 05:44, 13 July 2018
Description
This template displays.
Usage
{{Event preview infobox | en name = | jp name = | banners = | floats = }}
Parameters
- en name
- English name of event
- jp name
- Japanese name of event (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
{{Event preview infobox | en name = Honorless Great Summer Festival Struggle | banners = 2 }}
Honorless Great Summer Festival Struggle | |
---|---|
Durations | |
Gacha | From 2018-07-05T18:00:00+09:00 until 2018-08-06T23:59:00+09:00 |
Event Main Quest | From 2018-07-09T00:00:00+09:00 until 2018-08-06T23:59:00+09:00 |
Event Free Quest | From 2018-07-09T00:00:00+09:00 until 2018-07-30T23:59:00+09:00 |
Bonus Quests | From 2018-08-02T00:00:00+09:00 until 2018-08-06T23:59:00+09:00 |