Difference between revisions of "Template:QuickLinks"

From Geohashing
imported>Mattyk
m (Replacing http://wiki.xkcd.com/wgh/index.php?title=Template:QuickLinks/Documentation&action=edit with {{canonicalurl:Template:QuickLinks/Documentation|action=edit}})
 
(16 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
<tr><th colspan=2>
 
<tr><th colspan=2>
 
Latest Coordinates and Map Quick-Links{{#if:{{{1|}}}|&nbsp;- {{{1}}}|}}
 
Latest Coordinates and Map Quick-Links{{#if:{{{1|}}}|&nbsp;- {{{1}}}|}}
</th></tr>
+
</th></tr>{{#vardefine:isThirtyW|{{#ifexpr:{{{lon|0}}} > -30|1|0}}}}
{{#vardefine:thirtyW|{{#ifexpr:{{{lon|0}}} > -30|1|0}}}}({{#var:thirtyW}}){{#ifeq: {{coords are announced|{{ #time: Y-m-d | +4 days }}|30w={{#var:thirtyW}}}}|1
 
|<tr><td>{{ #time: l Y-m-d | +4 days }}</td><td>[http://irc.peeron.com/xkcd/map/map.html?date={{ #time: Y-m-d | +4 days }}&lat={{{lat|0}}}&long={{{lon|0}}}&zoom=9&abs=-1 {{coordinates graticule|{{ #time: Y-m-d | +4 days }}|lat={{{lat|0}}}|lon={{{lon|0}}}}}]| }}
 
  
{{#ifeq: {{coords are announced|{{ #time: Y-m-d | +3 days }}|30w={{#var:thirtyW}}}}|1
+
<!-- today -->
|<tr><td>{{ #time: l Y-m-d | +3 days }}</td>
+
{{#vardefine:d0|{{#time:Y-m-d}}}}{{#ifeq: {{coords are announced|{{#var:d0}}|30w={{#var:isThirtyW}}}}|1
<td> [http://irc.peeron.com/xkcd/map/map.html?date={{ #time: Y-m-d | +3 days }}&lat={{{lat|0}}}&long={{{lon|0}}}&zoom=9&abs=-1 {{coordinates graticule|{{ #time: Y-m-d | +3 days }}|lat={{{lat|0}}}|lon={{{lon|0}}}}}]| }}
+
|<tr><td>{{#time:l Y-m-d}}</td>
 +
<td>{{coordinates graticule|{{#var:d0}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 +
{{meetup links|{{#time:Y-m-d}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 +
</td></tr>| }}
  
{{#ifeq: {{coords are announced|{{ #time: Y-m-d | +2 days }}|30w={{#var:thirtyW}}}}|1
+
<!-- one day ahead -->
|<tr><td>{{ #time: l Y-m-d | +2 days }}</td>
+
{{#vardefine:d1|{{#time:Y-m-d|+1 day}}}}{{#ifeq: {{coords are announced|{{#var:d1}}|30w={{#var:isThirtyW}}}}|1
<td> [http://irc.peeron.com/xkcd/map/map.html?date={{ #time: Y-m-d | +2 days }}&lat={{{lat|0}}}&long={{{lon|0}}}&zoom=9&abs=-1 {{coordinates graticule|{{ #time: Y-m-d | +2 days }}|lat={{{lat|0}}}|lon={{{lon|0}}}}}]| }}
+
|<tr><td>{{#time:l Y-m-d|+1 day}}</td>
 +
<td>{{coordinates graticule|{{#var:d1}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 +
{{meetup links|{{#time:Y-m-d|+1 days}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 +
</td></tr>| }}
  
{{#ifeq: {{coords are announced|{{ #time: Y-m-d | +1 days }}|30w={{#var:thirtyW}}}}|1
+
<!-- two days ahead -->
|<tr><td>{{ #time: l Y-m-d | +1 days }}</td>
+
{{#vardefine:d2|{{#time:Y-m-d|+2 days}}}}{{#ifeq: {{coords are announced|{{#var:d2}}|30w={{#var:isThirtyW}}}}|1
<td> [http://irc.peeron.com/xkcd/map/map.html?date={{ #time: Y-m-d | +1 days }}&lat={{{lat|0}}}&long={{{lon|0}}}&zoom=9&abs=-1 {{coordinates graticule|{{ #time: Y-m-d | +1 days }}|lat={{{lat|0}}}|lon={{{lon|0}}}}}]| }}
+
|<tr><td>{{#time:l Y-m-d|+2 days}}</td>
 +
<td>{{coordinates graticule|{{#var:d2}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 +
{{meetup links|{{#time:Y-m-d|+2 days}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 +
</td></tr>| }}
 +
 
 +
<!-- three days ahead -->
 +
{{#vardefine:d3|{{#time:Y-m-d|+3 days}}}}{{#ifeq: {{coords are announced|{{#var:d3}}|30w={{#var:isThirtyW}}}}|1
 +
|<tr><td>{{#time:l Y-m-d|+3 days}}</td>
 +
<td>{{coordinates graticule|{{#var:d3}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 +
{{meetup links|{{#time:Y-m-d|+3 days}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 +
</td></tr>| }}
 +
 
 +
<!-- four days ahead -->
 +
{{#vardefine:d4|{{#time:Y-m-d|+4 days}}}}{{#ifeq: {{coords are announced|{{#var:d4}}|30w={{#var:isThirtyW}}}}|1
 +
|<tr><td>{{#time:l Y-m-d|+4 days}}</td>
 +
<td>{{coordinates graticule|{{#var:d4}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 +
{{meetup links|{{#time:Y-m-d|+4 days}}|lat={{{lat|0}}}|lon={{{lon|0}}}}}
 +
</td></tr>| }}
  
{{#ifeq: {{coords are announced|{{ #time: Y-m-d }}|30w={{#var:thirtyW}}}}|1
 
|<tr><td>{{ #time: l Y-m-d }}</td>
 
<td> [http://irc.peeron.com/xkcd/map/map.html?date={{ #time: Y-m-d }}&lat={{{lat|0}}}&long={{{lon|0}}}&zoom=9&abs=-1 {{coordinates graticule|{{ #time: Y-m-d }}|lat={{{lat|0}}}|lon={{{lon|0}}}}}]| }}
 
 
</table></includeonly><noinclude>{{Template:QuickLinks/Documentation}}
 
</table></includeonly><noinclude>{{Template:QuickLinks/Documentation}}
  
&rarr; [http://wiki.xkcd.com/wgh/index.php?title=Template:QuickLinks/Documentation&action=edit Edit Documentation]
+
&rarr; [{{canonicalurl:Template:QuickLinks/Documentation|action=edit}} Edit Documentation]
 
</noinclude>
 
</noinclude>

Latest revision as of 13:19, 19 February 2020

Displays a box of quick links to current and up-coming known hash points. Good for planning weekends.

Invented by Nemo, templated by Matty K.

Please keep in mind that a page using this template loads significantly (by several seconds) slower than one which doesn't.

Usage:

{{QuickLinks|lat=-19|lon=146}}

(actual numbers may vary from those shown)

Latest Coordinates and Map Quick-Links

Saturday 2024-05-18 -19.1728929, 146.0998813

geohashing.info google osm bing/os kml crox

Sunday 2024-05-19 -19.5388936, 146.0974074

geohashing.info google osm bing/os kml crox

Monday 2024-05-20 -19.6193744, 146.2604976

geohashing.info google osm bing/os kml crox

Any optional text will be appended to the title bit.

For example:

{{QuickLinks|lat=-19|lon=146|Nowheresville}}

Latest Coordinates and Map Quick-Links - Nowheresville

Saturday 2024-05-18 -19.1728929, 146.0998813

geohashing.info google osm bing/os kml crox

Sunday 2024-05-19 -19.5388936, 146.0974074

geohashing.info google osm bing/os kml crox

Monday 2024-05-20 -19.6193744, 146.2604976

geohashing.info google osm bing/os kml crox

Edit Documentation