From d2aba9c463afc415ef136a36fbc9b299b12f0d99 Mon Sep 17 00:00:00 2001 From: Pardeep Gera Date: Fri, 3 Nov 2023 16:02:09 +0530 Subject: [PATCH 1/2] block for linkedin connect --- blocks/connect/connect.css | 0 blocks/connect/connect.js | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 blocks/connect/connect.css create mode 100644 blocks/connect/connect.js diff --git a/blocks/connect/connect.css b/blocks/connect/connect.css new file mode 100644 index 00000000..e69de29b diff --git a/blocks/connect/connect.js b/blocks/connect/connect.js new file mode 100644 index 00000000..c015f5f8 --- /dev/null +++ b/blocks/connect/connect.js @@ -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); +} From 8209d6319ff6f4318b822781451a67c8a9ff7b00 Mon Sep 17 00:00:00 2001 From: Pardeep Gera Date: Fri, 3 Nov 2023 16:08:28 +0530 Subject: [PATCH 2/2] removed empty file --- blocks/connect/connect.css | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 blocks/connect/connect.css diff --git a/blocks/connect/connect.css b/blocks/connect/connect.css deleted file mode 100644 index e69de29b..00000000