Changes

Jump to navigation Jump to search
2,376 bytes removed ,  21:23, 7 May 2022
no edit summary
Line 1: Line 1:  +
==Description==
 
This template displays the icon for the requested season, plus the season as a link to its associated article.
 
This template displays the icon for the requested season, plus the season as a link to its associated article.
   Line 6: Line 7:  
The template recognizes two special values of season, <samp>Marriage</samp> and <samp>Deviations</samp>, for the sake of NPC schedule pages (see [[Template:ScheduleHeader]]).
 
The template recognizes two special values of season, <samp>Marriage</samp> and <samp>Deviations</samp>, for the sake of NPC schedule pages (see [[Template:ScheduleHeader]]).
   −
==Usage==
+
==Use==
===Syntax===
+
<pre>{{Season|''season''}}</pre>
Basic usage:
  −
<nowiki>{{</nowiki>[[Template:Season|Season]] | ''season'' <nowiki>}}</nowiki>
     −
Complete argument list:
+
==Parameters==
<nowiki>{{</nowiki>[[Template:Season|Season]] | ''season'' | ''day''
+
<pre>
          | size=''px'' | width=''widthpluspx'' | all=''text_for_all'' | sortkey=true | space=''value''
+
season = name of season (in English or native language)
          | text_only=true | no_translate=true <nowiki>}}</nowiki>
+
day = day of season, shown before the name of the season (optional)
 
+
width = width of image in pixels (optional)
===Parameters===
+
</pre>
There is one unnamed required parameter, ''season'', and one unnamed optional parameter, ''day''.  All other parameters are named and optional.  Default value for all arguments is empty, unless specified otherwise.
  −
 
  −
* '''''season'''''
  −
** First unnamed parameter, required
  −
** The name of the season to be displayed, recognized values: <samp>Spring, Summer, Fall, Winter, All Seasons, Marriage, Deviations</samp>.  <samp>All</samp> and <samp>Any</samp> are recognized as synonyms for <samp>All Seasons</samp>.
  −
** If an unrecognized season name is provided, the template will simply print out that name (no link, no icon).
  −
** The seasons should be provided as plain text (unlinked). If the <samp>''season''</samp> already contains any type of image link, the template will just return the input value unaltered (in case user input already included the season call, ''e.g.,'' <samp><nowiki>{{Season|Spring}}</nowiki></samp>.
  −
 
  −
* '''''day'''''
  −
** Second unnamed parameter, optional
  −
** The day of the season, for example to generate formatted villager birthdays.
  −
** Any provided value is displayed in front of the season name (but after the icon), to match the format used in-game for birthdays.
  −
 
  −
* '''size=''px'''''
  −
** Size of icon in pixels.  Default value is 24
  −
** Only the number should be provided (do not append "px").
  −
 
  −
* '''width=''widthpluspx'''''
  −
** Size of icons in pixels ''with px'' (''e.g.,'' <nowiki>width=24px</nowiki>).
  −
** This is redundant with <samp>size</samp> and inconsistent (expects a different format); only one (preferably <samp>size</samp>) should be used.
  −
** This parameter is included solely for backwards compatibility and is deprecated
  −
 
  −
* '''all=''text_for_all'''''
  −
** Relevant only if <samp>''season''</samp> is <samp>All Seasons</samp> (or a synonym): when <samp>all</samp> is set, the specified text will be displayed instead of <samp>All</samp>.  Default value is <samp>All</samp>.
  −
 
  −
* '''sortkey=true'''
  −
** If set, a hidden span containing a numeric sortkey will be added to the output, to improve table sorting. The sortkey will causes seasons to be sorted in order Spring, Summer, Fall, Winter, instead of being sorted alphabetically. Plus any provided <samp>day</samp> will be included in the sortkey.
      
===Examples===
 
===Examples===
Line 49: Line 21:  
{{Season|Marriage}}
 
{{Season|Marriage}}
 
{{Season|Deviations}}
 
{{Season|Deviations}}
{{Season|All|size=48}}
+
{{Season|All|width=48}}
 
{{Season|Summer|24}}
 
{{Season|Summer|24}}
 
</pre>
 
</pre>
Line 57: Line 29:  
{{Season|Marriage}}<br />
 
{{Season|Marriage}}<br />
 
{{Season|Deviations}}<br />
 
{{Season|Deviations}}<br />
{{Season|All|size=48}}<br />
+
{{Season|All|width=48}}<br />
 
{{Season|Summer|24}}<br />
 
{{Season|Summer|24}}<br />
    
<includeonly>[[Category:Formatting templates]]{{Addlanglinks}}</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
 
<includeonly>[[Category:Formatting templates]]{{Addlanglinks}}</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
107,342

edits

Navigation menu