Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Weather: Difference between revisions

Template page
Add weather colors, TOD and zodiac records, and independent link styling data
Add reusable infobox picture field and fallback
Line 17: Line 17:
<div class="hw-infobox-title">{{{name|{{PAGENAME}}}}}</div>
<div class="hw-infobox-title">{{{name|{{PAGENAME}}}}}</div>
<div class="hw-infobox-badge">{{{type|Standard}}} weather</div>
<div class="hw-infobox-badge">{{{type|Standard}}} weather</div>
<div class="hw-infobox-image" role="group" aria-label="Image for {{{name|{{PAGENAME}}}}}">
{{#if:{{{image|}}}|[[File:{{{image}}}|frameless|600px|alt={{{name|{{PAGENAME}}}}}]]|<div class="hw-infobox-image-empty">No Picture Uploaded</div>}}
</div>
<div class="hw-weather-color-strip" aria-hidden="true"></div>
<div class="hw-weather-color-strip" aria-hidden="true"></div>
<div class="hw-infobox-heading">Weather Data</div>
<div class="hw-infobox-heading">Weather Data</div>
Line 49: Line 52:
}}
}}
</pre>
</pre>
Set <code>| image = Example.png</code> to display an uploaded file in the infobox. Leave it empty to show “No Picture Uploaded”.
[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude>
</noinclude>

Revision as of 09:29, 29 July 2026

This template defines the table "Weathers". View table. This template stores and displays one centralized weather record. Color is stored for automatic link styling and is not displayed as an archive table column.

Usage

{{Weather
| name = Storm
| type = Standard
| color = #525964
| icon = 129991496783874
| effect = 2x Luck
| luck factor = 2
| description = Storm winds shake the heavens.
}}

Set | image = Example.png to display an uploaded file in the infobox. Leave it empty to show “No Picture Uploaded”.

Contents