Skip to content

Commit

Permalink
Issue 50 - Remove header and footer (since they're not used) (#53)
Browse files Browse the repository at this point in the history
* Simplify code

* Remove unused icons
  • Loading branch information
tmathern authored Aug 24, 2023
1 parent f1603d9 commit aa04451
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
6 changes: 0 additions & 6 deletions icons/search.svg

This file was deleted.

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 aa04451

Please sign in to comment.