Difference between revisions of "Template:Climb"

From Geohashing
(Ribbon for achievement)
 
m (Fixing issue with empty template)
Line 1: Line 1:
{{#vardefine:category|Small}}<includeonly>{{#ifexpr:{{{elevation}}} / 300 >= 1|{{#vardefine:category|Large}}}}{{#ifexpr:{{{elevation}}} / 500 >= 1|{{#vardefine:category|Great}}}}{{#ifexpr:{{{elevation}}} / 750 >= 1|{{#vardefine:category|Huge}}}}{{#ifexpr:{{{elevation}}} / 1000 >= 1|{{#vardefine:category|Massive}}}}{{#ifexpr:{{{elevation}}} / 2500 >= 1|{{#vardefine:category|Colossal}}}}{{#if:{{{mode|}}}|[[Category:Climbed by {{{mode}}}]]}}</includeonly>{{Ribbon
+
{{#vardefine:category|Small}}<includeonly>{{#if:{{{elevation|}}}|{{#ifexpr:{{{elevation}}} / 300 >= 1|{{#vardefine:category|Large}}}}{{#ifexpr:{{{elevation}}} / 500 >= 1|{{#vardefine:category|Great}}}}{{#ifexpr:{{{elevation}}} / 750 >= 1|{{#vardefine:category|Huge}}}}{{#ifexpr:{{{elevation}}} / 1000 >= 1|{{#vardefine:category|Massive}}}}{{#ifexpr:{{{elevation}}} / 2500 >= 1|{{#vardefine:category|Colossal}}}}}}{{#if:{{{mode|}}}|[[Category:Climbed by {{{mode}}}]]}}</includeonly>{{Ribbon
 
|color    = orange
 
|color    = orange
 
|icon    = OWN Ribbon.jpg
 
|icon    = OWN Ribbon.jpg

Revision as of 01:04, 13 May 2024

OWN Ribbon.jpg
This user earned the Small Climb achievement
by climbing {{{elevation}}}m during their ({{{latitude}}}, {{{longitude}}}) geohash expedition on [[{{{date}}} {{{latitude}}} {{{longitude}}}|{{{date}}}]].

How to use this template:

{{Climb

| latitude = latitude (required)
| longitude = longitude (required)
| date = date (YYYY-MM-DD format) (required)
| elevation = elevation gain in metres (required)
| mode = primary mode of transport (foot, bike, etc.) (optional, adds "Climbed by mode" category)
| name = name of achiever (optional)
| image = image name (optional)

}}

The image name should not include 'Image:' or surrounding braces.


Example:

{{Climb
| latitude = 56
| longitude = -4
| date = 2024-03-30
| elevation = 278
| mode = foot
| name = [[User:KerrMcF|KerrMcF]]
}}

appears as:

OWN Ribbon.jpg
KerrMcF earned the Large Climb achievement
by climbing 278m primarily by foot during their (56, -4) geohash expedition on 2024-03-30.

Example:

{{Climb
| latitude = 46
| longitude = 5
| date = 2009-09-21
| elevation = 650
| name = [[User:Crox|Crox]]
}}

appears as:

OWN Ribbon.jpg
Crox earned the Great Climb achievement
by climbing 650m during their (46, 5) geohash expedition on 2009-09-21.

Example:

{{Climb
| latitude = 50
| longitude = 13
| date = 2015-05-25
| elevation = 380
| mode = bike
| name = [[User:Danatar|Danatar]]
}}

appears as:

OWN Ribbon.jpg
Danatar earned the Large Climb achievement
by climbing 380m primarily by bike during their (50, 13) geohash expedition on 2015-05-25.