Difference between revisions of "Template:Season"

From Stardew Valley Wiki
Jump to navigation Jump to search
m (another synonym)
m (Add date into sort key)
Line 33: Line 33:
 
     | • 
 
     | • 
 
     |{{#if:{{{sortkey|}}}|
 
     |{{#if:{{{sortkey|}}}|
         <span class="sortkey" style="display:none;">{{#if:{{#arrayprint:$slink_text}}
+
         <span class="sortkey" style="display:none;">{{#expr:
  |{{#expr:{{ParseInputValues|code=season|@season@|translate=index}}+1}}
+
          {{#if:{{#arrayprint:$slink_text}}
  |0}}</span>
+
            |({{ParseInputValues|code=season|@season@|translate=index}}+1)*100
 +
    |0}}
 +
          {{#iferror:{{#expr:{{{2|0}}}>0}}|| + {{{2|0}}}}}}}</span>
 
   }}}}<span style="display:inline; margin-right:0; white-space: nowrap"><!--
 
   }}}}<span style="display:inline; margin-right:0; white-space: nowrap"><!--
  

Revision as of 19:03, 21 October 2020

Description

This template displays the icon for the requested season, plus the season as a link to its associated article.

Notes

The template recognizes two special values of season, Marriage and Deviations, for the sake of NPC schedule pages (see Template:ScheduleHeader).

Use

{{Season|name of season|day (optional)|width (optional)}}

Examples

{{Season|Spring}}
{{Season|Marriage}}
{{Season|Deviations}}
{{Season|All|width=48}}
{{Season|Summer|24}}

Results:
Template:ParseInputValues[[File:Template:ParseInputValues.png|

    24px | link=Template:ParseInputValues | alt=]] [[Template:ParseInputValues|Template:ParseInputValues]]

Template:ParseInputValues[[File:Template:ParseInputValues.png|

    24px | link=Template:ParseInputValues | alt=]] [[Template:ParseInputValues|Template:ParseInputValues]]

Template:ParseInputValues[[File:Template:ParseInputValues.png|

    24px | link=Template:ParseInputValues | alt=]] [[Template:ParseInputValues|Template:ParseInputValues]]

Template:ParseInputValues[[File:Template:ParseInputValues.png|

    48 | link=Template:ParseInputValues | alt=]] [[Template:ParseInputValues|Template:ParseInputValues]]

Template:ParseInputValues[[File:Template:ParseInputValues.png|

    24px | link=Template:ParseInputValues | alt=]] 24 [[Template:ParseInputValues|Template:ParseInputValues]]