Adding mailto directive

This commit is contained in:
Will Marshall
2014-04-30 11:41:53 +10:00
parent 149d0fc9b5
commit b6ffb863ce
2 changed files with 7 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
Darkswarm.directive "mailto", (Navigation)->
restrict: 'A'
link: (scope, element, attrs)->
element.bind 'click', (e)->
e.preventDefault()
window.location.href = "mailto:#{attrs.href.split("").reverse().join("")}"

View File

@@ -13,9 +13,7 @@
%i.fi-social-linkedin
LinkedIn   
%p
%a.button.neutral-btn{href: '#', target: '_blank'}
%i.fi-at-sign
Email us at
%a{href: "hello@openfoodnetwork.org".reverse, target: '_blank', mailto: true}
%span.email
= "hello@openfoodnetwork.org".reverse
.small-2.columns