Browse Source

Adds the possibility to turn maps on and off in the contact page

tags/v1.0.0
JonasVHM 6 years ago
parent
commit
76f2b27c88
2 changed files with 3 additions and 0 deletions
  1. 1
    0
      exampleSite/data/contact.yml
  2. 2
    0
      layouts/partials/contact.html

+ 1
- 0
exampleSite/data/contact.yml View File

headingSpan : Touch headingSpan : Touch
title : Contact Details title : Contact Details
content : Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, vero, provident, eum eligendi blanditiis ex explicabo vitae nostrum facilis asperiores dolorem illo officiis ratione vel fugiat dicta laboriosam labore adipisci. content : Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, vero, provident, eum eligendi blanditiis ex explicabo vitae nostrum facilis asperiores dolorem illo officiis ratione vel fugiat dicta laboriosam labore adipisci.
enable_maps : false
mapLatitude : 51.5223477 mapLatitude : 51.5223477
mapLongitude: -0.1622023 mapLongitude: -0.1622023
contactDetails : contactDetails :

+ 2
- 0
layouts/partials/contact.html View File

</div> </div>
</div> </div>


{{ if .Site.Data.contact.enable_maps }}
{{"<!-- Google Map -->" | safeHTML}} {{"<!-- Google Map -->" | safeHTML}}
<div class="google-map"> <div class="google-map">
<div id="map-canvas" {{ with .Site.Data.contact.mapLatitude }} data-latitude="{{ . }}" {{ end }} <div id="map-canvas" {{ with .Site.Data.contact.mapLatitude }} data-latitude="{{ . }}" {{ end }}
{{ with .Site.Data.contact.mapLongitude }} data-longitude="{{ . }}" {{ end }}></div> {{ with .Site.Data.contact.mapLongitude }} data-longitude="{{ . }}" {{ end }}></div>
</div> </div>
{{ end }}


</section> </section>
{{"<!-- /contact -->" | safeHTML}} {{"<!-- /contact -->" | safeHTML}}

Loading…
Cancel
Save