diff options
author | luxagraf <sng@luxagraf.net> | 2016-03-05 17:19:08 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2016-03-05 17:19:08 -0500 |
commit | dc9d0910c93f91c16481b9540f16fb06a419fb21 (patch) | |
tree | 031c581d12be52f82452d5157d315761a85f75ed /design/templates/details | |
parent | f5c4157f0bed0e47ec76400624ec301bf287bc60 (diff) |
Added map to bird detail page
Diffstat (limited to 'design/templates/details')
-rw-r--r-- | design/templates/details/bird.html | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/design/templates/details/bird.html b/design/templates/details/bird.html index 0a91317..9676683 100644 --- a/design/templates/details/bird.html +++ b/design/templates/details/bird.html @@ -1,13 +1,29 @@ {% extends 'base.html' %} {% block extrahead %} +<style> +#detail-map-canvas { height: 100%;} +</style> {% endblock %} +{% block bodyid %}class="birds"{%endblock%} {% block primary %} <main> -{{object.common_name}} +<article> +<h1>{{object.common_name}}</h1> +<p id="endnode">Seen by {% for person in sighting.seen_by.all %}<a href="/birds/{{person}}/">{{person}}</a>{%if forloop.last %}{%else%}{% if forloop.revcounter == 2 %}, and {%else%}, {%endif%}{%endif%}{%endfor%}</p> + <audio autoplay="autoplay" controls="controls"> <source src="/media/{{recording.audio}}" /> </audio> - +</article> </main> {% endblock %} +{% block js %} +<script src="/media/js/leaflet-master/leaflet-mod.js"></script> +<script src="/media/js/detail.min.js"></script> +<script type="text/javascript"> +window.onload = function() { + createBirdMap({{sighting.latitude}},{{sighting.longitude}}, 12, { type:'point', lat:'{{sighting.latitude}}', lon:'{{sighting.longitude}}'}); return false; +} +</script> +{% endblock %} |