chore: refactor some code

This commit is contained in:
Dillon
2020-05-18 21:30:33 +08:00
parent c1016df5d6
commit 8f53c999e5
23 changed files with 90 additions and 90 deletions

View File

@@ -28,6 +28,6 @@
{{- end -}}
{{- $darkStyle = $darkStyle | default $lightStyle -}}
{{- $options := dict "lng" $lng "lat" $lat "zoom" $zoom "marked" $marked "lightStyle" $lightStyle "darkStyle" $darkStyle "geolocate" $geolocate "navigation" $navigation "scale" $scale "fullscreen" $fullscreen -}}
{{- $id := dict "content" $options "scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $id := dict "Content" $options "Scratch" .Page.Scratch | partial "function/id.html" -}}
<div class="mapbox" id="{{ $id }}" style="width: {{ $width }}; height: {{ $height }};"></div>
{{- .Page.Scratch.SetInMap "this" "mapbox" true -}}