Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
tmathern committed Aug 23, 2023
1 parent f1603d9 commit 2771506
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
24 changes: 0 additions & 24 deletions scripts/lib-franklin.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,30 +612,6 @@ export async function waitForLCP(lcpBlocks) {
});
}

/**
* Loads a block named 'header' into header
* @param {Element} header header element
* @returns {Promise}
*/
export function loadHeader(header) {
const headerBlock = buildBlock('header', '');
header.append(headerBlock);
decorateBlock(headerBlock);
return loadBlock(headerBlock);
}

/**
* Loads a block named 'footer' into footer
* @param footer footer element
* @returns {Promise}
*/
export function loadFooter(footer) {
const footerBlock = buildBlock('footer', '');
footer.append(footerBlock);
decorateBlock(footerBlock);
return loadBlock(footerBlock);
}

/**
* Setup block utils.
*/
Expand Down
5 changes: 0 additions & 5 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ governing permissions and limitations under the License.
import {
sampleRUM,
buildBlock,
loadHeader,
loadFooter,
decorateButtons,
decorateIcons,
decorateSections,
Expand Down Expand Up @@ -117,9 +115,6 @@ async function loadLazy(doc) {
const element = hash ? doc.getElementById(hash.substring(1)) : false;
if (hash && element) element.scrollIntoView();

loadHeader(doc.querySelector('header'));
loadFooter(doc.querySelector('footer'));

loadCSS(`${window.hlx.codeBasePath}/styles/lazy-styles.css`);
loadFonts();

Expand Down

0 comments on commit 2771506

Please sign in to comment.