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

Commit

Permalink
Optionally pass link attributes to contact website
Browse files Browse the repository at this point in the history
  • Loading branch information
zarathustra323 committed Mar 2, 2021
1 parent 8202acf commit 2d9b486
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 2d9b486

Please sign in to comment.