Skip to content

Instantly share code, notes, and snippets.

@dobromir-bogatev
Created February 9, 2018 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dobromir-bogatev/359c1ac192e57b9738ea4f482d9a47f8 to your computer and use it in GitHub Desktop.
Save dobromir-bogatev/359c1ac192e57b9738ea4f482d9a47f8 to your computer and use it in GitHub Desktop.
Hugo cant evaluate existing property
title header form contacts
contact
title wave
Contact sales team
5
fields moreinfo
type placeholder required
email
Email
true
type placeholder options
select
Country
title data
Austria
AT
title data
Germany
DE
title data
Switzerland
CH
title data
United kingdom
UK
type placeholder
textarea
Write us
title fields
Get advanced support by providing some more details
type placeholder
input
Name
type placeholder
input
Website URL
title phones email
Talk to sales representative
country
CH
country
CH
country
CH
title
You can also email us:
<button data-turbolinks-permanent href="/contact" data-show="quickview" data-target="quickviewDefault" class="floating-button"><img src="/images/icons/pig-bubble-3.svg" alt="Contact"><span class="bold">Sales</span></button>
{{ with $.Site.GetPage "section" "contact" }}
<div id="quickviewDefault" class="quickview" data-turbolinks-permanent>
<div class="quickview-body">
<div class="black padding-1 padding-bottom-3">
<a class="delete text-white block padding-bottom-1" data-dismiss="quickview">
<img src="/images/icons/close-white.svg" alt="X" class="margin-left-auto">
</a>
<div class="columns">
<div class="column is-one-third">
<img class="margin-auto" src="/images/pig.svg" alt="contact-pig">
</div>
<div class="column is-two-thirds">
<p class="text-white">{{ .Params.Contacts.Title }}</p>
{{ range .Params.Contacts.Phones }}
<p class="text-white">{{ . }}</p>
{{ end }}
{{ $self := . }}
{{ range .Params.Contacts.Phones }}
{{ $rawPhone := (partial "generators/contact.html" (dict "type" "phoneNumbers" "phone" . "context" $self)) }}
{{ $phone := safeHTML (replaceRE "[\t\n\f\r ]" "" $rawPhone) }}
<div class="flex-container margin-top-1">
<img src="/images/switz.png" alt="uk-flag">
<a class="block text-white margin-left-1" href="tel:{{ safeHTML $phone }}">
{{- $rawPhone -}}
</a>
</div>
{{ end }}
<p class="margin-top-1 text-white">{{ .Params.Contacts.Email.Title }}</p>
<a class="block text-white margin-top-1" href="mailto: {{ .Site.Data.contact.email }}">
{{ partial "generators/contact.html" (dict "type" "email" "context" .) }}
</a>
</div>
</div>
</div>
<form id="contactForm" class="padding-1 padding-top-2 flex-stretch" name="contact" path="/other/contact">
<div>
{{ partial "generators/form.html" .Params.Form.Fields }}
</div>
<!-- After more options -->
<div class="e-simple-switch is-switch-hidden">
<input type="checkbox" class="simple-switch" id="float-simple-switch" switch="floating-switch">
<label for="float-simple-switch" class="simple-switch-label margin-bottom-2">
<p>{{ .Params.Form.MoreInfo.Title }}</p>
</label>
<div class="floating-switch">
{{ partial "generators/form.html" .Params.Form.MoreInfo.Fields }}
</div>
</div>
<input type="submit" class="button-raised primary-blue front text-white" value="CONTACT SALES"></input>
</form>
</div>
</div>
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment