Skip to content

Commit

Permalink
Merge pull request #208 from hlxsites/maxed/cls-2
Browse files Browse the repository at this point in the history
fix: cls issues on homepage
  • Loading branch information
maxakuru authored Oct 13, 2023
2 parents 8383458 + ba645f7 commit 07b7947
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
4 changes: 4 additions & 0 deletions blocks/hero-search/hero-search.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
padding: var(--spacing--20) var(--padding--mobile) 0 var(--padding--mobile);
}

search-bar {
margin-top: var(--spacing--7);
}

.hero-search-wrapper {
position: relative;
}
Expand Down
26 changes: 11 additions & 15 deletions blocks/hero-search/hero-search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions blocks/search-bar/search-bar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global Coveo */
import { getMetadata, loadCSS } from '../../scripts/lib-franklin.js';
import { getMetadata, loadCSS, readBlockConfig } from '../../scripts/lib-franklin.js';

const TAG_NAME = 'search-bar';
const COVEO_BUNDLE_VERSION = 'v2.10082';
Expand Down Expand Up @@ -296,7 +296,12 @@ export class SearchBar extends HTMLElement {
}

export default function decorate(block) {
block.innerHTML = '<search-bar></search-bar>';
console.log('decorate search-bar: ', block);
const config = readBlockConfig(block);
console.log('config: ', config);
block.innerHTML = `<search-bar \
${config['default-option'] ? `default-option="${config['default-option']}"` : ''}\
${config['default-options'] ? `default-options="${config['default-options']}"` : ''}></search-bar>`;
}

(async () => {
Expand Down

0 comments on commit 07b7947

Please sign in to comment.