Difference between revisions of "Template:SecondaryEventsMP"

From Dragalia Lost Wiki
Jump to navigation Jump to search
>Caledor92
(testing if a slightly smaller size increases the chance to have 2 in a row)
>Eave
m
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>{{Doc}}[[Category:Templates]]</noinclude><includeonly>{{#css:
+
<noinclude>{{Doc}}[[Category:Templates]]</noinclude><includeonly>{{#widget:Template/SecondaryEventsMP/css}}<div class="SecondaryEventsMP" style="padding-bottom:1em;padding-right:3px;">
@media screen and (min-width: 550px) {
 
.SecondaryEventsMP img {
 
width: 280px;
 
height: auto;
 
}
 
}
 
@media screen and (max-width: 549px) {
 
.SecondaryEventsMP img {
 
width: 100%;
 
height: auto;
 
}
 
}
 
}}<div class="SecondaryEventsMP" style="display:inline-block; padding-bottom:1em;padding-right:3px;">
 
 
{{#if: {{{OfficialLink|}}} <!--Check if OfficialLink exists; include if it does-->
 
{{#if: {{{OfficialLink|}}} <!--Check if OfficialLink exists; include if it does-->
|[[File:{{{ImageFile}}}|link={{{PageLink}}}]]<br />[[{{{PageLink}}}|{{{Name}}}]] [{{{OfficialLink}}}]<br />
+
|[[File:{{{ImageFile}}}|link={{{PageLink}}}]]<div style="width: 300px">[[{{{PageLink}}}|{{{Name}}}]] [{{{OfficialLink}}}]
 
{{Countdown|EventName={{{_rowID}}}|TimeStart={{#time:F d, Y h:i:s A e|{{{StartDate}}}}}|TimeEnd={{#time:F d, Y h:i:s A e|{{{EndDate}}}}}}}
 
{{Countdown|EventName={{{_rowID}}}|TimeStart={{#time:F d, Y h:i:s A e|{{{StartDate}}}}}|TimeEnd={{#time:F d, Y h:i:s A e|{{{EndDate}}}}}}}
|[[File:{{{ImageFile}}}|link={{{PageLink}}}]]<br />[[{{{PageLink}}}|{{{Name}}}]]<br />
+
|[[File:{{{ImageFile}}}|link={{{PageLink}}}]][[{{{PageLink}}}|{{{Name}}}]]
 
{{Countdown|EventName={{{_rowID}}}|TimeStart={{#time:F d, Y h:i:s A e|{{{StartDate}}}}}|TimeEnd={{#time:F d, Y h:i:s A e|{{{EndDate}}}}}}}
 
{{Countdown|EventName={{{_rowID}}}|TimeStart={{#time:F d, Y h:i:s A e|{{{StartDate}}}}}|TimeEnd={{#time:F d, Y h:i:s A e|{{{EndDate}}}}}}}
}}
+
}}</div >
 
</div></includeonly>
 
</div></includeonly>

Latest revision as of 14:29, 27 March 2020

50px Documentation

(Secondary Events Main Page) - Parses secondary events cargo field into a formatted banner, used on the Main Page.

Usage

{{SecondaryEventsMP
|Name         =
|ImageFile    =
|PageLink     =
|OfficialLink = // Link to official Dragalia Lost News article
|StartDate    =
|EndDate      =
}}

Examples

Banner Top The Imperial Onslaught Event Details.png
Imperial Onslaught Double Drops (Wind, Water,Shadow) [1]
Ends in:
{{SecondaryEventsMP
|Name=Imperial Onslaught Double Drops (Wind, Water,Shadow)
|ImageFile=Banner Top The Imperial Onslaught Event Details.png
|PageLink=Event Quests#Imperial Onslaught
|OfficialLink=https://dragalialost.com/en/news/detail/1181
|StartDate=1-1-2020 06:00 UTC
|EndDate=1-1-2030 05:59:59 UTC
}}