various updates

This commit is contained in:
Ben Goldsworthy 2023-06-30 21:16:59 -06:00
parent 4955708f0e
commit ee87009471
37 changed files with 1734 additions and 401 deletions

View file

@ -43,20 +43,20 @@ L.HeatLayer=(L.Layer?L.Layer:L.Class).extend({initialize:function(t,i){this._lat
{{ .Scratch.Set "maxItems" 0 }}
{{ .Scratch.Set "numOfItems" 0 }}
{{ warnf "No of locations: %v" ( len $.Site.Data.locations ) }}
/* warnf "No of locations: %v" ( len $.Site.Data.locations ) */
{{ range $key, $value := $.Site.Data.locations }}
{{ $childPosts := where $.Site.Pages ".Params.locations" "intersect" ( slice $key ) }}
{{ warnf "Current location: %v" $key }}
{{ warnf "Child posts: %v" $childPosts }}
/* warnf "Current location: %v" $key */
/* warnf "Child posts: %v" $childPosts */
{{ .Scratch.Set "numOfItems" ( len $childPosts ) }}
{{ if ( gt ( .Scratch.Get "numOfItems" ) ( .Scratch.Get "maxItems" ) ) }}
{{ warnf "Updating maxItems" }}
/* warnf "Updating maxItems" */
{{ .Scratch.Set "maxItems" ( .Scratch.Get "numOfItems" ) }}
{{ warnf "New maxItems: %d" .Scratch.Get "maxItems" }}
/* warnf "New maxItems: %d" .Scratch.Get "maxItems" */
{{ end }}
{{ end }}
{{ warnf "maxItems: %v" ( .Scratch.Get "maxItems" ) }}
/* warnf "maxItems: %v" ( .Scratch.Get "maxItems" ) */
console.log({{ .Scratch.Get "maxItems" }});
L.heatLayer([