Skip to content

Commit

Permalink
Merge branch 'main' into feature/authorcard
Browse files Browse the repository at this point in the history
  • Loading branch information
kailasnadh790 committed Dec 30, 2023
2 parents 35578c9 + 9dc0388 commit b26f2cb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cigaradvisor/blocks/contest-form/contest-form.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.section.contest-form-container{
padding-left: 0;
padding-right: 0;
width: 100%;
margin-left: auto;
margin-right: auto;
max-width: 1080px;
}
18 changes: 18 additions & 0 deletions cigaradvisor/blocks/contest-form/contest-form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { readBlockConfig } from '../../scripts/aem.js';

export default async function decorate(block) {
const config = readBlockConfig(block);
const iframeWrapper = document.createElement('div');
iframeWrapper.id = config.formid;
block.replaceChildren(iframeWrapper);
const p = document.createElement('p');
function loadScript() {
const script = document.createElement('script');
script.async = true;
script.type = 'text/javascript';
script.src = config.formurl;
p.appendChild(script);
}
block.appendChild(p);
setTimeout(loadScript, 3000);
}

0 comments on commit b26f2cb

Please sign in to comment.