Display meetups on the events map

This commit is contained in:
Saivann 2014-03-01 19:14:27 -05:00
parent 9bf05e3db0
commit 01e166e8e8
7 changed files with 151 additions and 46 deletions

View file

@ -61,7 +61,7 @@ id: development
<section id="contributors">
<h2>{% translate contributors %}</h2>
<p>{% translate contributorsorder %}</p>
<div class="contributors">{% for c in site.project.contributors %}
<div class="contributors">{% for c in site.contributors %}
<span>
{% if c.gravatar_id %}<img class="icon" height="16" width="16" src="https://secure.gravatar.com/avatar/{{c.gravatar_id}}?s=140&amp;d=http%3A%2F%2Fbitcoin.org%2Fimg%2Fgravatar-140.png" alt="icon" />{% else %}<img class="icon" height="16" width="16" src="http://i0.wp.com/bitcoin.org/img/gravatar-140.png" alt="icon" />{% endif %}
{% if c.login %}<a href="http://github.com/{{c.login}}">{{ c.name }} ({{ c.contributions }})</a>{% else %}{{ c.name }} ({{ c.contributions }}){% endif %}

View file

@ -15,21 +15,31 @@ id: events
<script>
var zoom=2;
if(/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))zoom=0;
var map = L.map('eventmap').setView([20.00, 6.00], zoom);
var map = L.map('eventmap').setView([20.00, 10.00], zoom);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: 'Data &copy; by <a href="http://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>.',
maxZoom: 18
}).addTo(map);
var markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 20});
{% filter_for p in site.pages sort_by:date category:event %}{% if p.geoloc != 'false' %}
{% filter_for p in site.conferences sort_by:date %}{% if p.geoloc != 'false' %}
L.marker([{{ p.geoloc }}]).bindPopup('<b><a href="{{ p.link | htmlescape }}">{{ p.title | htmlescape }}</a></b><br>{{ p.date }}<br>{{ p.venue | htmlescape }}<br>{{ p.address | htmlescape }}<br>{{ p.city | htmlescape }}, {{ p.country | htmlescape }}').addTo(markers);
{% endif %}{% endfilter_for %}
{% filter_for p in site.meetups sort_by:date %}{% if p.geoloc != 'false' %}
L.marker([{{ p.geoloc }}]).bindPopup('<b><a href="{{ p.link | htmlescape }}">{{ p.title | htmlescape }}</a></b><br>{{ p.date }}<br>{{ p.venue | htmlescape }}<br>{{ p.address | htmlescape }}<br>{{ p.city | htmlescape }}, {{ p.country | htmlescape }}').addTo(markers);
{% endif %}{% endfilter_for %}
map.addLayer(markers);
</script>
{% case page.lang %}
{% when 'ar' or 'bg' or 'de' or 'es' or 'fa' or 'fr' or 'id' or 'it' or 'nl' or 'pl' or 'ru' or 'tr' or 'zh_CN' or 'zh_TW' %}
{% else %}
<h2>{% translate upcoming %}</h2>
{% endcase %}
<ul>
{% filter_for p in site.pages sort_by:date category:event %}
{% filter_for p in site.conferences sort_by:date %}
<li>
{{ p.date | date:"%Y-%m-%d" }} - <a href="{{ p.link | htmlescape }}">{{ p.title | htmlescape }}</a> - {{ p.city | htmlescape }}, {{ p.country | htmlescape }}
</li>