Skip to content

Commit

Permalink
Merge pull request #78 from hlxsites/feature-linkedin-connect
Browse files Browse the repository at this point in the history
block for linkedin connect
  • Loading branch information
pardeepgera23 authored Nov 7, 2023
2 parents 527ba69 + 8209d63 commit 48a4e03
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions blocks/connect/connect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {
a,
div,
span,
} from '../../scripts/dom-builder.js';

export default function decorate(block) {
const image = block.querySelector('picture');
const anchorLink = block.querySelector('a');
const bodytext = block.children[1].textContent.trim();
const container = div(
{ class: 'linkedin-bottom wide-section padding-btm' },
div(
{ class: 'outer' },
a(
{
class: 'text-link', href: anchorLink.href, title: anchorLink.title, 'aria-label': anchorLink.title,
},
image,
span({ class: 'text' }, bodytext),
span({ class: 'btn' }, anchorLink.textContent),
),
),
);
block.innerHTML = '';
block.append(container);
}

0 comments on commit 48a4e03

Please sign in to comment.