summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2019-02-08 20:34:23 -0600
committerluxagraf <sng@luxagraf.net>2019-02-08 20:34:23 -0600
commit3f258e5594a9cc462646e8e30b83ba5580f9ef9d (patch)
tree1463fac886316ccc16024062b5d991ecd7bfaec8
parentf0f3d2da7f538321b444035c23ef0ecf8c62bb7e (diff)
cleaned up projects builder and templates, new CSS fonts
-rw-r--r--app/builder/base.py12
-rw-r--r--design/sass/_archives.scss1
-rw-r--r--design/sass/_details.scss2
-rw-r--r--design/sass/_photos.scss4
-rw-r--r--design/templates/archives/projects.html2
-rw-r--r--site/media/js/natparks.min.js29
6 files changed, 32 insertions, 18 deletions
diff --git a/app/builder/base.py b/app/builder/base.py
index 1b441a0..b41bbba 100644
--- a/app/builder/base.py
+++ b/app/builder/base.py
@@ -322,8 +322,8 @@ class BuildProjects(Build):
def build_project_archive(self):
qs = apps.get_model('projects', 'Project').objects.filter(status__exact=1).order_by('-pub_date')
- c = Context({'object_list': qs, 'MEDIA_URL': settings.BAKED_MEDIA_URL,
- 'IMAGES_URL': settings.BAKED_IMAGES_URL})
+ c = {'object_list': qs, 'MEDIA_URL': settings.BAKED_MEDIA_URL,
+ 'IMAGES_URL': settings.BAKED_IMAGES_URL}
t = render_to_string('archives/projects.html', c).encode('utf-8')
self.write_file('projects/', t)
@@ -335,11 +335,11 @@ class BuildProjects(Build):
qs = model.objects.filter(visited__exact=True).order_by("-date_visited_begin")
else:
qs = model.objects.filter(status__exact=1)
- c = Context({
+ c = {
'object_list': qs,
'MEDIA_URL': settings.BAKED_MEDIA_URL,
'IMAGES_URL': settings.BAKED_IMAGES_URL
- })
+ }
t = render_to_string('details/%s.html' % (proj['slug'].split("/")[1]), c).encode('utf-8')
path = 'projects/%s/' % (proj['slug'].split("/")[1])
self.write_file(path, t)
@@ -352,11 +352,11 @@ class BuildProjects(Build):
def build_gifs(self):
qs = apps.get_model('projects', 'AnimatedGif').objects.all()
for gif in qs:
- c = Context({
+ c = {
'object': gif,
'MEDIA_URL': settings.BAKED_MEDIA_URL,
'IMAGES_URL': settings.BAKED_IMAGES_URL
- })
+ }
t = render_to_string('details/gifs.html', c).encode('utf-8')
path = 'projects/gifs/%s/' % (gif.slug)
self.write_file(path, t)
diff --git a/design/sass/_archives.scss b/design/sass/_archives.scss
index c477467..0181bc7 100644
--- a/design/sass/_archives.scss
+++ b/design/sass/_archives.scss
@@ -1,6 +1,7 @@
// container for archive intros
.intro {
@include constrain_wide;
+ font-family: $fancy_serif;
@include breakpoint(alpha){
display: grid;
grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
diff --git a/design/sass/_details.scss b/design/sass/_details.scss
index ca18c2e..ab82c4b 100644
--- a/design/sass/_details.scss
+++ b/design/sass/_details.scss
@@ -312,6 +312,7 @@ sup {
// ### Books ###
.book-metadata {
text-align: left;
+ @include fancy_sans;
dd {
display: inline;
margin: 0;
@@ -329,6 +330,7 @@ sup {
}
.thoughts, .highlights, .meta-cover {
@include constrain_narrow;
+ font-family: $fancy_serif;
text-align: left;
p {
max-width: 100%;
diff --git a/design/sass/_photos.scss b/design/sass/_photos.scss
index 0ae3b0d..95d6c45 100644
--- a/design/sass/_photos.scss
+++ b/design/sass/_photos.scss
@@ -57,8 +57,8 @@
@include transparent_class;
position: absolute;
left: 0;
- bottom: 8px;
- width: 100%;
+ bottom: -10px;
+ width: 272px;
background: $brown;
color: #999999;
}
diff --git a/design/templates/archives/projects.html b/design/templates/archives/projects.html
index 2ad2e37..738317f 100644
--- a/design/templates/archives/projects.html
+++ b/design/templates/archives/projects.html
@@ -20,7 +20,7 @@
<img sizes="(max-width: 850px) 100vw, (min-width: 851px) 720px" srcset="{{object.get_project_image|slice:"0:-4"}}_lg.jpg 1280w" src="{{object.get_project_image}}" alt="{{ object.title }}" class="post-image" />
</a>
<div class="wide-wrapper">
- <h2 class="post-title"><a href="{{object.get_absolute_url}}" title="{{object.title}}">{{object.title|safe}} {{object.subtitle|safe}}</a></h2>
+ <h2 class="post-title"><a href="{{object.get_absolute_url}}" title="{{object.title}}">{{object.title|safe}}</a></h2>
<div class="post-summary">{{object.lede|safe|smartypants}}</div>
<a class="permalink" href="{{object.get_absolute_url}}">Explore&nbsp;&#8674;</a>
</div>
diff --git a/site/media/js/natparks.min.js b/site/media/js/natparks.min.js
index 7340602..d90912c 100644
--- a/site/media/js/natparks.min.js
+++ b/site/media/js/natparks.min.js
@@ -1,23 +1,34 @@
(function(){'use strict';L.TileLayer.Provider=L.TileLayer.extend({initialize:function(arg,options){var providers=L.TileLayer.Provider.providers;var parts=arg.split('.');var providerName=parts[0];var variantName=parts[1];if(!providers[providerName]){throw'No such provider ('+providerName+')';}
var provider={url:providers[providerName].url,options:providers[providerName].options};if(variantName&&'variants'in providers[providerName]){if(!(variantName in providers[providerName].variants)){throw'No such variant of '+providerName+' ('+variantName+')';}
var variant=providers[providerName].variants[variantName];var variantOptions;if(typeof variant==='string'){variantOptions={variant:variant};}else{variantOptions=variant.options;}
-provider={url:variant.url||provider.url,options:L.Util.extend({},provider.options,variantOptions)};}else if(typeof provider.url==='function'){provider.url=provider.url(parts.splice(1,parts.length-1).join('.'));}
+provider={url:variant.url||provider.url,options:L.Util.extend({},provider.options,variantOptions)};}else if(typeof provider.url==='function'){provider.url=provider.url(parts.splice(1,parts.length-1).join('.'));}
var attributionReplacer=function(attr){if(attr.indexOf('{attribution.')===-1){return attr;}
-return attr.replace(/\{attribution.(\w*)\}/,function(match,attributionName){return attributionReplacer(providers[attributionName].options.attribution);});};provider.options.attribution=attributionReplacer(provider.options.attribution); var layerOpts=L.Util.extend({},provider.options,options);L.TileLayer.prototype.initialize.call(this,provider.url,layerOpts);}}); L.TileLayer.Provider.providers={OpenStreetMap:{url:'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',options:{attribution:'&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, '+'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'},variants:{Mapnik:{},BlackAndWhite:{url:'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png'},DE:{url:'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png'},HOT:{url:'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',options:{attribution:'{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'}}}},OpenSeaMap:{url:'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',options:{attribution:'Map data: &copy; <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'}},Thunderforest:{url:'http://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png',options:{attribution:'&copy; <a href="http://www.opencyclemap.org">OpenCycleMap</a>, {attribution.OpenStreetMap}',variant:'cycle'},variants:{OpenCycleMap:'cycle',Transport:'transport',Landscape:'landscape',Outdoors:'outdoors'}},OpenMapSurfer:{url:'http://openmapsurfer.uni-hd.de/tiles/{variant}/x={x}&y={y}&z={z}',options:{minZoom:0,maxZoom:20,variant:'roads',attribution:'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> &mdash; Map data {attribution.OpenStreetMap}'},variants:{Roads:'roads',AdminBounds:{options:{variant:'adminb',maxZoom:19}},Grayscale:{options:{variant:'roadsg',maxZoom:19}}}},MapQuestOpen:{url:'http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg',options:{attribution:'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> &mdash; '+'Map data {attribution.OpenStreetMap}',subdomains:'1234'},variants:{OSM:{},Aerial:{url:'http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg',options:{attribution:'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> &mdash; '+'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency'}}}},MapBox:{url:function(id){return'http://{s}.tiles.mapbox.com/v3/'+id+'/{z}/{x}/{y}.png';},options:{attribution:'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; '+'Map data {attribution.OpenStreetMap}',subdomains:'abcd'}},Stamen:{url:'http://{s}.tile.stamen.com/{variant}/{z}/{x}/{y}.png',options:{attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, '+'<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; '+'Map data {attribution.OpenStreetMap}',subdomains:'abcd',minZoom:0,maxZoom:20,variant:'toner'},variants:{Toner:'toner',TonerBackground:'toner-background',TonerHybrid:'toner-hybrid',TonerLines:'toner-lines',TonerLabels:'toner-labels',TonerLite:'toner-lite',Terrain:{options:{variant:'terrain',minZoom:4,maxZoom:18}},TerrainBackground:{options:{variant:'terrain-background',minZoom:4,maxZoom:18}},Watercolor:{options:{variant:'watercolor',minZoom:3,maxZoom:16}}}},Esri:{url:'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',options:{variant:'World_Street_Map',attribution:'Tiles &copy; Esri'},variants:{WorldStreetMap:{options:{attribution:'{attribution.Esri} &mdash; '+'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012'}},DeLorme:{options:{variant:'Specialty/DeLorme_World_Base_Map',minZoom:1,maxZoom:11,attribution:'{attribution.Esri} &mdash; Copyright: &copy;2012 DeLorme'}},WorldTopoMap:{options:{variant:'World_Topo_Map',attribution:'{attribution.Esri} &mdash; '+'Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community'}},WorldImagery:{options:{variant:'World_Imagery',attribution:'{attribution.Esri} &mdash; '+'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'}},WorldTerrain:{options:{variant:'World_Terrain_Base',maxZoom:13,attribution:'{attribution.Esri} &mdash; '+'Source: USGS, Esri, TANA, DeLorme, and NPS'}},WorldShadedRelief:{options:{variant:'World_Shaded_Relief',maxZoom:13,attribution:'{attribution.Esri} &mdash; Source: Esri'}},WorldPhysical:{options:{variant:'World_Physical_Map',maxZoom:8,attribution:'{attribution.Esri} &mdash; Source: US National Park Service'}},OceanBasemap:{options:{variant:'Ocean_Basemap',maxZoom:13,attribution:'{attribution.Esri} &mdash; Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri'}},NatGeoWorldMap:{options:{variant:'NatGeo_World_Map',maxZoom:16,attribution:'{attribution.Esri} &mdash; National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC'}},WorldGrayCanvas:{options:{variant:'Canvas/World_Light_Gray_Base',maxZoom:16,attribution:'{attribution.Esri} &mdash; Esri, DeLorme, NAVTEQ'}}}},OpenWeatherMap:{url:'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png',options:{attribution:'Map data &copy; <a href="http://openweathermap.org">OpenWeatherMap</a>',opacity:0.5},variants:{Clouds:'clouds',CloudsClassic:'clouds_cls',Precipitation:'precipitation',PrecipitationClassic:'precipitation_cls',Rain:'rain',RainClassic:'rain_cls',Pressure:'pressure',PressureContour:'pressure_cntr',Wind:'wind',Temperature:'temp',Snow:'snow'}},HERE:{url:'http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/'+'maptile/{mapID}/{variant}/{z}/{x}/{y}/256/png8?'+'app_id={app_id}&app_code={app_code}',options:{attribution:'Map &copy; 1987-2014 <a href="http://developer.here.com">HERE</a>',subdomains:'1234',mapID:'newest','app_id':'<insert your app_id here>','app_code':'<insert your app_code here>',base:'base',variant:'normal.day',minZoom:0,maxZoom:20},variants:{normalDay:'normal.day',normalDayCustom:'normal.day.custom',normalDayGrey:'normal.day.grey',normalDayMobile:'normal.day.mobile',normalDayGreyMobile:'normal.day.grey.mobile',normalDayTransit:'normal.day.transit',normalDayTransitMobile:'normal.day.transit.mobile',normalNight:'normal.night',normalNightMobile:'normal.night.mobile',normalNightGrey:'normal.night.grey',normalNightGreyMobile:'normal.night.grey.mobile',carnavDayGrey:'carnav.day.grey',hybridDay:{options:{base:'aerial',variant:'hybrid.day'}},hybridDayMobile:{options:{base:'aerial',variant:'hybrid.day.mobile'}},pedestrianDay:'pedestrian.day',pedestrianNight:'pedestrian.night',satelliteDay:{options:{base:'aerial',variant:'satellite.day'}},terrainDay:{options:{base:'aerial',variant:'terrain.day'}},terrainDayMobile:{options:{base:'aerial',variant:'terrain.day.mobile'}}}},Acetate:{url:'http://a{s}.acetate.geoiq.com/tiles/{variant}/{z}/{x}/{y}.png',options:{attribution:'&copy;2012 Esri & Stamen, Data from OSM and Natural Earth',subdomains:'0123',minZoom:2,maxZoom:18,variant:'acetate-base'},variants:{basemap:'acetate-base',terrain:'terrain',all:'acetate-hillshading',foreground:'acetate-fg',roads:'acetate-roads',labels:'acetate-labels',hillshading:'hillshading'}}};L.tileLayer.provider=function(provider,options){return new L.TileLayer.Provider(provider,options);};L.Control.Layers.Provided=L.Control.Layers.extend({initialize:function(base,overlay,options){var first;var labelFormatter=function(label){return label.replace(/\./g,': ').replace(/([a-z])([A-Z])/g,'$1 $2');};if(base.length){(function(){var out={},len=base.length,i=0;while(i<len){if(typeof base[i]==='string'){if(i===0){first=L.tileLayer.provider(base[0]);out[labelFormatter(base[i])]=first;}else{out[labelFormatter(base[i])]=L.tileLayer.provider(base[i]);}}
+return attr.replace(/\{attribution.(\w*)\}/,function(match,attributionName){return attributionReplacer(providers[attributionName].options.attribution);});};provider.options.attribution=attributionReplacer(provider.options.attribution);var layerOpts=L.Util.extend({},provider.options,options);L.TileLayer.prototype.initialize.call(this,provider.url,layerOpts);}});L.TileLayer.Provider.providers={OpenStreetMap:{url:'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',options:{attribution:'&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, '+
+'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'},variants:{Mapnik:{},BlackAndWhite:{url:'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png'},DE:{url:'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png'},HOT:{url:'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',options:{attribution:'{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'}}}},OpenSeaMap:{url:'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',options:{attribution:'Map data: &copy; <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'}},Thunderforest:{url:'http://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png',options:{attribution:'&copy; <a href="http://www.opencyclemap.org">OpenCycleMap</a>, {attribution.OpenStreetMap}',variant:'cycle'},variants:{OpenCycleMap:'cycle',Transport:'transport',Landscape:'landscape',Outdoors:'outdoors'}},OpenMapSurfer:{url:'http://openmapsurfer.uni-hd.de/tiles/{variant}/x={x}&y={y}&z={z}',options:{minZoom:0,maxZoom:20,variant:'roads',attribution:'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> &mdash; Map data {attribution.OpenStreetMap}'},variants:{Roads:'roads',AdminBounds:{options:{variant:'adminb',maxZoom:19}},Grayscale:{options:{variant:'roadsg',maxZoom:19}}}},MapQuestOpen:{url:'http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg',options:{attribution:'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> &mdash; '+
+'Map data {attribution.OpenStreetMap}',subdomains:'1234'},variants:{OSM:{},Aerial:{url:'http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg',options:{attribution:'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> &mdash; '+
+'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency'}}}},MapBox:{url:function(id){return'http://{s}.tiles.mapbox.com/v3/'+id+'/{z}/{x}/{y}.png';},options:{attribution:'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; '+
+'Map data {attribution.OpenStreetMap}',subdomains:'abcd'}},Stamen:{url:'http://{s}.tile.stamen.com/{variant}/{z}/{x}/{y}.png',options:{attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, '+
+'<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; '+
+'Map data {attribution.OpenStreetMap}',subdomains:'abcd',minZoom:0,maxZoom:20,variant:'toner'},variants:{Toner:'toner',TonerBackground:'toner-background',TonerHybrid:'toner-hybrid',TonerLines:'toner-lines',TonerLabels:'toner-labels',TonerLite:'toner-lite',Terrain:{options:{variant:'terrain',minZoom:4,maxZoom:18}},TerrainBackground:{options:{variant:'terrain-background',minZoom:4,maxZoom:18}},Watercolor:{options:{variant:'watercolor',minZoom:3,maxZoom:16}}}},Esri:{url:'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',options:{variant:'World_Street_Map',attribution:'Tiles &copy; Esri'},variants:{WorldStreetMap:{options:{attribution:'{attribution.Esri} &mdash; '+
+'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012'}},DeLorme:{options:{variant:'Specialty/DeLorme_World_Base_Map',minZoom:1,maxZoom:11,attribution:'{attribution.Esri} &mdash; Copyright: &copy;2012 DeLorme'}},WorldTopoMap:{options:{variant:'World_Topo_Map',attribution:'{attribution.Esri} &mdash; '+
+'Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community'}},WorldImagery:{options:{variant:'World_Imagery',attribution:'{attribution.Esri} &mdash; '+
+'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'}},WorldTerrain:{options:{variant:'World_Terrain_Base',maxZoom:13,attribution:'{attribution.Esri} &mdash; '+
+'Source: USGS, Esri, TANA, DeLorme, and NPS'}},WorldShadedRelief:{options:{variant:'World_Shaded_Relief',maxZoom:13,attribution:'{attribution.Esri} &mdash; Source: Esri'}},WorldPhysical:{options:{variant:'World_Physical_Map',maxZoom:8,attribution:'{attribution.Esri} &mdash; Source: US National Park Service'}},OceanBasemap:{options:{variant:'Ocean_Basemap',maxZoom:13,attribution:'{attribution.Esri} &mdash; Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri'}},NatGeoWorldMap:{options:{variant:'NatGeo_World_Map',maxZoom:16,attribution:'{attribution.Esri} &mdash; National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC'}},WorldGrayCanvas:{options:{variant:'Canvas/World_Light_Gray_Base',maxZoom:16,attribution:'{attribution.Esri} &mdash; Esri, DeLorme, NAVTEQ'}}}},OpenWeatherMap:{url:'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png',options:{attribution:'Map data &copy; <a href="http://openweathermap.org">OpenWeatherMap</a>',opacity:0.5},variants:{Clouds:'clouds',CloudsClassic:'clouds_cls',Precipitation:'precipitation',PrecipitationClassic:'precipitation_cls',Rain:'rain',RainClassic:'rain_cls',Pressure:'pressure',PressureContour:'pressure_cntr',Wind:'wind',Temperature:'temp',Snow:'snow'}},HERE:{url:'http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/'+
+'maptile/{mapID}/{variant}/{z}/{x}/{y}/256/png8?'+
+'app_id={app_id}&app_code={app_code}',options:{attribution:'Map &copy; 1987-2014 <a href="http://developer.here.com">HERE</a>',subdomains:'1234',mapID:'newest','app_id':'<insert your app_id here>','app_code':'<insert your app_code here>',base:'base',variant:'normal.day',minZoom:0,maxZoom:20},variants:{normalDay:'normal.day',normalDayCustom:'normal.day.custom',normalDayGrey:'normal.day.grey',normalDayMobile:'normal.day.mobile',normalDayGreyMobile:'normal.day.grey.mobile',normalDayTransit:'normal.day.transit',normalDayTransitMobile:'normal.day.transit.mobile',normalNight:'normal.night',normalNightMobile:'normal.night.mobile',normalNightGrey:'normal.night.grey',normalNightGreyMobile:'normal.night.grey.mobile',carnavDayGrey:'carnav.day.grey',hybridDay:{options:{base:'aerial',variant:'hybrid.day'}},hybridDayMobile:{options:{base:'aerial',variant:'hybrid.day.mobile'}},pedestrianDay:'pedestrian.day',pedestrianNight:'pedestrian.night',satelliteDay:{options:{base:'aerial',variant:'satellite.day'}},terrainDay:{options:{base:'aerial',variant:'terrain.day'}},terrainDayMobile:{options:{base:'aerial',variant:'terrain.day.mobile'}}}},Acetate:{url:'http://a{s}.acetate.geoiq.com/tiles/{variant}/{z}/{x}/{y}.png',options:{attribution:'&copy;2012 Esri & Stamen, Data from OSM and Natural Earth',subdomains:'0123',minZoom:2,maxZoom:18,variant:'acetate-base'},variants:{basemap:'acetate-base',terrain:'terrain',all:'acetate-hillshading',foreground:'acetate-fg',roads:'acetate-roads',labels:'acetate-labels',hillshading:'hillshading'}}};L.tileLayer.provider=function(provider,options){return new L.TileLayer.Provider(provider,options);};L.Control.Layers.Provided=L.Control.Layers.extend({initialize:function(base,overlay,options){var first;var labelFormatter=function(label){return label.replace(/\./g,': ').replace(/([a-z])([A-Z])/g,'$1 $2');};if(base.length){(function(){var out={},len=base.length,i=0;while(i<len){if(typeof base[i]==='string'){if(i===0){first=L.tileLayer.provider(base[0]);out[labelFormatter(base[i])]=first;}else{out[labelFormatter(base[i])]=L.tileLayer.provider(base[i]);}}
i++;}
base=out;}());this._first=first;}
if(overlay&&overlay.length){(function(){var out={},len=overlay.length,i=0;while(i<len){if(typeof overlay[i]==='string'){out[labelFormatter(overlay[i])]=L.tileLayer.provider(overlay[i]);}
i++;}
overlay=out;}());}
-L.Control.Layers.prototype.initialize.call(this,base,overlay,options);},onAdd:function(map){this._first.addTo(map);return L.Control.Layers.prototype.onAdd.call(this,map);}});L.control.layers.provided=function(baseLayers,overlays,options){return new L.Control.Layers.Provided(baseLayers,overlays,options);};}());function mapit(lat,lon,zoom,id){map=L.map(document.getElementById("map-wrapper-"+id));centerCoord=new L.LatLng(lat,lon);zoom=zoom;L.tileLayer.provider('Esri.WorldTopoMap',{maxZoom:18,attribution:'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Tiles &copy; Esri and the GIS User Community'}).addTo(map);map.setView(centerCoord,zoom); $.ajax({url:"/projects/data/natparks/"+id+".json",dataType:"json",success:function(data,text,request){draw_poly(data,map);}
-}); function draw_poly(data,map){var myStyle={"color":"#201a11","weight":2,"opacity":0.65};L.geoJson(data,{style:myStyle}).addTo(map);}}
-function create_map(obj){var lat=parseFloat(obj.attr('data-latitude'));var lon=parseFloat(obj.attr('data-longitude'));var zoom=parseInt(obj.attr('data-zoom'));var id=obj.attr('data-id'); $(obj).parents().eq(3).append('<div class="map-container" id="map-container-'+id+'">');$('#map-container-'+id).append('<div class="map-wrapper" id="map-wrapper-'+id+'">');mapit(lat,lon,zoom,id);}
+L.Control.Layers.prototype.initialize.call(this,base,overlay,options);},onAdd:function(map){this._first.addTo(map);return L.Control.Layers.prototype.onAdd.call(this,map);}});L.control.layers.provided=function(baseLayers,overlays,options){return new L.Control.Layers.Provided(baseLayers,overlays,options);};}());function mapit(lat,lon,zoom,id){map=L.map(document.getElementById("map-wrapper-"+id));centerCoord=new L.LatLng(lat,lon);zoom=zoom;L.tileLayer.provider('Esri.WorldTopoMap',{maxZoom:18,attribution:'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Tiles &copy; Esri and the GIS User Community'}).addTo(map);map.setView(centerCoord,zoom);$.ajax({url:"/projects/data/natparks/"+id+".json",dataType:"json",success:function(data,text,request){draw_poly(data,map);}
+});function draw_poly(data,map){var myStyle={"color":"#201a11","weight":2,"opacity":0.65};L.geoJson(data,{style:myStyle}).addTo(map);}}
+function create_map(obj){var lat=parseFloat(obj.attr('data-latitude'));var lon=parseFloat(obj.attr('data-longitude'));var zoom=parseInt(obj.attr('data-zoom'));var id=obj.attr('data-id');$(obj).parents().eq(3).append('<div class="map-container" id="map-container-'+id+'">');$('#map-container-'+id).append('<div class="map-wrapper" id="map-wrapper-'+id+'">');mapit(lat,lon,zoom,id);}
function remove_map(id){$(id).remove();}
-
-function get_exif(obj,id){$(obj).parents().eq(3).append('<div class="more-container" id="'+id+'">');$(obj).parents().eq(2).children('.meta').clone().appendTo('#'+id).css('visibility','visible'); $('#exif-container').css({bottom:function(index,value){return parseFloat($(obj).parent().parent().css("height"))-14;}});}
+function get_exif(obj,id){$(obj).parents().eq(3).append('<div class="more-container" id="'+id+'">');$(obj).parents().eq(2).children('.meta').clone().appendTo('#'+id).css('visibility','visible');$('#exif-container').css({bottom:function(index,value){return parseFloat($(obj).parent().parent().css("height"))-14;}});}
function remove_exif(id){$('#'+id).remove();}
-$(document).ready(function(){ $('.map-link').click(function(){var more_id='more-container-'+$(this).parent().next().children('.more-link').attr('id').split('-')[1];var id='#map-container-'+$(this).attr('data-id');if($('#'+more_id).is(":visible")){remove_exif(more_id);}
+$(document).ready(function(){$('.map-link').click(function(){var more_id='more-container-'+$(this).parent().next().children('.more-link').attr('id').split('-')[1];var id='#map-container-'+$(this).attr('data-id');if($('#'+more_id).is(":visible")){remove_exif(more_id);}
if($(id).is(":visible")){remove_map(id);}else{create_map($(this));}
-return false;}); $('.more-link').click(function(){var map_id='#map-container-'+$(this).parent().prev().children('.map-link').attr('data-id');var id='more-container-'+this.id.split('-')[1];if($(map_id).is(":visible")){remove_map(map_id);}
+return false;});$('.more-link').click(function(){var map_id='#map-container-'+$(this).parent().prev().children('.map-link').attr('data-id');var id='more-container-'+this.id.split('-')[1];if($(map_id).is(":visible")){remove_map(map_id);}
if($('#'+id).is(":visible")){remove_exif(id);}else{get_exif(this,id);}
return false;});}); \ No newline at end of file