Difference between revisions of "Template:Main Page event/core"

From Team Fortress Wiki
Jump to: navigation, search
m (Protected "Template:Main Page event/core": Main Page usage ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
m (+ margin-top to match mp spacing)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{#if:{{{event|}}}|
 
{{#if:{{{event|}}}|
{{{!}} class="mp-content-table plainlinks style="margin-top: 12px; margin-bottom: -4px;" data-mp-event="{{#switch:{{{event}}}|Summer=summer|Scream Fortress=scream-fortress|Smissmas=smissmas|#default=default}}" data-mp-event-video="{{#if:{{{video|}}}|true|false}}" {{#if:{{{video-url|}}}|{{#if:{{{video-url|}}}|data-video-url="{{#if:{{{video-external|}}}|{{{video-url}}}|{{filepath:{{{video-url}}}}}}}"}}}}
+
{{{!}} class="mp-content-table mp-event-container plainlinks" style="margin-top: 7px;" data-mp-event="{{#switch:{{{event}}}|Summer=summer|Scream Fortress=scream-fortress|Smissmas=smissmas|#default=default}}" data-mp-event-video="{{#if:{{{video|}}}|true|false}}" {{#if:{{{video|}}}|{{#if:{{{video-url|}}}|data-video-url="{{#if:{{{video-external|}}}|{{{video-url}}}|{{filepath:Main Page event {{{video-url}}}}}}}"}}}}
{{!}} style="text-align: right; position: relative; overflow: hidden; background: #150302;" {{!}} <div style="position: relative; height: 15vw;" {{#if:{{{overlay|}}}|class="mp-event-overlay"}}>{{#if:{{{image|}}}|[[File:{{{image}}}|class=mp-event-image|link={{#if:{{{link-override|}}}|{{{link-override}}}{{if lang}}|{{{event}}} {{CURRENTYEAR}}{{if lang}}}}|{{#if:{{{image-title|}}}|{{{image-title}}}}}]]}}
+
{{!}} style="text-align: right; position: relative; overflow: hidden; background: #150302;" {{!}} <div style="position: relative; height: 15vw;" {{#ifeq: {{lc:{{{overlay|}}}}} | yes | class="mp-event-overlay" | }}>{{#if:{{{image|}}}|[[File:Main Page event {{{image}}}|class=mp-event-image|link={{{link-override|{{{event}}} {{CURRENTYEAR}}}}}{{if lang}}|{{#switch: {{lc:{{{event}}}}} <!-- Mouse hover text -->
 
+
| summer         
{{#if:{{{festive|}}}|
+
| scream fortress = {{common string|mp event header text {{lc:{{{event}}}}} desc|{{CURRENTYEAR}}}}
 +
| smissmas        = {{common string|mp event header text smissmas desc|{{#ifexpr: {{CURRENTMONTH}} = 12 | {{CURRENTYEAR}} | {{#expr: {{CURRENTYEAR}} - 1 }} }}}}
 +
| #default        = {{{image-title|}}}
 +
}}]]}}
 +
{{#ifeq: {{lc:{{{festive|}}}}} | yes |
 
<div class="mp-event-smissmas festive-wire">
 
<div class="mp-event-smissmas festive-wire">
 
<div class="light-group even"><span class="lightbulb"></span><span class="lightbulb"></span></div>
 
<div class="light-group even"><span class="lightbulb"></span><span class="lightbulb"></span></div>
Line 19: Line 23:
 
<div class="light-group even"><span class="lightbulb"></span><span class="lightbulb"></span></div>
 
<div class="light-group even"><span class="lightbulb"></span><span class="lightbulb"></span></div>
 
</div>
 
</div>
}}<!--
+
| }}<!--
 
--><div class="mp-event-text">
 
--><div class="mp-event-text">
{{{event}}} {{#if:{{{suffix|}}}|{{{suffix}}}|{{CURRENTYEAR}}}}
+
{{#switch: {{lc:{{{event}}}}} <!-- Event title -->
 +
| summer          = {{common string|mp event header text summer title|{{CURRENTYEAR}}}}
 +
| scream fortress = {{common string|mp event header text scream fortress title|{{{suffix|{{CURRENTYEAR}}}}}}}
 +
| smissmas        = {{common string|mp event header text smissmas title|{{#ifexpr: {{CURRENTMONTH}} = 12 | {{CURRENTYEAR}} | {{#expr: {{CURRENTYEAR}} - 1 }} }}}}
 +
| #default        = {{{event}}} {{{suffix|{{CURRENTYEAR}}}}}
 +
}}
 
</div>
 
</div>
{{#if:{{{event-duration|}}}|
+
{{#ifeq: {{lc:{{{event-duration|}}}}} | yes |
 
<div class="mp-event-duration">
 
<div class="mp-event-duration">
<div>{{#if:{{{start|}}}|{{{start}}}|Now}} - {{{end}}}</div>
+
<div>{{#if: {{{end|}}}
 +
| {{#if: {{{start|}}}
 +
  | {{#time: {{common string|mp event date fmt part 1}} | {{{start}}} | {{SUBPAGENAME}} }}{{#time: {{common string|mp event date fmt part 2}} | {{{end}}} | {{SUBPAGENAME}} }} <!-- Start and End dates are set: [start date] - [end date] -->
 +
  | {{#time: {{common string|mp event date fmt end}} | {{{end}}} | {{SUBPAGENAME}} }} <!-- No Start date set: "Until [end date]" -->
 +
  }}
 +
}}</div>
 
</div>
 
</div>
}}
+
| }}
 
{{!}}}
 
{{!}}}
 
}}<noinclude>[[Category:Main Page]]</noinclude>
 
}}<noinclude>[[Category:Main Page]]</noinclude>

Latest revision as of 17:01, 16 October 2024