Skip to content
Snippets Groups Projects
Commit 1e951523 authored by katja's avatar katja
Browse files

fixes

parent ea0ee071
No related branches found
No related tags found
No related merge requests found
......@@ -129,22 +129,6 @@ export class SiteSearch {
this.searchPanelToggled.emit();
this.adjustPosition(this.el);
/*
let hyHeader = this.el.closest('.hy-site-header') as HTMLElement;
const headerHeight = hyHeader.classList.contains('hy-site-header--sticky-active')
? `${hyHeader.offsetHeight}px`
: `${hyHeader.offsetTop + hyHeader.offsetHeight}px`;
const searchPanel = this.el.shadowRoot.querySelectorAll(`.site-search__panel`)[0] as HTMLElement;
searchPanel.style.top = headerHeight;
// Add shadow backdrop
let rect = searchPanel.getBoundingClientRect();
let shadowTop = hyHeader.classList.contains('hy-site-header--sticky-active')
? hyHeader.offsetHeight + rect.height
: hyHeader.offsetTop + hyHeader.offsetHeight + rect.height;
this.showBackdropShadow('open', shadowTop);
*/
// Remove hidden class from cludo suggestions
let cludoSayt = document.querySelectorAll('stencil-cludo-sayt')[0] as HTMLElement;
......@@ -202,25 +186,6 @@ export class SiteSearch {
searchPanel.style.top = headerHeight;
this.showBackdropShadow('open', shadowTop);
/*
let hyTopHeader = this.el.closest('.hy-site-header__content-top') as HTMLElement;
if (hyTopHeader && hyTopHeader.hasAttribute('is-mobile')) {
console.log('do mobile stuff');
} else {
let mainMenuToggle = target.shadowRoot.querySelector('.menu--main-group__toggle') as HTMLElement;
let mainMenuDropdown = target.shadowRoot.querySelector('.menu--main-group__dropdown') as HTMLElement;
let mainMenuList = target.shadowRoot.querySelector('.list') as HTMLElement;
if (mainMenuDropdown && mainMenuList && mainMenuToggle) {
let rectHeader = hyTopHeader.getBoundingClientRect();
let rectMenuToggle = mainMenuToggle.getBoundingClientRect();
mainMenuDropdown.style.top = `${rectHeader.height}px`;
mainMenuList.style.left = `${rectMenuToggle.left}px`;
}
}
*/
}
showBackdropShadow(state = 'close', top = 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment