Skip to content

Commit

Permalink
Rename '$block' to 'block'
Browse files Browse the repository at this point in the history
  • Loading branch information
bosschaert committed Sep 29, 2023
1 parent f319533 commit aef9361
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions blocks/hero-career/hero-career.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ function addTextEl(tag, txt, parent, ...classes) {
parent.appendChild(newDiv);
}

export default function decorate($block) {
export default function decorate(block) {
const section = document.querySelector('.section.hero-career-container');
if (section) {
section.classList.add('full-width');
}

const cfg = readBlockConfig($block);
const cfg = readBlockConfig(block);

const bgimg = cfg['hero-background'];
const s = `background-image: url(${bgimg})`;
$block.style = s;
block.style = s;

const heroDiv = document.createElement('div');
heroDiv.classList.add('hero-career-top');
$block.appendChild(heroDiv);
block.appendChild(heroDiv);

const heroLeft = document.createElement('div');
heroLeft.classList.add('hero-career-left');
Expand All @@ -50,5 +50,5 @@ export default function decorate($block) {
addTextEl('h6', 'Career background', heroRight, 'hero-career-careerbgtitle'); // TODO i18n
addTextEl('p', cfg['career-background'], heroRight, 'hero-career-careerbg');

deleteConfigBlock($block, heroDiv);
deleteConfigBlock(block, heroDiv);
}

0 comments on commit aef9361

Please sign in to comment.