get in touch button dynamic link support - #155
This commit is contained in:
@@ -352,8 +352,8 @@ params:
|
|||||||
enable: true
|
enable: true
|
||||||
# title: "Custom Name"
|
# title: "Custom Name"
|
||||||
content: My inbox is always open. Whether you have a question or just want to say hi, I’ll try my best to get back to you!
|
content: My inbox is always open. Whether you have a question or just want to say hi, I’ll try my best to get back to you!
|
||||||
email: [email protected]
|
|
||||||
btnName: Mail me
|
btnName: Mail me
|
||||||
|
btnLink: mailto:[email protected]
|
||||||
# formspree:
|
# formspree:
|
||||||
# enable: true # `contact.email` value will be ignored
|
# enable: true # `contact.email` value will be ignored
|
||||||
# formId: abcdefgh # Take it from your form's endpoint, like 'https://formspree.io/f/abcdefgh'
|
# formId: abcdefgh # Take it from your form's endpoint, like 'https://formspree.io/f/abcdefgh'
|
||||||
|
|||||||
@@ -22,9 +22,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{ else if .Site.Params.contact.email }}
|
{{ else if or (.Site.Params.contact.email) (.Site.Params.contact.btnLink) }}
|
||||||
<div class="text-center pt-3">
|
<div class="text-center pt-3">
|
||||||
<a href="mailto:{{ .Site.Params.contact.email }}" class="btn">
|
<a
|
||||||
|
href='{{ if .Site.Params.contact.btnLink }}
|
||||||
|
{{ .Site.Params.contact.btnLink | default "#" }}
|
||||||
|
{{ else }}
|
||||||
|
mailto:{{ .Site.Params.contact.email }}
|
||||||
|
{{ end }}'
|
||||||
|
target="_blank"
|
||||||
|
class="btn"
|
||||||
|
>
|
||||||
{{ .Site.Params.contact.btnName | default "Get in Touch" }}
|
{{ .Site.Params.contact.btnName | default "Get in Touch" }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user