diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/includes/map_entry_list_template.html | 58 | ||||
-rw-r--r-- | templates/includes/map_sidebar.html | 4 | ||||
-rw-r--r-- | templates/includes/recent_entries.html | 6 |
3 files changed, 36 insertions, 32 deletions
diff --git a/templates/includes/map_entry_list_template.html b/templates/includes/map_entry_list_template.html index 206430a..aae8950 100644 --- a/templates/includes/map_entry_list_template.html +++ b/templates/includes/map_entry_list_template.html @@ -1,6 +1,33 @@ {% load typogrify %} {% load truncateletters %} {% load slugify_under %} + + // center on a country + function focusCountry(latitude, longitude, zoom) { + map.setZoom(zoom); + map.panTo(new google.maps.LatLng(latitude, longitude)); + }; + + {% for route in route_list %} + var {{route.template_var_name}} = [ + {% for point in route.geometry.coords%} + new google.maps.LatLng({{point.1}}, {{point.0}}){% if forloop.last%}{%else%},{%endif%} + {% endfor %} + ]; + {% endfor %} + function showRoute(route, zoom, latitude, longitude) { + var routePath = new google.maps.Polyline({ + path: eval(route), + strokeColor: "#FF0000", + strokeOpacity: 1.0, + strokeWeight: 2 + }); + map.setZoom(zoom); + map.panTo(new google.maps.LatLng(latitude, longitude)); + routePath.setMap(map); + return false; + }; +var map; function initialize() { //custom marker @@ -75,33 +102,10 @@ function initialize() { }); //function to handle click event and display single info window function openWin(content, marker) { - infowindow.close() + infowindow.close(); infowindow.setContent(content); infowindow.open(map,marker); - } -} -// center on a country - function focusCountry(latitude, longitude, zoom) { - map.setZoom(zoom); - map.panTo(new google.maps.LatLng(latitude, longitude)); - }; - -{% for route in route_list %} -var {{route.template_var_name}} = [ -{% for point in route.geometry.coords%} - new google.maps.LatLng({{point.1}}, {{point.0}}){% if forloop.last%}{%else%},{%endif%} -{% endfor %} - ]; -{% endfor %} -function showRoute(route, zoom, latitude, longitude) { - var routePath = new google.maps.Polyline({ - path: eval(route), - strokeColor: "#FF0000", - strokeOpacity: 1.0, - strokeWeight: 2 - }); - map.setZoom(zoom); - map.panTo(new google.maps.LatLng(latitude, longitude)); - routePath.setMap(map); - return false; + }; + + } diff --git a/templates/includes/map_sidebar.html b/templates/includes/map_sidebar.html index e024753..2b370d8 100644 --- a/templates/includes/map_sidebar.html +++ b/templates/includes/map_sidebar.html @@ -4,9 +4,9 @@ <h4>Trips</h4> <ul> - <li><a onclick="showRoute('nic_route', 8, '12.0576296973','-86.0409268346');" href="#">Nicaragua ('08)</a></li> + <li><a onclick="showRoute('w1_route', 2, '23.7598518382','74.8028201141');" href="#">Around the World ('05-'06)</a></li> - <li><a onclick="showRoute('w1_route', 2, '31.5231100249','-11.8333740218');" href="#">Around the World ('05-'06)</a></li> + <li><a onclick="showRoute('nic_route', 7, '11.9664367789','-86.0097885012');" href="#">Nicaragua ('08)</a></li> </ul> <h4>Regions</h4> diff --git a/templates/includes/recent_entries.html b/templates/includes/recent_entries.html index 4b5acba..493bcb5 100644 --- a/templates/includes/recent_entries.html +++ b/templates/includes/recent_entries.html @@ -6,7 +6,7 @@ <span class="location">Death Valley, <a href="/writing/united-states/1/" title="travel writing from the United States">California</a></span> <time datetime="2010-04-24 10:45:59">04/24/10</time> - <img src="http://127.0.0.1:8000/images/post-thumbnail/2010/deathvalley.jpg" alt="(There'll Be) Peace in the Valley" class="post-image" /> + <img src="http://images.luxagraf.net/post-thumbnail/2010/deathvalley.jpg" alt="(There'll Be) Peace in the Valley" class="post-image" /> </p> <p class="intro hyphenate">Sometimes you ignore the places close to home because, well, there's always next weekend. Which is why I never made it Death Valley in the twenty-five years I lived in California. It took being all the way across the country to get me out to Death Valley. Which might explain why I actually got up before dawn just to watch the sunrise at Zabriskie Point. </p> <span class="button"><a class="permalink" href="/2010/apr/24/death-valley/" title="(There'll Be) Peace in the Valley">More »</a></span> @@ -17,7 +17,7 @@ <span class="location">Okefenokee Swamp, <a href="/writing/united-states/1/" title="travel writing from the United States">Georgia</a></span> <time datetime="2010-03-13 11:50:48">03/13/10</time> - <img src="http://127.0.0.1:8000/images/post-thumbs/2010/okeefenokee.jpg" alt="So Far, I Have Not Found The Science" class="post-image" /> + <img src="http://images.luxagraf.net/post-thumbs/2010/okeefenokee.jpg" alt="So Far, I Have Not Found The Science" class="post-image" /> </p> <p class="intro hyphenate">A canoe trip through the Okefenokee Swamp down in the southern most corner of Georgia. Paddling the strange reddish and incredibly still waters. Begging alligators, aching muscles and the kindly folks of Stintson's Barbecue all getting their due.</p> <span class="button"><a class="permalink" href="/2010/mar/13/so-far-i-have-not-found-science/" title="So Far, I Have Not Found The Science">More »</a></span> @@ -28,7 +28,7 @@ <span class="location">Athens, <a href="/writing/united-states/1/" title="travel writing from the United States">Georgia</a></span> <time datetime="2009-05-03 18:39:16">05/03/09</time> - <img src="http://127.0.0.1:8000/images/post-thumbs/2010/traveltheworld.jpg" alt="How to Get Off Your Butt and Travel the World" class="post-image" /> + <img src="http://images.luxagraf.net/post-thumbs/2010/traveltheworld.jpg" alt="How to Get Off Your Butt and Travel the World" class="post-image" /> </p> <p class="intro hyphenate">How do you make the leap from cubicle daydreams to life on to the road? You want to travel the world, but, like me, you have a million excuses stopping you. How do overcome the inertia that keeps you trapped in a life that isn't what you want it to be? Here's a few practical tips and how tos designed to motivate you to get off your butt and travel the world.</p> <span class="button"><a class="permalink" href="/2009/may/03/how-to-get-your-butt-and-travel-world/" title="How to Get Off Your Butt and Travel the World">More »</a></span> |