Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #35 from zarathustra323/contact-website-attrs
Browse files Browse the repository at this point in the history
Optionally pass link attributes to contact website
  • Loading branch information
zarathustra323 authored Mar 2, 2021
2 parents 8202acf + 2d9b486 commit a77ce91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ $ const fields = ["title", "website"];
$ if (showEmail) fields.push("publicEmail");
$ const showFields = fields.some(k => content[k]);

$ const websiteLinkAttrs = getAsObject(input, "websiteLinkAttrs");

<default-theme-page-contact-details|{ blockName }|
tag=input.tag
class=input.class
Expand All @@ -39,7 +41,7 @@ $ const showFields = fields.some(k => content[k]);
<if(showEmail)>
<marko-web-content-public-email block-name=blockName obj=content link=true/>
</if>
<marko-web-content-website block-name=blockName obj=content link=true />
<marko-web-content-website block-name=blockName obj=content link={ attrs: websiteLinkAttrs } />
</default-theme-content-contact-details-section>
</if>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
},
"@class": "string",
"@modifiers": "array",
"@attrs": "object"
"@attrs": "object",
"@website-link-attrs": "object"
},
"<default-theme-content-contact-details-section>": {
"template": "./section.marko",
Expand Down

0 comments on commit a77ce91

Please sign in to comment.