From ef035190d0929af8beca8f22d584e73e2bf4ea77 Mon Sep 17 00:00:00 2001 From: Razvan Date: Thu, 27 Aug 2020 10:33:05 +0300 Subject: [PATCH 1/5] initial commit --- src/scss/block-editor.scss | 2 +- src/scss/components/_spacing.scss | 9 --------- style-rtl.css | 4 ---- style.css | 4 ---- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/scss/block-editor.scss b/src/scss/block-editor.scss index aa60dfd2..3f129004 100644 --- a/src/scss/block-editor.scss +++ b/src/scss/block-editor.scss @@ -104,7 +104,7 @@ h1, h2, h3, h4, h5, h6, line-height: 1.4; } - &:not(.is-selected) .editor-post-title__input { + &:not(.is-selected) .editor-post-title__input { border-bottom: 1px dashed rgba(123,134,162,.3); } } diff --git a/src/scss/components/_spacing.scss b/src/scss/components/_spacing.scss index ac3c0c4b..2e8a7757 100644 --- a/src/scss/components/_spacing.scss +++ b/src/scss/components/_spacing.scss @@ -26,12 +26,3 @@ --block-top-spacing: 0; } } - -.wp-block-column, -[class*="__inner-container"] { - - > :not(:first-child) { - --novablocks-element-spacing-multiplier: 0.5; - } -} - diff --git a/style-rtl.css b/style-rtl.css index ade0fed3..7af48644 100644 --- a/style-rtl.css +++ b/style-rtl.css @@ -2441,10 +2441,6 @@ span.page-numbers { .novablocks-media--blog[class][class][class]:first-child { --block-top-spacing: 0; } -.wp-block-column > :not(:first-child), -[class*="__inner-container"] > :not(:first-child) { - --novablocks-element-spacing-multiplier: 0.5; } - .novablocks-hero__inner-container > .c-headline .c-headline__primary, .novablocks-hero__inner-container > .c-headline .c-headline__secondary { opacity: 0; } diff --git a/style.css b/style.css index 7d846a93..250ee41e 100644 --- a/style.css +++ b/style.css @@ -2441,10 +2441,6 @@ span.page-numbers { .novablocks-media--blog[class][class][class]:first-child { --block-top-spacing: 0; } -.wp-block-column > :not(:first-child), -[class*="__inner-container"] > :not(:first-child) { - --novablocks-element-spacing-multiplier: 0.5; } - .novablocks-hero__inner-container > .c-headline .c-headline__primary, .novablocks-hero__inner-container > .c-headline .c-headline__secondary { opacity: 0; } From b3ac917804eb31b96e94f708e7385a1122427d7d Mon Sep 17 00:00:00 2001 From: Razvan Date: Thu, 27 Aug 2020 18:04:49 +0300 Subject: [PATCH 2/5] Adjust card styling to accomodate new markup form posts collection in nova blocks --- dist/css/block-editor-rtl.css | 3 +++ dist/css/block-editor.css | 3 +++ dist/css/blocks/editor-rtl.css | 4 ++++ dist/css/blocks/editor.css | 4 ++++ dist/css/blocks/style-rtl.css | 4 ++++ dist/css/blocks/style.css | 4 ++++ src/scss/blocks/nova-blocks/cards-collection/_style.scss | 6 ++++++ 7 files changed, 28 insertions(+) diff --git a/dist/css/block-editor-rtl.css b/dist/css/block-editor-rtl.css index 8e2d7bc5..846f6bc8 100644 --- a/dist/css/block-editor-rtl.css +++ b/dist/css/block-editor-rtl.css @@ -372,6 +372,9 @@ .content-is-highlighted:not(.block-is-highlighted) .editor-styles-wrapper .novablocks-card a:not(.wp-block-button__link) { color: inherit; text-decoration-color: inherit; } + .editor-styles-wrapper .novablocks-card__inner-container[class] { + padding-right: 0; + padding-left: 0; } .editor-styles-wrapper [data-type="novablocks/media"] + .editor-styles-wrapper [data-type="novablocks/media"], .editor-styles-wrapper [data-type="novablocks/cards-collection"] + .editor-styles-wrapper [data-type="novablocks/media"], .editor-styles-wrapper [data-type="novablocks/posts-collection"] + .editor-styles-wrapper [data-type="novablocks/media"], diff --git a/dist/css/block-editor.css b/dist/css/block-editor.css index a5ac6708..426c9de2 100644 --- a/dist/css/block-editor.css +++ b/dist/css/block-editor.css @@ -372,6 +372,9 @@ .content-is-highlighted:not(.block-is-highlighted) .editor-styles-wrapper .novablocks-card a:not(.wp-block-button__link) { color: inherit; text-decoration-color: inherit; } + .editor-styles-wrapper .novablocks-card__inner-container[class] { + padding-left: 0; + padding-right: 0; } .editor-styles-wrapper [data-type="novablocks/media"] + .editor-styles-wrapper [data-type="novablocks/media"], .editor-styles-wrapper [data-type="novablocks/cards-collection"] + .editor-styles-wrapper [data-type="novablocks/media"], .editor-styles-wrapper [data-type="novablocks/posts-collection"] + .editor-styles-wrapper [data-type="novablocks/media"], diff --git a/dist/css/blocks/editor-rtl.css b/dist/css/blocks/editor-rtl.css index bdb8fc5d..319b5bdc 100644 --- a/dist/css/blocks/editor-rtl.css +++ b/dist/css/blocks/editor-rtl.css @@ -400,6 +400,10 @@ ul.wp-block-categories__list[class] { color: inherit; text-decoration-color: inherit; } +.novablocks-card__inner-container[class] { + padding-right: 0; + padding-left: 0; } + [data-type="novablocks/media"] + [data-type="novablocks/media"], [data-type="novablocks/cards-collection"] + [data-type="novablocks/media"], [data-type="novablocks/posts-collection"] + [data-type="novablocks/media"], diff --git a/dist/css/blocks/editor.css b/dist/css/blocks/editor.css index 27e0c013..03b36dfc 100644 --- a/dist/css/blocks/editor.css +++ b/dist/css/blocks/editor.css @@ -400,6 +400,10 @@ ul.wp-block-categories__list[class] { color: inherit; text-decoration-color: inherit; } +.novablocks-card__inner-container[class] { + padding-left: 0; + padding-right: 0; } + [data-type="novablocks/media"] + [data-type="novablocks/media"], [data-type="novablocks/cards-collection"] + [data-type="novablocks/media"], [data-type="novablocks/posts-collection"] + [data-type="novablocks/media"], diff --git a/dist/css/blocks/style-rtl.css b/dist/css/blocks/style-rtl.css index 51b7f778..2b9aa82f 100644 --- a/dist/css/blocks/style-rtl.css +++ b/dist/css/blocks/style-rtl.css @@ -505,3 +505,7 @@ .content-is-highlighted:not(.block-is-highlighted) .novablocks-card a:not(.wp-block-button__link) { color: inherit; text-decoration-color: inherit; } + +.novablocks-card__inner-container[class] { + padding-right: 0; + padding-left: 0; } diff --git a/dist/css/blocks/style.css b/dist/css/blocks/style.css index b93f7bbd..69114564 100644 --- a/dist/css/blocks/style.css +++ b/dist/css/blocks/style.css @@ -505,3 +505,7 @@ .content-is-highlighted:not(.block-is-highlighted) .novablocks-card a:not(.wp-block-button__link) { color: inherit; text-decoration-color: inherit; } + +.novablocks-card__inner-container[class] { + padding-left: 0; + padding-right: 0; } diff --git a/src/scss/blocks/nova-blocks/cards-collection/_style.scss b/src/scss/blocks/nova-blocks/cards-collection/_style.scss index 7561361e..7f4043f9 100644 --- a/src/scss/blocks/nova-blocks/cards-collection/_style.scss +++ b/src/scss/blocks/nova-blocks/cards-collection/_style.scss @@ -15,3 +15,9 @@ } } } + +// remove padding added on all inner containers +.novablocks-card__inner-container[class] { + padding-left: 0; + padding-right: 0; +} From 28da93dc77593544f4aeae31b8e3e8dcdf2e3450 Mon Sep 17 00:00:00 2001 From: Razvan Date: Fri, 11 Sep 2020 10:58:01 +0300 Subject: [PATCH 3/5] Add support for Posts Collection block --- inc/integrations/novablocks.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/integrations/novablocks.php b/inc/integrations/novablocks.php index c77fd00f..71978f3e 100644 --- a/inc/integrations/novablocks.php +++ b/inc/integrations/novablocks.php @@ -33,6 +33,7 @@ function rosa2_novablocks_setup() { 'navigation', 'opentable', 'openhours', + 'posts-collection', 'slideshow', ) ); } From 1ec3a99b34baea161c2beb62de0fcd948cf61cca Mon Sep 17 00:00:00 2001 From: Razvan Date: Fri, 11 Sep 2020 16:11:29 +0300 Subject: [PATCH 4/5] Imrpove integraiton with Nova Blocks's posts collection sticky areas --- dist/css/blocks/style-rtl.css | 3 +++ dist/css/blocks/style.css | 3 +++ dist/css/theme/style-rtl.css | 3 +-- dist/css/theme/style.css | 3 +-- dist/js/scripts.js | 1 + dist/js/scripts.min.js | 2 +- src/js/components/header.js | 2 ++ src/scss/blocks/nova-blocks/_style.scss | 4 ++++ src/scss/theme/pages/_single.scss | 1 - 9 files changed, 16 insertions(+), 6 deletions(-) diff --git a/dist/css/blocks/style-rtl.css b/dist/css/blocks/style-rtl.css index 5f52b7e5..c102aabb 100644 --- a/dist/css/blocks/style-rtl.css +++ b/dist/css/blocks/style-rtl.css @@ -110,6 +110,9 @@ .novablocks-media__inner-container .wp-block-separator { width: 100%; } +.novablocks-grid__column:first-child .novablocks-grid__area:first-child:last-child { + top: calc( var(--novablocks-grid-spacing) * var(--novablocks-grid-spacing-modifier, 1) + var(--site-header-height, 0)); } + .nova-food-menu { --theme-content-width-normal: var(--theme-content-width-wide); } diff --git a/dist/css/blocks/style.css b/dist/css/blocks/style.css index c84b6492..9951e19b 100644 --- a/dist/css/blocks/style.css +++ b/dist/css/blocks/style.css @@ -110,6 +110,9 @@ .novablocks-media__inner-container .wp-block-separator { width: 100%; } +.novablocks-grid__column:first-child .novablocks-grid__area:first-child:last-child { + top: calc( var(--novablocks-grid-spacing) * var(--novablocks-grid-spacing-modifier, 1) + var(--site-header-height, 0)); } + .nova-food-menu { --theme-content-width-normal: var(--theme-content-width-wide); } diff --git a/dist/css/theme/style-rtl.css b/dist/css/theme/style-rtl.css index 814ea56d..e6c2adb6 100644 --- a/dist/css/theme/style-rtl.css +++ b/dist/css/theme/style-rtl.css @@ -100,8 +100,7 @@ body.archive:not(.woocommerce-page), body.blog, body.search:not(.search-no-resul .single .site-content, .page .site-content { - padding-bottom: var(--theme-spacing-fluid-large); - overflow: hidden; } + padding-bottom: var(--theme-spacing-fluid-large); } .page:not(.has-hero) .site-content { padding-top: var(--theme-spacing-fluid-large); } diff --git a/dist/css/theme/style.css b/dist/css/theme/style.css index 9ced6470..e9a02d62 100644 --- a/dist/css/theme/style.css +++ b/dist/css/theme/style.css @@ -100,8 +100,7 @@ body.archive:not(.woocommerce-page), body.blog, body.search:not(.search-no-resul .single .site-content, .page .site-content { - padding-bottom: var(--theme-spacing-fluid-large); - overflow: hidden; } + padding-bottom: var(--theme-spacing-fluid-large); } .page:not(.has-hero) .site-content { padding-top: var(--theme-spacing-fluid-large); } diff --git a/dist/js/scripts.js b/dist/js/scripts.js index 60556325..f56b31b1 100644 --- a/dist/js/scripts.js +++ b/dist/js/scripts.js @@ -1439,6 +1439,7 @@ function () { key: "render", value: function render() { if (!this.element) return; + window.document.body.style.setProperty('--site-header-height', this.visibleHeaderHeight + this.promoBarHeight + 'px'); this.updateMobileNavigationOffset(); this.updateMobileHeaderState(); this.updateDesktopHeaderState(false); diff --git a/dist/js/scripts.min.js b/dist/js/scripts.min.js index bdfba2ee..839af144 100644 --- a/dist/js/scripts.min.js +++ b/dist/js/scripts.min.js @@ -1,2 +1,2 @@ /*! For license information please see scripts.min.js.LICENSE */ -!function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=15)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function i(e,t){for(var i=0;i0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{var t=window.matchMedia&&matchMedia("(pointer:coarse)");if(t&&"(pointer:coarse)"===t.media)e=!!t.matches;else if("orientation"in window)e=!0;else{var i=navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(i)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(i)}}return e},c=function(e,t){var i=jQuery('
').appendTo("body"),n=i.is(":visible");return i.remove(),n},d=i(3),u=i.n(d),f=new(function(){function e(){a()(this,e),this.props={},this.newProps={},this.renderCallbacks=[],this.resizeCallbacks=[],this.observeCallbacks=[],this.scrollCallbacks=[],this.currentMutationList=[],this.frameRendered=!0,this.useOrientation=l()&&"orientation"in window,this._init()}return h()(e,[{key:"_init",value:function(){s()(window);var e=this._updateProps.bind(this),t=this._renderLoop.bind(this);e(),s()(e),this._bindOnResize(),this._bindOnScroll(),this._bindOnLoad(),this._bindObserver(),this._bindCustomizer(),requestAnimationFrame(t)}},{key:"_bindOnResize",value:function(){var e=s()(window),t=this._updateProps.bind(this);this.useOrientation?e.on("orientationchange",(function(){e.one("resize",t)})):e.on("resize",t)}},{key:"_bindOnScroll",value:function(){s()(window).on("scroll",this._updateScroll.bind(this))}},{key:"_bindOnLoad",value:function(){s()(window).on("load",this._updateProps.bind(this))}},{key:"_bindObserver",value:function(){var e,t,i,n=this,s=this._observeCallback.bind(this),o=(e=function(){s(),n.currentMutationList=[]},t=300,i=null,function(){var n=this,s=arguments,o=function(){e.apply(n,s)};clearTimeout(i),i=setTimeout(o,t)});window.MutationObserver&&new MutationObserver((function(e){n.currentMutationList=n.currentMutationList.concat(e),o()})).observe(document.body,{childList:!0,subtree:!0})}},{key:"_bindCustomizer",value:function(){"undefined"!=typeof wp&&void 0!==wp.customize&&(void 0!==wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",this._updateProps.bind(this)),wp.customize.bind("change",this._updateProps.bind(this)))}},{key:"_updateProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._updateSize(e),this._updateScroll(e)}},{key:"_observeCallback",value:function(){var e=this.currentMutationList;s.a.each(this.observeCallbacks,(function(t,i){i(e)}))}},{key:"_renderLoop",value:function(){this.frameRendered||(this._renderCallback(),this.frameRendered=!0),window.requestAnimationFrame(this._renderLoop.bind(this))}},{key:"_renderCallback",value:function(){var e=arguments;s.a.each(this.renderCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_resizeCallback",value:function(){var e=arguments;s.a.each(this.resizeCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_scrollCallback",value:function(){var e=arguments;s.a.each(this.scrollCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_updateScroll",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.newProps=Object.assign({},this.newProps,{scrollY:window.pageYOffset,scrollX:window.pageXOffset}),this._shouldUpdate(this._scrollCallback.bind(this))}},{key:"_updateSize",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=document.body,t=document.documentElement,i=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight),n=Math.max(t.scrollHeight,t.offsetHeight);this.newProps=Object.assign({},this.newProps,{scrollHeight:Math.max(i,n),adminBarHeight:this.getAdminBarHeight(),windowWidth:this.useOrientation&&window.screen&&window.screen.availWidth||window.innerWidth,windowHeight:this.useOrientation&&window.screen&&window.screen.availHeight||window.innerHeight}),this._shouldUpdate(this._resizeCallback.bind(this))}},{key:"_shouldUpdate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(this._hasNewProps()||t)&&(this.props=Object.assign({},this.props,this.newProps),this.newProps={},this.frameRendered=!1,"function"==typeof e&&e())}},{key:"_hasNewProps",value:function(){var e=this;return Object.keys(this.newProps).some((function(t){return e.newProps[t]!==e.props[t]}))}},{key:"getAdminBarHeight",value:function(){var e=document.getElementById("wpadminbar");return e?e.getBoundingClientRect().height:0}},{key:"registerOnResize",value:function(e){"function"==typeof e&&this.resizeCallbacks.indexOf(e)<0&&this.resizeCallbacks.push(e)}},{key:"registerOnScroll",value:function(e){"function"==typeof e&&this.scrollCallbacks.indexOf(e)<0&&this.scrollCallbacks.push(e)}},{key:"registerObserverCallback",value:function(e){"function"==typeof e&&this.observeCallbacks.indexOf(e)<0&&this.observeCallbacks.push(e)}},{key:"registerRender",value:function(e){"function"==typeof e&&this.renderCallbacks.indexOf(e)<0&&this.renderCallbacks.push(e)}},{key:"getProps",value:function(){return this.props}}]),e}()),p=function(){function e(t){var i=this;a()(this,e),this.element=t,this.progress=0,this.timeline=new TimelineMax({paused:!0,onComplete:function(){i.paused=!0}}),this.pieces=this.getMarkupPieces(),this.paused=!1,this.offset=0,this.reduceMotion=!1,this.update(),this.updateOnScroll(),this.init()}return h()(e,[{key:"init",value:function(){var e=this;f.registerOnScroll((function(){e.update()})),f.registerRender((function(){e.updateOnScroll()}));var t=window.matchMedia("(prefers-reduced-motion: reduce)");if(t.addListener((function(){e.reduceMotion=t.matches,e.updateOnScroll()})),this.reduceMotion=t.matches,this.addIntroToTimeline(),this.timeline.addLabel("middle"),this.addOutroToTimeline(),this.timeline.addLabel("end"),this.pauseTimelineOnScroll(),this.reduceMotion){var i=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end");this.paused=!0,this.timeline.progress(i)}else this.timeline.play()}},{key:"update",value:function(){var e=f.getProps().scrollY;this.box=this.element.getBoundingClientRect(),this.view={left:this.box.left,top:this.box.top+e,width:this.box.width,height:this.box.height}}},{key:"updateOnScroll",value:function(){var e=f.getProps(),t=e.scrollY,i=e.scrollHeight,n=e.windowHeight,s=.5*n,o=i-n-.5*s,a=this.view.top+.5*(this.box.height-n),r=Math.max(0,Math.min(a,o));if(this.start=r-.5*s,this.end=this.start+s,this.progress=(t-this.start)/(this.end-this.start),this.reduceMotion){var h=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end");this.progress=h}this.updateTimelineOnScroll()}},{key:"updateTimelineOnScroll",value:function(){if(this.paused){var e=this.timeline.progress(),t=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end"),i=2*(this.progress-.5)*(1-t)+t;e!==(i=Math.min(Math.max(t,i),1))&&this.timeline.progress(i)}}},{key:"getMarkupPieces",value:function(){var e=jQuery(this.element).find(".novablocks-hero__inner-container"),t=e.children().filter(".c-headline").first(),i=t.find(".c-headline__primary"),n=t.find(".c-headline__secondary"),s=t.next(".wp-block-separator"),o=s.find(".c-separator__symbol"),a=s.find(".c-separator__line"),r=s.find(".c-separator__arrow"),h=t.prevAll(),l=t.length?t.nextAll().not(s):e.children();return{headline:t,title:i,subtitle:n,separator:s,sepFlower:o,sepLine:a,sepArrow:r,othersBefore:h,othersAfter:l}}},{key:"addIntroToTimeline",value:function(){var e=this.timeline,t=f.getProps().windowWidth,i=this.pieces,n=i.headline,s=i.title,o=i.subtitle,a=i.separator,r=i.sepFlower,h=i.sepLine,l=i.sepArrow,c=i.othersBefore,d=i.othersAfter;s.length&&s.text().trim().length&&(this.splitTitle=new SplitText(s,{wordsClass:"c-headline__word"}),this.splitTitle.lines.forEach((function(i){var n=Array.from(i.children),s=[];n.forEach((function(e){s.push.apply(s,u()(e.children))})),s.forEach((function(i){var n=i.getBoundingClientRect(),o=(i.offsetWidth,2*(n.x-t/2)/t),a=400*s.length*o;e.from(i,.72,{x:a,ease:Expo.easeOut},0)}))})),e.fromTo(s,.89,{opacity:0},{opacity:1,ease:Expo.easeOut},0),e.fromTo(n,1,{y:30},{y:0,ease:Expo.easeOut},0)),o.length&&(e.fromTo(o,.65,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.65"),e.fromTo(o,.9,{y:30},{y:0,ease:Quint.easeOut},"-=0.65")),a.length&&(r.length&&(e.fromTo(r,.15,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.6"),e.fromTo(r,.55,{rotation:-270},{rotation:0,ease:Back.easeOut},"-=0.5")),h.length&&(e.fromTo(h,.6,{width:0},{width:"42%",opacity:1,ease:Quint.easeOut},"-=0.55"),e.fromTo(a,.6,{width:0},{width:"100%",opacity:1,ease:Quint.easeOut},"-=0.6")),l.length&&e.fromTo(l,.2,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.27")),d.length&&(e.fromTo(d,.5,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.28"),e.fromTo(d,.75,{y:-20},{y:0},"-=0.5")),c.length&&(e.fromTo(c,.5,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.75"),e.fromTo(c,.75,{y:20},{y:0},"-=0.75")),this.timeline=e}},{key:"addOutroToTimeline",value:function(){var e=this.pieces,t=e.title,i=e.subtitle,n=e.othersBefore,s=e.othersAfter,o=e.separator,a=e.sepLine,r=e.sepFlower,h=e.sepArrow,l=this.timeline;l.fromTo(t,1.08,{y:0},{opacity:0,y:-60,ease:Quad.easeIn},"middle"),l.to(i,1.08,{opacity:0,y:-90,ease:Quad.easeIn},"middle"),l.to(n,1.08,{y:60,opacity:0,ease:Quad.easeIn},"middle"),l.to(s,1.08,{y:60,opacity:0,ease:Quad.easeIn},"middle"),l.to(a,.86,{width:"0%",opacity:0,ease:Quad.easeIn},"-=0.94"),l.to(o,.86,{width:"0%",opacity:0,ease:Quad.easeIn},"-=0.86"),l.to(r,1,{rotation:180},"-=1.08"),l.to(r,.11,{opacity:0},"-=0.03"),l.to(h,.14,{opacity:0},"-=1.08"),this.timeline=l}},{key:"revertTitle",value:function(){void 0!==this.splitTitle&&this.splitTitle.revert()}},{key:"pauseTimelineOnScroll",value:function(){var e=this,t=this.timeline.getLabelTime("middle"),i=this.timeline.getLabelTime("end");this.timeline.eventCallback("onUpdate",(function(n){var s=n.time(),o=s>t,a=.5*((s-t)/(i-t))+.5>=e.progress;o&&a&&(n.pause(),e.revertTitle(),e.timeline.eventCallback("onUpdate",null),e.paused=!0)}),["{self}"])}}]),e}(),m=function(){function e(t){a()(this,e),this.$element=s()(t),this.$checkbox=this.$element.find(".c-comments-toggle__checkbox"),this.$content=this.$element.find(".comments-area__content"),this.$contentWrap=this.$element.find(".comments-area__wrap"),this.$contentWrap.css("display","block"),this.$checkbox.on("change",this.onChange.bind(this)),this.checkWindowLocationComments()}return h()(e,[{key:"onChange",value:function(){this.toggle(!1)}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.$contentWrap,i=this.$checkbox.prop("checked"),n=i?this.$content.outerHeight():0;e?t.css("height",n):TweenMax.to(t,.4,{height:n,onComplete:function(){i&&t.css("height","")}})}},{key:"checkWindowLocationComments",value:function(){-1===window.location.href.indexOf("#comment")&&(this.$checkbox.prop("checked",!1),this.toggle(!0))}}]),e}(),g={offsetTargetElement:null},v=function(){function e(t,i){a()(this,e),t&&(this.element=t,this.options=Object.assign({},g,i),this.$header=s()(this.element),this.$toggle=s()(".c-menu-toggle"),this.$toggleWrap=s()(".c-menu-toggle__wrap"),this.scrolled=!1,this.inversed=!1,this.abovePromoBar=!1,this.wasSticky=s()("body").is(".has-site-header-fixed"),this.offset=0,this.scrollOffset=0,this.mobileHeaderHeight=0,this.promoBarHeight=0,this.$page=s()("#page .site-content"),this.$hero=s()(".has-hero .novablocks-hero").first().find(".novablocks-hero__foreground"),this.$promoBar=s()(".novablocks-announcement-bar"),this.createMobileHeader(),this.onResize(),this.render(),f.registerOnResize(this.onResize.bind(this)),this.initialize())}return h()(e,[{key:"initialize",value:function(){this.timeline=this.getInroTimeline(),s()(".site-header__wrapper").css("transition","none"),this.$header.addClass("site-header--fixed site-header--ready"),this.$mobileHeader.addClass("site-header--fixed site-header--ready"),this.timeline.play()}},{key:"update",value:function(){this.updatePageOffset(),this.updateHeaderOffset(),this.updateMobileHeaderOffset()}},{key:"getInroTimeline",value:function(){var e=this.element,t=new TimelineMax({paused:!0}),i=s()(e).outerHeight(),n=Power4.easeInOut;return t.to(e,.5,{opacity:1,ease:n},0),t.to({height:0},.5,{height:i,onUpdate:this.onHeightUpdate.bind(this),onUpdateParams:["{self}"],onComplete:function(){s()(".site-header__wrapper").css("transition","")},ease:n},0),t}},{key:"onHeightUpdate",value:function(e){this.getProps(),this.box=Object.assign(this.box,{height:e.target.height}),this.setVisibleHeaderHeight(),this.update()}},{key:"getMobileHeaderHeight",value:function(){var e=this.$mobileHeader.css("height","").outerHeight(),t=this.$toggleWrap.css("height","").outerHeight();return Math.max(e,t)}},{key:"isMobileHeaderVisibile",value:function(){return this.$mobileHeader.is(":visible")}},{key:"setVisibleHeaderHeight",value:function(){this.visibleHeaderHeight=this.isMobileHeaderVisibile()?this.mobileHeaderHeight:this.box.height}},{key:"getProps",value:function(){this.box=this.element.getBoundingClientRect(),this.scrollOffset=this.getScrollOffset(),this.mobileHeaderHeight=this.getMobileHeaderHeight(),this.$promoBar.length&&(this.promoBarHeight=this.$promoBar.outerHeight())}},{key:"onResize",value:function(){var e=s()(this.element),t=e.hasClass("site-header--scrolled");e.css("transition","none"),e.removeClass("site-header--scrolled"),this.getProps(),this.setVisibleHeaderHeight(),this.shouldMakeHeaderStatic(),e.toggleClass("site-header--scrolled",t),window.requestIdleCallback?requestIdleCallback((function(){e.css("transition","")})):setTimeout((function(){e.css("transition","")}),0),this.update()}},{key:"shouldMakeHeaderStatic",value:function(){var e=s()("body"),t=f.getProps().windowHeight;this.wasSticky&&e.toggleClass("has-site-header-fixed",this.visibleHeaderHeight<.2*t)}},{key:"updateHeaderOffset",value:function(){this.element&&(this.element.style.marginTop=this.offset+"px")}},{key:"updateMobileHeaderOffset",value:function(){this.$mobileHeader&&(this.$mobileHeader.css({height:this.mobileHeaderHeight}),TweenMax.to(this.$mobileHeader,.2,{y:this.offset}),s()(".site-header__inner-container").css({transform:"translateY(".concat(this.mobileHeaderHeight,"px)")}),this.$toggleWrap.css({height:this.mobileHeaderHeight}),TweenMax.to(this.$toggleWrap,.2,{y:this.offset}))}},{key:"getScrollOffset",value:function(){var e=f.getProps(),t=e.adminBarHeight,i=e.scrollY,n=this.options.offsetTargetElement;if(n){var s=n.getBoundingClientRect();return s.top+i+s.height-(t+this.offset+this.box.height/2)}return 0}},{key:"updatePageOffset",value:function(){TweenMax.set(this.$page,{css:{marginTop:this.visibleHeaderHeight+this.offset}})}},{key:"updateMobileNavigationOffset",value:function(){var e=f.getProps().scrollY;c("below","lap")&&(this.element.style.marginTop=Math.max(this.promoBarHeight-e,0)+"px")}},{key:"updateMobileHeaderState",value:function(){var e=f.getProps().scrollY>this.promoBarHeight;e!==this.abovePromoBar&&(s()(body).toggleClass("site-header-mobile--scrolled",e),this.abovePromoBar=e)}},{key:"updateDesktopHeaderState",value:function(e){var t=f.getProps().scrollY>this.scrollOffset;e!==this.inversed&&(this.$header.toggleClass("site-header--normal",!e),this.inversed=e),t!==this.scrolled&&(this.$header.toggleClass("site-header--scrolled",t),this.scrolled=t)}},{key:"createMobileHeader",value:function(){if(!this.createdMobileHeader){var e=s()(".site-header--mobile");if(e.length)return this.$mobileHeader=e,void(this.createdMobileHeader=!0);this.$mobileHeader=s()('
'),s()(".c-branding").first().clone().appendTo(this.$mobileHeader),s()(".menu-item--cart").first().clone().appendTo(this.$mobileHeader),this.$mobileHeader.insertAfter(this.$toggle),this.createdMobileHeader=!0}}},{key:"render",value:function(){this.element&&(this.updateMobileNavigationOffset(),this.updateMobileHeaderState(),this.updateDesktopHeaderState(!1))}}]),e}(),b=i(4),y=i.n(b),k=function(){function e(t,i){a()(this,e),this.element=t,this.parent=i.parent||null,this.transitionDuration=i.transitionDuration||.5,this.transitionEasing=i.transitionEasing||Power4.easeOut,this.pieces=this.getPieces(),this.id=s()(t).data("id"),this.cookieName="novablocks-announcement-"+this.id+"-disabled",this.height=0;var n=y.a.get(this.cookieName),o=s()("body").hasClass("logged-in");!n||o?(this.onResize(),f.registerOnResize(this.onResize.bind(this)),this.timeline.play(),this.bindEvents()):s()(t).remove()}return h()(e,[{key:"onResize",value:function(){var e=0,t=!1,i=!1;void 0!==this.timeline&&(e=this.timeline.progress(),t=this.timeline.isActive(),i=this.timeline.reversed(),this.timeline.clear(),this.timeline.kill(),this.pieces.wrapper.css("height","")),this.timeline=this.getTimeline(),this.timeline.progress(e),this.timeline.reversed(i),t&&this.timeline.resume()}},{key:"getPieces",value:function(){var e=s()(this.element);return{element:e,wrapper:e.find(".novablocks-announcement-bar__wrapper"),content:e.find(".novablocks-announcement-bar__content"),close:e.find(".novablocks-announcement-bar__close")}}},{key:"getTimeline",value:function(){var e=this.transitionDuration,t=this.transitionEasing,i=this.pieces,n=i.element,s=i.wrapper,o=(i.content,i.close,new TimelineMax({paused:!0})),a=s.outerHeight();return o.fromTo(n,e,{height:0},{height:a,ease:t},0),o.to({height:0},e,{height:a,onUpdate:this.onHeightUpdate.bind(this),onUpdateParams:["{self}"],ease:t},0),o}},{key:"bindEvents",value:function(){this.pieces.close.on("click",this.onClose.bind(this))}},{key:"onClose",value:function(){void 0!==this.timeline&&this.timeline.reverse()}},{key:"onHeightUpdate",value:function(e){this.height=e.target.height,this.parent&&this.parent.update()}}]),e}(),w=function(){function e(t,i){var n=this;a()(this,e);var s=Array.from(t);this.bars=s.map((function(e){return new k(e,{parent:n,transitionDuration:.5,transitionEasing:Power4.easeInOut})})),this.height=0,this.onUpdate=i.onUpdate,this.update()}return h()(e,[{key:"update",value:function(){var e=0;this.bars.forEach((function(t){e+=t.height})),this.height=e,"function"==typeof this.onUpdate&&this.onUpdate(this)}}]),e}(),C=".menu-item, .page_item",H=".menu-item-has-children, .page_item_has_children",O="hover",_=function(){function e(){a()(this,e),this.$menuItems=s()(C),this.$menuItemsWithChildren=this.$menuItems.filter(H).removeClass(O),this.$menuItemsWithChildrenLinks=this.$menuItemsWithChildren.children("a"),this.initialize()}return h()(e,[{key:"initialize",value:function(){this.onResize(),this.addSocialMenuClass(),this.initialized=!0,f.registerOnResize(this.onResize.bind(this))}},{key:"onResize",value:function(){if(window.matchMedia("only screen and (min-width: 1000px)").matches)return this.addSubMenusLeftClass(),this.initialized&&!this.desktop&&this.unbindClick(),this.initialized&&this.desktop||this.bindHoverIntent(),void(this.desktop=!0);this.removeSubMenusLeftClass(),this.initialized&&this.desktop&&this.unbindHoverIntent(),this.initialized&&!this.desktop||this.bindClick(),this.desktop=!1}},{key:"addSubMenusLeftClass",value:function(){var e=f.getProps().windowWidth;this.$menuItemsWithChildren.each((function(t,i){var n=s()(i),o=n.children(".sub-menu, .children"),a=o.outerWidth(),r=o.offset();e-r.left=o.left&&o.left+o.width>=s.left+s.width/2,r=s.top+s.height/2>=o.top&&o.top+o.height>=s.top+s.height/2,a&&r;var s,o,a,r}));n&&n.render(s)}},{key:"initializeImages",value:function(){var e=this.showLoadedImages.bind(this);e(),f.registerObserverCallback((function(t){s.a.each(t,(function(t,i){s.a.each(i.addedNodes,(function(t,i){("img"===(i.nodeName&&i.nodeName.toLowerCase())||i.childNodes.length)&&e(i)}))}))}))}},{key:"initializeReservationForm",value:function(){f.registerObserverCallback((function(e){s.a.each(e,(function(e,t){s.a.each(t.addedNodes,(function(e,t){var i=s()(t);i.is("#ot-reservation-widget")&&i.closest(".novablocks-opentable").addClass("is-loaded")}))}))}))}},{key:"showLoadedImages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=s()(e).find("img").not("[srcset], .is-loaded, .is-broken");t.imagesLoaded().progress((function(e,t){var i=t.isLoaded?"is-loaded":"is-broken";s()(t.img).addClass(i)}))}},{key:"initializeHero",value:function(){var e=document.getElementsByClassName("novablocks-hero"),t=Array.from(e);this.HeroCollection=t.map((function(e){return new p(e)})),this.firstHero=t[0]}},{key:"initializeCommentsArea",value:function(){var e=s()(".comments-area");e.length&&(this.commentsArea=new m(e.get(0)))}},{key:"initializeHeader",value:function(){var e=s()(".site-header");e.length&&(this.header=new v(e.get(0)))}},{key:"initializeNavbar",value:function(){this.navbar=new _}},{key:"initializePromoBar",value:function(){var e=document.querySelectorAll(".promo-bar .novablocks-announcement-bar");this.promoBar=new w(e,{onUpdate:this.onPromoBarUpdate.bind(this)})}},{key:"onPromoBarUpdate",value:function(e){var t=this.header,i=this.HeroCollection,n=e?e.height:0;t&&(t.offset=n,t.update()),i.forEach((function(e){e.offset=n,e.updateOnScroll()}))}}]),e}();function T(){new x}s()((function(){var e=s()(window);s()("html").is(".wf-active")?T():e.on("wf-active",T)}))}]); \ No newline at end of file +!function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=15)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function i(e,t){for(var i=0;i0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{var t=window.matchMedia&&matchMedia("(pointer:coarse)");if(t&&"(pointer:coarse)"===t.media)e=!!t.matches;else if("orientation"in window)e=!0;else{var i=navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(i)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(i)}}return e},c=function(e,t){var i=jQuery('
').appendTo("body"),n=i.is(":visible");return i.remove(),n},d=i(3),u=i.n(d),f=new(function(){function e(){a()(this,e),this.props={},this.newProps={},this.renderCallbacks=[],this.resizeCallbacks=[],this.observeCallbacks=[],this.scrollCallbacks=[],this.currentMutationList=[],this.frameRendered=!0,this.useOrientation=l()&&"orientation"in window,this._init()}return h()(e,[{key:"_init",value:function(){s()(window);var e=this._updateProps.bind(this),t=this._renderLoop.bind(this);e(),s()(e),this._bindOnResize(),this._bindOnScroll(),this._bindOnLoad(),this._bindObserver(),this._bindCustomizer(),requestAnimationFrame(t)}},{key:"_bindOnResize",value:function(){var e=s()(window),t=this._updateProps.bind(this);this.useOrientation?e.on("orientationchange",(function(){e.one("resize",t)})):e.on("resize",t)}},{key:"_bindOnScroll",value:function(){s()(window).on("scroll",this._updateScroll.bind(this))}},{key:"_bindOnLoad",value:function(){s()(window).on("load",this._updateProps.bind(this))}},{key:"_bindObserver",value:function(){var e,t,i,n=this,s=this._observeCallback.bind(this),o=(e=function(){s(),n.currentMutationList=[]},t=300,i=null,function(){var n=this,s=arguments,o=function(){e.apply(n,s)};clearTimeout(i),i=setTimeout(o,t)});window.MutationObserver&&new MutationObserver((function(e){n.currentMutationList=n.currentMutationList.concat(e),o()})).observe(document.body,{childList:!0,subtree:!0})}},{key:"_bindCustomizer",value:function(){"undefined"!=typeof wp&&void 0!==wp.customize&&(void 0!==wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",this._updateProps.bind(this)),wp.customize.bind("change",this._updateProps.bind(this)))}},{key:"_updateProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._updateSize(e),this._updateScroll(e)}},{key:"_observeCallback",value:function(){var e=this.currentMutationList;s.a.each(this.observeCallbacks,(function(t,i){i(e)}))}},{key:"_renderLoop",value:function(){this.frameRendered||(this._renderCallback(),this.frameRendered=!0),window.requestAnimationFrame(this._renderLoop.bind(this))}},{key:"_renderCallback",value:function(){var e=arguments;s.a.each(this.renderCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_resizeCallback",value:function(){var e=arguments;s.a.each(this.resizeCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_scrollCallback",value:function(){var e=arguments;s.a.each(this.scrollCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_updateScroll",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.newProps=Object.assign({},this.newProps,{scrollY:window.pageYOffset,scrollX:window.pageXOffset}),this._shouldUpdate(this._scrollCallback.bind(this))}},{key:"_updateSize",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=document.body,t=document.documentElement,i=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight),n=Math.max(t.scrollHeight,t.offsetHeight);this.newProps=Object.assign({},this.newProps,{scrollHeight:Math.max(i,n),adminBarHeight:this.getAdminBarHeight(),windowWidth:this.useOrientation&&window.screen&&window.screen.availWidth||window.innerWidth,windowHeight:this.useOrientation&&window.screen&&window.screen.availHeight||window.innerHeight}),this._shouldUpdate(this._resizeCallback.bind(this))}},{key:"_shouldUpdate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(this._hasNewProps()||t)&&(this.props=Object.assign({},this.props,this.newProps),this.newProps={},this.frameRendered=!1,"function"==typeof e&&e())}},{key:"_hasNewProps",value:function(){var e=this;return Object.keys(this.newProps).some((function(t){return e.newProps[t]!==e.props[t]}))}},{key:"getAdminBarHeight",value:function(){var e=document.getElementById("wpadminbar");return e?e.getBoundingClientRect().height:0}},{key:"registerOnResize",value:function(e){"function"==typeof e&&this.resizeCallbacks.indexOf(e)<0&&this.resizeCallbacks.push(e)}},{key:"registerOnScroll",value:function(e){"function"==typeof e&&this.scrollCallbacks.indexOf(e)<0&&this.scrollCallbacks.push(e)}},{key:"registerObserverCallback",value:function(e){"function"==typeof e&&this.observeCallbacks.indexOf(e)<0&&this.observeCallbacks.push(e)}},{key:"registerRender",value:function(e){"function"==typeof e&&this.renderCallbacks.indexOf(e)<0&&this.renderCallbacks.push(e)}},{key:"getProps",value:function(){return this.props}}]),e}()),p=function(){function e(t){var i=this;a()(this,e),this.element=t,this.progress=0,this.timeline=new TimelineMax({paused:!0,onComplete:function(){i.paused=!0}}),this.pieces=this.getMarkupPieces(),this.paused=!1,this.offset=0,this.reduceMotion=!1,this.update(),this.updateOnScroll(),this.init()}return h()(e,[{key:"init",value:function(){var e=this;f.registerOnScroll((function(){e.update()})),f.registerRender((function(){e.updateOnScroll()}));var t=window.matchMedia("(prefers-reduced-motion: reduce)");if(t.addListener((function(){e.reduceMotion=t.matches,e.updateOnScroll()})),this.reduceMotion=t.matches,this.addIntroToTimeline(),this.timeline.addLabel("middle"),this.addOutroToTimeline(),this.timeline.addLabel("end"),this.pauseTimelineOnScroll(),this.reduceMotion){var i=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end");this.paused=!0,this.timeline.progress(i)}else this.timeline.play()}},{key:"update",value:function(){var e=f.getProps().scrollY;this.box=this.element.getBoundingClientRect(),this.view={left:this.box.left,top:this.box.top+e,width:this.box.width,height:this.box.height}}},{key:"updateOnScroll",value:function(){var e=f.getProps(),t=e.scrollY,i=e.scrollHeight,n=e.windowHeight,s=.5*n,o=i-n-.5*s,a=this.view.top+.5*(this.box.height-n),r=Math.max(0,Math.min(a,o));if(this.start=r-.5*s,this.end=this.start+s,this.progress=(t-this.start)/(this.end-this.start),this.reduceMotion){var h=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end");this.progress=h}this.updateTimelineOnScroll()}},{key:"updateTimelineOnScroll",value:function(){if(this.paused){var e=this.timeline.progress(),t=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end"),i=2*(this.progress-.5)*(1-t)+t;e!==(i=Math.min(Math.max(t,i),1))&&this.timeline.progress(i)}}},{key:"getMarkupPieces",value:function(){var e=jQuery(this.element).find(".novablocks-hero__inner-container"),t=e.children().filter(".c-headline").first(),i=t.find(".c-headline__primary"),n=t.find(".c-headline__secondary"),s=t.next(".wp-block-separator"),o=s.find(".c-separator__symbol"),a=s.find(".c-separator__line"),r=s.find(".c-separator__arrow"),h=t.prevAll(),l=t.length?t.nextAll().not(s):e.children();return{headline:t,title:i,subtitle:n,separator:s,sepFlower:o,sepLine:a,sepArrow:r,othersBefore:h,othersAfter:l}}},{key:"addIntroToTimeline",value:function(){var e=this.timeline,t=f.getProps().windowWidth,i=this.pieces,n=i.headline,s=i.title,o=i.subtitle,a=i.separator,r=i.sepFlower,h=i.sepLine,l=i.sepArrow,c=i.othersBefore,d=i.othersAfter;s.length&&s.text().trim().length&&(this.splitTitle=new SplitText(s,{wordsClass:"c-headline__word"}),this.splitTitle.lines.forEach((function(i){var n=Array.from(i.children),s=[];n.forEach((function(e){s.push.apply(s,u()(e.children))})),s.forEach((function(i){var n=i.getBoundingClientRect(),o=(i.offsetWidth,2*(n.x-t/2)/t),a=400*s.length*o;e.from(i,.72,{x:a,ease:Expo.easeOut},0)}))})),e.fromTo(s,.89,{opacity:0},{opacity:1,ease:Expo.easeOut},0),e.fromTo(n,1,{y:30},{y:0,ease:Expo.easeOut},0)),o.length&&(e.fromTo(o,.65,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.65"),e.fromTo(o,.9,{y:30},{y:0,ease:Quint.easeOut},"-=0.65")),a.length&&(r.length&&(e.fromTo(r,.15,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.6"),e.fromTo(r,.55,{rotation:-270},{rotation:0,ease:Back.easeOut},"-=0.5")),h.length&&(e.fromTo(h,.6,{width:0},{width:"42%",opacity:1,ease:Quint.easeOut},"-=0.55"),e.fromTo(a,.6,{width:0},{width:"100%",opacity:1,ease:Quint.easeOut},"-=0.6")),l.length&&e.fromTo(l,.2,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.27")),d.length&&(e.fromTo(d,.5,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.28"),e.fromTo(d,.75,{y:-20},{y:0},"-=0.5")),c.length&&(e.fromTo(c,.5,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.75"),e.fromTo(c,.75,{y:20},{y:0},"-=0.75")),this.timeline=e}},{key:"addOutroToTimeline",value:function(){var e=this.pieces,t=e.title,i=e.subtitle,n=e.othersBefore,s=e.othersAfter,o=e.separator,a=e.sepLine,r=e.sepFlower,h=e.sepArrow,l=this.timeline;l.fromTo(t,1.08,{y:0},{opacity:0,y:-60,ease:Quad.easeIn},"middle"),l.to(i,1.08,{opacity:0,y:-90,ease:Quad.easeIn},"middle"),l.to(n,1.08,{y:60,opacity:0,ease:Quad.easeIn},"middle"),l.to(s,1.08,{y:60,opacity:0,ease:Quad.easeIn},"middle"),l.to(a,.86,{width:"0%",opacity:0,ease:Quad.easeIn},"-=0.94"),l.to(o,.86,{width:"0%",opacity:0,ease:Quad.easeIn},"-=0.86"),l.to(r,1,{rotation:180},"-=1.08"),l.to(r,.11,{opacity:0},"-=0.03"),l.to(h,.14,{opacity:0},"-=1.08"),this.timeline=l}},{key:"revertTitle",value:function(){void 0!==this.splitTitle&&this.splitTitle.revert()}},{key:"pauseTimelineOnScroll",value:function(){var e=this,t=this.timeline.getLabelTime("middle"),i=this.timeline.getLabelTime("end");this.timeline.eventCallback("onUpdate",(function(n){var s=n.time(),o=s>t,a=.5*((s-t)/(i-t))+.5>=e.progress;o&&a&&(n.pause(),e.revertTitle(),e.timeline.eventCallback("onUpdate",null),e.paused=!0)}),["{self}"])}}]),e}(),m=function(){function e(t){a()(this,e),this.$element=s()(t),this.$checkbox=this.$element.find(".c-comments-toggle__checkbox"),this.$content=this.$element.find(".comments-area__content"),this.$contentWrap=this.$element.find(".comments-area__wrap"),this.$contentWrap.css("display","block"),this.$checkbox.on("change",this.onChange.bind(this)),this.checkWindowLocationComments()}return h()(e,[{key:"onChange",value:function(){this.toggle(!1)}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.$contentWrap,i=this.$checkbox.prop("checked"),n=i?this.$content.outerHeight():0;e?t.css("height",n):TweenMax.to(t,.4,{height:n,onComplete:function(){i&&t.css("height","")}})}},{key:"checkWindowLocationComments",value:function(){-1===window.location.href.indexOf("#comment")&&(this.$checkbox.prop("checked",!1),this.toggle(!0))}}]),e}(),g={offsetTargetElement:null},v=function(){function e(t,i){a()(this,e),t&&(this.element=t,this.options=Object.assign({},g,i),this.$header=s()(this.element),this.$toggle=s()(".c-menu-toggle"),this.$toggleWrap=s()(".c-menu-toggle__wrap"),this.scrolled=!1,this.inversed=!1,this.abovePromoBar=!1,this.wasSticky=s()("body").is(".has-site-header-fixed"),this.offset=0,this.scrollOffset=0,this.mobileHeaderHeight=0,this.promoBarHeight=0,this.$page=s()("#page .site-content"),this.$hero=s()(".has-hero .novablocks-hero").first().find(".novablocks-hero__foreground"),this.$promoBar=s()(".novablocks-announcement-bar"),this.createMobileHeader(),this.onResize(),this.render(),f.registerOnResize(this.onResize.bind(this)),this.initialize())}return h()(e,[{key:"initialize",value:function(){this.timeline=this.getInroTimeline(),s()(".site-header__wrapper").css("transition","none"),this.$header.addClass("site-header--fixed site-header--ready"),this.$mobileHeader.addClass("site-header--fixed site-header--ready"),this.timeline.play()}},{key:"update",value:function(){this.updatePageOffset(),this.updateHeaderOffset(),this.updateMobileHeaderOffset()}},{key:"getInroTimeline",value:function(){var e=this.element,t=new TimelineMax({paused:!0}),i=s()(e).outerHeight(),n=Power4.easeInOut;return t.to(e,.5,{opacity:1,ease:n},0),t.to({height:0},.5,{height:i,onUpdate:this.onHeightUpdate.bind(this),onUpdateParams:["{self}"],onComplete:function(){s()(".site-header__wrapper").css("transition","")},ease:n},0),t}},{key:"onHeightUpdate",value:function(e){this.getProps(),this.box=Object.assign(this.box,{height:e.target.height}),this.setVisibleHeaderHeight(),this.update()}},{key:"getMobileHeaderHeight",value:function(){var e=this.$mobileHeader.css("height","").outerHeight(),t=this.$toggleWrap.css("height","").outerHeight();return Math.max(e,t)}},{key:"isMobileHeaderVisibile",value:function(){return this.$mobileHeader.is(":visible")}},{key:"setVisibleHeaderHeight",value:function(){this.visibleHeaderHeight=this.isMobileHeaderVisibile()?this.mobileHeaderHeight:this.box.height}},{key:"getProps",value:function(){this.box=this.element.getBoundingClientRect(),this.scrollOffset=this.getScrollOffset(),this.mobileHeaderHeight=this.getMobileHeaderHeight(),this.$promoBar.length&&(this.promoBarHeight=this.$promoBar.outerHeight())}},{key:"onResize",value:function(){var e=s()(this.element),t=e.hasClass("site-header--scrolled");e.css("transition","none"),e.removeClass("site-header--scrolled"),this.getProps(),this.setVisibleHeaderHeight(),this.shouldMakeHeaderStatic(),e.toggleClass("site-header--scrolled",t),window.requestIdleCallback?requestIdleCallback((function(){e.css("transition","")})):setTimeout((function(){e.css("transition","")}),0),this.update()}},{key:"shouldMakeHeaderStatic",value:function(){var e=s()("body"),t=f.getProps().windowHeight;this.wasSticky&&e.toggleClass("has-site-header-fixed",this.visibleHeaderHeight<.2*t)}},{key:"updateHeaderOffset",value:function(){this.element&&(this.element.style.marginTop=this.offset+"px")}},{key:"updateMobileHeaderOffset",value:function(){this.$mobileHeader&&(this.$mobileHeader.css({height:this.mobileHeaderHeight}),TweenMax.to(this.$mobileHeader,.2,{y:this.offset}),s()(".site-header__inner-container").css({transform:"translateY(".concat(this.mobileHeaderHeight,"px)")}),this.$toggleWrap.css({height:this.mobileHeaderHeight}),TweenMax.to(this.$toggleWrap,.2,{y:this.offset}))}},{key:"getScrollOffset",value:function(){var e=f.getProps(),t=e.adminBarHeight,i=e.scrollY,n=this.options.offsetTargetElement;if(n){var s=n.getBoundingClientRect();return s.top+i+s.height-(t+this.offset+this.box.height/2)}return 0}},{key:"updatePageOffset",value:function(){TweenMax.set(this.$page,{css:{marginTop:this.visibleHeaderHeight+this.offset}})}},{key:"updateMobileNavigationOffset",value:function(){var e=f.getProps().scrollY;c("below","lap")&&(this.element.style.marginTop=Math.max(this.promoBarHeight-e,0)+"px")}},{key:"updateMobileHeaderState",value:function(){var e=f.getProps().scrollY>this.promoBarHeight;e!==this.abovePromoBar&&(s()(body).toggleClass("site-header-mobile--scrolled",e),this.abovePromoBar=e)}},{key:"updateDesktopHeaderState",value:function(e){var t=f.getProps().scrollY>this.scrollOffset;e!==this.inversed&&(this.$header.toggleClass("site-header--normal",!e),this.inversed=e),t!==this.scrolled&&(this.$header.toggleClass("site-header--scrolled",t),this.scrolled=t)}},{key:"createMobileHeader",value:function(){if(!this.createdMobileHeader){var e=s()(".site-header--mobile");if(e.length)return this.$mobileHeader=e,void(this.createdMobileHeader=!0);this.$mobileHeader=s()('
'),s()(".c-branding").first().clone().appendTo(this.$mobileHeader),s()(".menu-item--cart").first().clone().appendTo(this.$mobileHeader),this.$mobileHeader.insertAfter(this.$toggle),this.createdMobileHeader=!0}}},{key:"render",value:function(){this.element&&(window.document.body.style.setProperty("--site-header-height",this.visibleHeaderHeight+this.promoBarHeight+"px"),this.updateMobileNavigationOffset(),this.updateMobileHeaderState(),this.updateDesktopHeaderState(!1))}}]),e}(),b=i(4),y=i.n(b),k=function(){function e(t,i){a()(this,e),this.element=t,this.parent=i.parent||null,this.transitionDuration=i.transitionDuration||.5,this.transitionEasing=i.transitionEasing||Power4.easeOut,this.pieces=this.getPieces(),this.id=s()(t).data("id"),this.cookieName="novablocks-announcement-"+this.id+"-disabled",this.height=0;var n=y.a.get(this.cookieName),o=s()("body").hasClass("logged-in");!n||o?(this.onResize(),f.registerOnResize(this.onResize.bind(this)),this.timeline.play(),this.bindEvents()):s()(t).remove()}return h()(e,[{key:"onResize",value:function(){var e=0,t=!1,i=!1;void 0!==this.timeline&&(e=this.timeline.progress(),t=this.timeline.isActive(),i=this.timeline.reversed(),this.timeline.clear(),this.timeline.kill(),this.pieces.wrapper.css("height","")),this.timeline=this.getTimeline(),this.timeline.progress(e),this.timeline.reversed(i),t&&this.timeline.resume()}},{key:"getPieces",value:function(){var e=s()(this.element);return{element:e,wrapper:e.find(".novablocks-announcement-bar__wrapper"),content:e.find(".novablocks-announcement-bar__content"),close:e.find(".novablocks-announcement-bar__close")}}},{key:"getTimeline",value:function(){var e=this.transitionDuration,t=this.transitionEasing,i=this.pieces,n=i.element,s=i.wrapper,o=(i.content,i.close,new TimelineMax({paused:!0})),a=s.outerHeight();return o.fromTo(n,e,{height:0},{height:a,ease:t},0),o.to({height:0},e,{height:a,onUpdate:this.onHeightUpdate.bind(this),onUpdateParams:["{self}"],ease:t},0),o}},{key:"bindEvents",value:function(){this.pieces.close.on("click",this.onClose.bind(this))}},{key:"onClose",value:function(){void 0!==this.timeline&&this.timeline.reverse()}},{key:"onHeightUpdate",value:function(e){this.height=e.target.height,this.parent&&this.parent.update()}}]),e}(),w=function(){function e(t,i){var n=this;a()(this,e);var s=Array.from(t);this.bars=s.map((function(e){return new k(e,{parent:n,transitionDuration:.5,transitionEasing:Power4.easeInOut})})),this.height=0,this.onUpdate=i.onUpdate,this.update()}return h()(e,[{key:"update",value:function(){var e=0;this.bars.forEach((function(t){e+=t.height})),this.height=e,"function"==typeof this.onUpdate&&this.onUpdate(this)}}]),e}(),C=".menu-item, .page_item",H=".menu-item-has-children, .page_item_has_children",O="hover",_=function(){function e(){a()(this,e),this.$menuItems=s()(C),this.$menuItemsWithChildren=this.$menuItems.filter(H).removeClass(O),this.$menuItemsWithChildrenLinks=this.$menuItemsWithChildren.children("a"),this.initialize()}return h()(e,[{key:"initialize",value:function(){this.onResize(),this.addSocialMenuClass(),this.initialized=!0,f.registerOnResize(this.onResize.bind(this))}},{key:"onResize",value:function(){if(window.matchMedia("only screen and (min-width: 1000px)").matches)return this.addSubMenusLeftClass(),this.initialized&&!this.desktop&&this.unbindClick(),this.initialized&&this.desktop||this.bindHoverIntent(),void(this.desktop=!0);this.removeSubMenusLeftClass(),this.initialized&&this.desktop&&this.unbindHoverIntent(),this.initialized&&!this.desktop||this.bindClick(),this.desktop=!1}},{key:"addSubMenusLeftClass",value:function(){var e=f.getProps().windowWidth;this.$menuItemsWithChildren.each((function(t,i){var n=s()(i),o=n.children(".sub-menu, .children"),a=o.outerWidth(),r=o.offset();e-r.left=o.left&&o.left+o.width>=s.left+s.width/2,r=s.top+s.height/2>=o.top&&o.top+o.height>=s.top+s.height/2,a&&r;var s,o,a,r}));n&&n.render(s)}},{key:"initializeImages",value:function(){var e=this.showLoadedImages.bind(this);e(),f.registerObserverCallback((function(t){s.a.each(t,(function(t,i){s.a.each(i.addedNodes,(function(t,i){("img"===(i.nodeName&&i.nodeName.toLowerCase())||i.childNodes.length)&&e(i)}))}))}))}},{key:"initializeReservationForm",value:function(){f.registerObserverCallback((function(e){s.a.each(e,(function(e,t){s.a.each(t.addedNodes,(function(e,t){var i=s()(t);i.is("#ot-reservation-widget")&&i.closest(".novablocks-opentable").addClass("is-loaded")}))}))}))}},{key:"showLoadedImages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=s()(e).find("img").not("[srcset], .is-loaded, .is-broken");t.imagesLoaded().progress((function(e,t){var i=t.isLoaded?"is-loaded":"is-broken";s()(t.img).addClass(i)}))}},{key:"initializeHero",value:function(){var e=document.getElementsByClassName("novablocks-hero"),t=Array.from(e);this.HeroCollection=t.map((function(e){return new p(e)})),this.firstHero=t[0]}},{key:"initializeCommentsArea",value:function(){var e=s()(".comments-area");e.length&&(this.commentsArea=new m(e.get(0)))}},{key:"initializeHeader",value:function(){var e=s()(".site-header");e.length&&(this.header=new v(e.get(0)))}},{key:"initializeNavbar",value:function(){this.navbar=new _}},{key:"initializePromoBar",value:function(){var e=document.querySelectorAll(".promo-bar .novablocks-announcement-bar");this.promoBar=new w(e,{onUpdate:this.onPromoBarUpdate.bind(this)})}},{key:"onPromoBarUpdate",value:function(e){var t=this.header,i=this.HeroCollection,n=e?e.height:0;t&&(t.offset=n,t.update()),i.forEach((function(e){e.offset=n,e.updateOnScroll()}))}}]),e}();function T(){new x}s()((function(){var e=s()(window);s()("html").is(".wf-active")?T():e.on("wf-active",T)}))}]); \ No newline at end of file diff --git a/src/js/components/header.js b/src/js/components/header.js index 1c170e41..d946a181 100644 --- a/src/js/components/header.js +++ b/src/js/components/header.js @@ -246,6 +246,8 @@ class Header { render() { if ( ! this.element ) return; + window.document.body.style.setProperty( '--site-header-height', this.visibleHeaderHeight + this.promoBarHeight + 'px' ); + this.updateMobileNavigationOffset(); this.updateMobileHeaderState(); this.updateDesktopHeaderState(false); diff --git a/src/scss/blocks/nova-blocks/_style.scss b/src/scss/blocks/nova-blocks/_style.scss index 677ec036..3b12ebe3 100644 --- a/src/scss/blocks/nova-blocks/_style.scss +++ b/src/scss/blocks/nova-blocks/_style.scss @@ -51,6 +51,10 @@ } } +.novablocks-grid__column:first-child .novablocks-grid__area:first-child:last-child { + top: calc( var(--novablocks-grid-spacing) * var(--novablocks-grid-spacing-modifier, 1) + var(--site-header-height, 0) ); +} + // Nova - Food Menu @import "food-menu/style"; diff --git a/src/scss/theme/pages/_single.scss b/src/scss/theme/pages/_single.scss index 97d81939..8ace12b5 100644 --- a/src/scss/theme/pages/_single.scss +++ b/src/scss/theme/pages/_single.scss @@ -18,7 +18,6 @@ .site-content { padding-bottom: var(--theme-spacing-fluid-large); - overflow: hidden; } } From 3a86884c18c26ccc86d3da02f34c164c7478b7cf Mon Sep 17 00:00:00 2001 From: Razvan Date: Fri, 11 Sep 2020 16:16:08 +0300 Subject: [PATCH 5/5] Fix typo and take header height ratio into consideration when posts collection grid areas become sticky --- dist/js/scripts.js | 2 +- dist/js/scripts.min.js | 2 +- src/js/components/header.js | 2 +- src/scss/components/site-header/_theme.scss | 2 +- style-rtl.css | 2 +- style.css | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/js/scripts.js b/dist/js/scripts.js index f56b31b1..ec00a779 100644 --- a/dist/js/scripts.js +++ b/dist/js/scripts.js @@ -1439,7 +1439,7 @@ function () { key: "render", value: function render() { if (!this.element) return; - window.document.body.style.setProperty('--site-header-height', this.visibleHeaderHeight + this.promoBarHeight + 'px'); + window.document.body.style.setProperty('--site-header-height', this.visibleHeaderHeight * 0.75 + this.promoBarHeight + 'px'); this.updateMobileNavigationOffset(); this.updateMobileHeaderState(); this.updateDesktopHeaderState(false); diff --git a/dist/js/scripts.min.js b/dist/js/scripts.min.js index 839af144..345b1d16 100644 --- a/dist/js/scripts.min.js +++ b/dist/js/scripts.min.js @@ -1,2 +1,2 @@ /*! For license information please see scripts.min.js.LICENSE */ -!function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=15)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function i(e,t){for(var i=0;i0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{var t=window.matchMedia&&matchMedia("(pointer:coarse)");if(t&&"(pointer:coarse)"===t.media)e=!!t.matches;else if("orientation"in window)e=!0;else{var i=navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(i)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(i)}}return e},c=function(e,t){var i=jQuery('
').appendTo("body"),n=i.is(":visible");return i.remove(),n},d=i(3),u=i.n(d),f=new(function(){function e(){a()(this,e),this.props={},this.newProps={},this.renderCallbacks=[],this.resizeCallbacks=[],this.observeCallbacks=[],this.scrollCallbacks=[],this.currentMutationList=[],this.frameRendered=!0,this.useOrientation=l()&&"orientation"in window,this._init()}return h()(e,[{key:"_init",value:function(){s()(window);var e=this._updateProps.bind(this),t=this._renderLoop.bind(this);e(),s()(e),this._bindOnResize(),this._bindOnScroll(),this._bindOnLoad(),this._bindObserver(),this._bindCustomizer(),requestAnimationFrame(t)}},{key:"_bindOnResize",value:function(){var e=s()(window),t=this._updateProps.bind(this);this.useOrientation?e.on("orientationchange",(function(){e.one("resize",t)})):e.on("resize",t)}},{key:"_bindOnScroll",value:function(){s()(window).on("scroll",this._updateScroll.bind(this))}},{key:"_bindOnLoad",value:function(){s()(window).on("load",this._updateProps.bind(this))}},{key:"_bindObserver",value:function(){var e,t,i,n=this,s=this._observeCallback.bind(this),o=(e=function(){s(),n.currentMutationList=[]},t=300,i=null,function(){var n=this,s=arguments,o=function(){e.apply(n,s)};clearTimeout(i),i=setTimeout(o,t)});window.MutationObserver&&new MutationObserver((function(e){n.currentMutationList=n.currentMutationList.concat(e),o()})).observe(document.body,{childList:!0,subtree:!0})}},{key:"_bindCustomizer",value:function(){"undefined"!=typeof wp&&void 0!==wp.customize&&(void 0!==wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",this._updateProps.bind(this)),wp.customize.bind("change",this._updateProps.bind(this)))}},{key:"_updateProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._updateSize(e),this._updateScroll(e)}},{key:"_observeCallback",value:function(){var e=this.currentMutationList;s.a.each(this.observeCallbacks,(function(t,i){i(e)}))}},{key:"_renderLoop",value:function(){this.frameRendered||(this._renderCallback(),this.frameRendered=!0),window.requestAnimationFrame(this._renderLoop.bind(this))}},{key:"_renderCallback",value:function(){var e=arguments;s.a.each(this.renderCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_resizeCallback",value:function(){var e=arguments;s.a.each(this.resizeCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_scrollCallback",value:function(){var e=arguments;s.a.each(this.scrollCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_updateScroll",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.newProps=Object.assign({},this.newProps,{scrollY:window.pageYOffset,scrollX:window.pageXOffset}),this._shouldUpdate(this._scrollCallback.bind(this))}},{key:"_updateSize",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=document.body,t=document.documentElement,i=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight),n=Math.max(t.scrollHeight,t.offsetHeight);this.newProps=Object.assign({},this.newProps,{scrollHeight:Math.max(i,n),adminBarHeight:this.getAdminBarHeight(),windowWidth:this.useOrientation&&window.screen&&window.screen.availWidth||window.innerWidth,windowHeight:this.useOrientation&&window.screen&&window.screen.availHeight||window.innerHeight}),this._shouldUpdate(this._resizeCallback.bind(this))}},{key:"_shouldUpdate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(this._hasNewProps()||t)&&(this.props=Object.assign({},this.props,this.newProps),this.newProps={},this.frameRendered=!1,"function"==typeof e&&e())}},{key:"_hasNewProps",value:function(){var e=this;return Object.keys(this.newProps).some((function(t){return e.newProps[t]!==e.props[t]}))}},{key:"getAdminBarHeight",value:function(){var e=document.getElementById("wpadminbar");return e?e.getBoundingClientRect().height:0}},{key:"registerOnResize",value:function(e){"function"==typeof e&&this.resizeCallbacks.indexOf(e)<0&&this.resizeCallbacks.push(e)}},{key:"registerOnScroll",value:function(e){"function"==typeof e&&this.scrollCallbacks.indexOf(e)<0&&this.scrollCallbacks.push(e)}},{key:"registerObserverCallback",value:function(e){"function"==typeof e&&this.observeCallbacks.indexOf(e)<0&&this.observeCallbacks.push(e)}},{key:"registerRender",value:function(e){"function"==typeof e&&this.renderCallbacks.indexOf(e)<0&&this.renderCallbacks.push(e)}},{key:"getProps",value:function(){return this.props}}]),e}()),p=function(){function e(t){var i=this;a()(this,e),this.element=t,this.progress=0,this.timeline=new TimelineMax({paused:!0,onComplete:function(){i.paused=!0}}),this.pieces=this.getMarkupPieces(),this.paused=!1,this.offset=0,this.reduceMotion=!1,this.update(),this.updateOnScroll(),this.init()}return h()(e,[{key:"init",value:function(){var e=this;f.registerOnScroll((function(){e.update()})),f.registerRender((function(){e.updateOnScroll()}));var t=window.matchMedia("(prefers-reduced-motion: reduce)");if(t.addListener((function(){e.reduceMotion=t.matches,e.updateOnScroll()})),this.reduceMotion=t.matches,this.addIntroToTimeline(),this.timeline.addLabel("middle"),this.addOutroToTimeline(),this.timeline.addLabel("end"),this.pauseTimelineOnScroll(),this.reduceMotion){var i=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end");this.paused=!0,this.timeline.progress(i)}else this.timeline.play()}},{key:"update",value:function(){var e=f.getProps().scrollY;this.box=this.element.getBoundingClientRect(),this.view={left:this.box.left,top:this.box.top+e,width:this.box.width,height:this.box.height}}},{key:"updateOnScroll",value:function(){var e=f.getProps(),t=e.scrollY,i=e.scrollHeight,n=e.windowHeight,s=.5*n,o=i-n-.5*s,a=this.view.top+.5*(this.box.height-n),r=Math.max(0,Math.min(a,o));if(this.start=r-.5*s,this.end=this.start+s,this.progress=(t-this.start)/(this.end-this.start),this.reduceMotion){var h=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end");this.progress=h}this.updateTimelineOnScroll()}},{key:"updateTimelineOnScroll",value:function(){if(this.paused){var e=this.timeline.progress(),t=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end"),i=2*(this.progress-.5)*(1-t)+t;e!==(i=Math.min(Math.max(t,i),1))&&this.timeline.progress(i)}}},{key:"getMarkupPieces",value:function(){var e=jQuery(this.element).find(".novablocks-hero__inner-container"),t=e.children().filter(".c-headline").first(),i=t.find(".c-headline__primary"),n=t.find(".c-headline__secondary"),s=t.next(".wp-block-separator"),o=s.find(".c-separator__symbol"),a=s.find(".c-separator__line"),r=s.find(".c-separator__arrow"),h=t.prevAll(),l=t.length?t.nextAll().not(s):e.children();return{headline:t,title:i,subtitle:n,separator:s,sepFlower:o,sepLine:a,sepArrow:r,othersBefore:h,othersAfter:l}}},{key:"addIntroToTimeline",value:function(){var e=this.timeline,t=f.getProps().windowWidth,i=this.pieces,n=i.headline,s=i.title,o=i.subtitle,a=i.separator,r=i.sepFlower,h=i.sepLine,l=i.sepArrow,c=i.othersBefore,d=i.othersAfter;s.length&&s.text().trim().length&&(this.splitTitle=new SplitText(s,{wordsClass:"c-headline__word"}),this.splitTitle.lines.forEach((function(i){var n=Array.from(i.children),s=[];n.forEach((function(e){s.push.apply(s,u()(e.children))})),s.forEach((function(i){var n=i.getBoundingClientRect(),o=(i.offsetWidth,2*(n.x-t/2)/t),a=400*s.length*o;e.from(i,.72,{x:a,ease:Expo.easeOut},0)}))})),e.fromTo(s,.89,{opacity:0},{opacity:1,ease:Expo.easeOut},0),e.fromTo(n,1,{y:30},{y:0,ease:Expo.easeOut},0)),o.length&&(e.fromTo(o,.65,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.65"),e.fromTo(o,.9,{y:30},{y:0,ease:Quint.easeOut},"-=0.65")),a.length&&(r.length&&(e.fromTo(r,.15,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.6"),e.fromTo(r,.55,{rotation:-270},{rotation:0,ease:Back.easeOut},"-=0.5")),h.length&&(e.fromTo(h,.6,{width:0},{width:"42%",opacity:1,ease:Quint.easeOut},"-=0.55"),e.fromTo(a,.6,{width:0},{width:"100%",opacity:1,ease:Quint.easeOut},"-=0.6")),l.length&&e.fromTo(l,.2,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.27")),d.length&&(e.fromTo(d,.5,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.28"),e.fromTo(d,.75,{y:-20},{y:0},"-=0.5")),c.length&&(e.fromTo(c,.5,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.75"),e.fromTo(c,.75,{y:20},{y:0},"-=0.75")),this.timeline=e}},{key:"addOutroToTimeline",value:function(){var e=this.pieces,t=e.title,i=e.subtitle,n=e.othersBefore,s=e.othersAfter,o=e.separator,a=e.sepLine,r=e.sepFlower,h=e.sepArrow,l=this.timeline;l.fromTo(t,1.08,{y:0},{opacity:0,y:-60,ease:Quad.easeIn},"middle"),l.to(i,1.08,{opacity:0,y:-90,ease:Quad.easeIn},"middle"),l.to(n,1.08,{y:60,opacity:0,ease:Quad.easeIn},"middle"),l.to(s,1.08,{y:60,opacity:0,ease:Quad.easeIn},"middle"),l.to(a,.86,{width:"0%",opacity:0,ease:Quad.easeIn},"-=0.94"),l.to(o,.86,{width:"0%",opacity:0,ease:Quad.easeIn},"-=0.86"),l.to(r,1,{rotation:180},"-=1.08"),l.to(r,.11,{opacity:0},"-=0.03"),l.to(h,.14,{opacity:0},"-=1.08"),this.timeline=l}},{key:"revertTitle",value:function(){void 0!==this.splitTitle&&this.splitTitle.revert()}},{key:"pauseTimelineOnScroll",value:function(){var e=this,t=this.timeline.getLabelTime("middle"),i=this.timeline.getLabelTime("end");this.timeline.eventCallback("onUpdate",(function(n){var s=n.time(),o=s>t,a=.5*((s-t)/(i-t))+.5>=e.progress;o&&a&&(n.pause(),e.revertTitle(),e.timeline.eventCallback("onUpdate",null),e.paused=!0)}),["{self}"])}}]),e}(),m=function(){function e(t){a()(this,e),this.$element=s()(t),this.$checkbox=this.$element.find(".c-comments-toggle__checkbox"),this.$content=this.$element.find(".comments-area__content"),this.$contentWrap=this.$element.find(".comments-area__wrap"),this.$contentWrap.css("display","block"),this.$checkbox.on("change",this.onChange.bind(this)),this.checkWindowLocationComments()}return h()(e,[{key:"onChange",value:function(){this.toggle(!1)}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.$contentWrap,i=this.$checkbox.prop("checked"),n=i?this.$content.outerHeight():0;e?t.css("height",n):TweenMax.to(t,.4,{height:n,onComplete:function(){i&&t.css("height","")}})}},{key:"checkWindowLocationComments",value:function(){-1===window.location.href.indexOf("#comment")&&(this.$checkbox.prop("checked",!1),this.toggle(!0))}}]),e}(),g={offsetTargetElement:null},v=function(){function e(t,i){a()(this,e),t&&(this.element=t,this.options=Object.assign({},g,i),this.$header=s()(this.element),this.$toggle=s()(".c-menu-toggle"),this.$toggleWrap=s()(".c-menu-toggle__wrap"),this.scrolled=!1,this.inversed=!1,this.abovePromoBar=!1,this.wasSticky=s()("body").is(".has-site-header-fixed"),this.offset=0,this.scrollOffset=0,this.mobileHeaderHeight=0,this.promoBarHeight=0,this.$page=s()("#page .site-content"),this.$hero=s()(".has-hero .novablocks-hero").first().find(".novablocks-hero__foreground"),this.$promoBar=s()(".novablocks-announcement-bar"),this.createMobileHeader(),this.onResize(),this.render(),f.registerOnResize(this.onResize.bind(this)),this.initialize())}return h()(e,[{key:"initialize",value:function(){this.timeline=this.getInroTimeline(),s()(".site-header__wrapper").css("transition","none"),this.$header.addClass("site-header--fixed site-header--ready"),this.$mobileHeader.addClass("site-header--fixed site-header--ready"),this.timeline.play()}},{key:"update",value:function(){this.updatePageOffset(),this.updateHeaderOffset(),this.updateMobileHeaderOffset()}},{key:"getInroTimeline",value:function(){var e=this.element,t=new TimelineMax({paused:!0}),i=s()(e).outerHeight(),n=Power4.easeInOut;return t.to(e,.5,{opacity:1,ease:n},0),t.to({height:0},.5,{height:i,onUpdate:this.onHeightUpdate.bind(this),onUpdateParams:["{self}"],onComplete:function(){s()(".site-header__wrapper").css("transition","")},ease:n},0),t}},{key:"onHeightUpdate",value:function(e){this.getProps(),this.box=Object.assign(this.box,{height:e.target.height}),this.setVisibleHeaderHeight(),this.update()}},{key:"getMobileHeaderHeight",value:function(){var e=this.$mobileHeader.css("height","").outerHeight(),t=this.$toggleWrap.css("height","").outerHeight();return Math.max(e,t)}},{key:"isMobileHeaderVisibile",value:function(){return this.$mobileHeader.is(":visible")}},{key:"setVisibleHeaderHeight",value:function(){this.visibleHeaderHeight=this.isMobileHeaderVisibile()?this.mobileHeaderHeight:this.box.height}},{key:"getProps",value:function(){this.box=this.element.getBoundingClientRect(),this.scrollOffset=this.getScrollOffset(),this.mobileHeaderHeight=this.getMobileHeaderHeight(),this.$promoBar.length&&(this.promoBarHeight=this.$promoBar.outerHeight())}},{key:"onResize",value:function(){var e=s()(this.element),t=e.hasClass("site-header--scrolled");e.css("transition","none"),e.removeClass("site-header--scrolled"),this.getProps(),this.setVisibleHeaderHeight(),this.shouldMakeHeaderStatic(),e.toggleClass("site-header--scrolled",t),window.requestIdleCallback?requestIdleCallback((function(){e.css("transition","")})):setTimeout((function(){e.css("transition","")}),0),this.update()}},{key:"shouldMakeHeaderStatic",value:function(){var e=s()("body"),t=f.getProps().windowHeight;this.wasSticky&&e.toggleClass("has-site-header-fixed",this.visibleHeaderHeight<.2*t)}},{key:"updateHeaderOffset",value:function(){this.element&&(this.element.style.marginTop=this.offset+"px")}},{key:"updateMobileHeaderOffset",value:function(){this.$mobileHeader&&(this.$mobileHeader.css({height:this.mobileHeaderHeight}),TweenMax.to(this.$mobileHeader,.2,{y:this.offset}),s()(".site-header__inner-container").css({transform:"translateY(".concat(this.mobileHeaderHeight,"px)")}),this.$toggleWrap.css({height:this.mobileHeaderHeight}),TweenMax.to(this.$toggleWrap,.2,{y:this.offset}))}},{key:"getScrollOffset",value:function(){var e=f.getProps(),t=e.adminBarHeight,i=e.scrollY,n=this.options.offsetTargetElement;if(n){var s=n.getBoundingClientRect();return s.top+i+s.height-(t+this.offset+this.box.height/2)}return 0}},{key:"updatePageOffset",value:function(){TweenMax.set(this.$page,{css:{marginTop:this.visibleHeaderHeight+this.offset}})}},{key:"updateMobileNavigationOffset",value:function(){var e=f.getProps().scrollY;c("below","lap")&&(this.element.style.marginTop=Math.max(this.promoBarHeight-e,0)+"px")}},{key:"updateMobileHeaderState",value:function(){var e=f.getProps().scrollY>this.promoBarHeight;e!==this.abovePromoBar&&(s()(body).toggleClass("site-header-mobile--scrolled",e),this.abovePromoBar=e)}},{key:"updateDesktopHeaderState",value:function(e){var t=f.getProps().scrollY>this.scrollOffset;e!==this.inversed&&(this.$header.toggleClass("site-header--normal",!e),this.inversed=e),t!==this.scrolled&&(this.$header.toggleClass("site-header--scrolled",t),this.scrolled=t)}},{key:"createMobileHeader",value:function(){if(!this.createdMobileHeader){var e=s()(".site-header--mobile");if(e.length)return this.$mobileHeader=e,void(this.createdMobileHeader=!0);this.$mobileHeader=s()('
'),s()(".c-branding").first().clone().appendTo(this.$mobileHeader),s()(".menu-item--cart").first().clone().appendTo(this.$mobileHeader),this.$mobileHeader.insertAfter(this.$toggle),this.createdMobileHeader=!0}}},{key:"render",value:function(){this.element&&(window.document.body.style.setProperty("--site-header-height",this.visibleHeaderHeight+this.promoBarHeight+"px"),this.updateMobileNavigationOffset(),this.updateMobileHeaderState(),this.updateDesktopHeaderState(!1))}}]),e}(),b=i(4),y=i.n(b),k=function(){function e(t,i){a()(this,e),this.element=t,this.parent=i.parent||null,this.transitionDuration=i.transitionDuration||.5,this.transitionEasing=i.transitionEasing||Power4.easeOut,this.pieces=this.getPieces(),this.id=s()(t).data("id"),this.cookieName="novablocks-announcement-"+this.id+"-disabled",this.height=0;var n=y.a.get(this.cookieName),o=s()("body").hasClass("logged-in");!n||o?(this.onResize(),f.registerOnResize(this.onResize.bind(this)),this.timeline.play(),this.bindEvents()):s()(t).remove()}return h()(e,[{key:"onResize",value:function(){var e=0,t=!1,i=!1;void 0!==this.timeline&&(e=this.timeline.progress(),t=this.timeline.isActive(),i=this.timeline.reversed(),this.timeline.clear(),this.timeline.kill(),this.pieces.wrapper.css("height","")),this.timeline=this.getTimeline(),this.timeline.progress(e),this.timeline.reversed(i),t&&this.timeline.resume()}},{key:"getPieces",value:function(){var e=s()(this.element);return{element:e,wrapper:e.find(".novablocks-announcement-bar__wrapper"),content:e.find(".novablocks-announcement-bar__content"),close:e.find(".novablocks-announcement-bar__close")}}},{key:"getTimeline",value:function(){var e=this.transitionDuration,t=this.transitionEasing,i=this.pieces,n=i.element,s=i.wrapper,o=(i.content,i.close,new TimelineMax({paused:!0})),a=s.outerHeight();return o.fromTo(n,e,{height:0},{height:a,ease:t},0),o.to({height:0},e,{height:a,onUpdate:this.onHeightUpdate.bind(this),onUpdateParams:["{self}"],ease:t},0),o}},{key:"bindEvents",value:function(){this.pieces.close.on("click",this.onClose.bind(this))}},{key:"onClose",value:function(){void 0!==this.timeline&&this.timeline.reverse()}},{key:"onHeightUpdate",value:function(e){this.height=e.target.height,this.parent&&this.parent.update()}}]),e}(),w=function(){function e(t,i){var n=this;a()(this,e);var s=Array.from(t);this.bars=s.map((function(e){return new k(e,{parent:n,transitionDuration:.5,transitionEasing:Power4.easeInOut})})),this.height=0,this.onUpdate=i.onUpdate,this.update()}return h()(e,[{key:"update",value:function(){var e=0;this.bars.forEach((function(t){e+=t.height})),this.height=e,"function"==typeof this.onUpdate&&this.onUpdate(this)}}]),e}(),C=".menu-item, .page_item",H=".menu-item-has-children, .page_item_has_children",O="hover",_=function(){function e(){a()(this,e),this.$menuItems=s()(C),this.$menuItemsWithChildren=this.$menuItems.filter(H).removeClass(O),this.$menuItemsWithChildrenLinks=this.$menuItemsWithChildren.children("a"),this.initialize()}return h()(e,[{key:"initialize",value:function(){this.onResize(),this.addSocialMenuClass(),this.initialized=!0,f.registerOnResize(this.onResize.bind(this))}},{key:"onResize",value:function(){if(window.matchMedia("only screen and (min-width: 1000px)").matches)return this.addSubMenusLeftClass(),this.initialized&&!this.desktop&&this.unbindClick(),this.initialized&&this.desktop||this.bindHoverIntent(),void(this.desktop=!0);this.removeSubMenusLeftClass(),this.initialized&&this.desktop&&this.unbindHoverIntent(),this.initialized&&!this.desktop||this.bindClick(),this.desktop=!1}},{key:"addSubMenusLeftClass",value:function(){var e=f.getProps().windowWidth;this.$menuItemsWithChildren.each((function(t,i){var n=s()(i),o=n.children(".sub-menu, .children"),a=o.outerWidth(),r=o.offset();e-r.left=o.left&&o.left+o.width>=s.left+s.width/2,r=s.top+s.height/2>=o.top&&o.top+o.height>=s.top+s.height/2,a&&r;var s,o,a,r}));n&&n.render(s)}},{key:"initializeImages",value:function(){var e=this.showLoadedImages.bind(this);e(),f.registerObserverCallback((function(t){s.a.each(t,(function(t,i){s.a.each(i.addedNodes,(function(t,i){("img"===(i.nodeName&&i.nodeName.toLowerCase())||i.childNodes.length)&&e(i)}))}))}))}},{key:"initializeReservationForm",value:function(){f.registerObserverCallback((function(e){s.a.each(e,(function(e,t){s.a.each(t.addedNodes,(function(e,t){var i=s()(t);i.is("#ot-reservation-widget")&&i.closest(".novablocks-opentable").addClass("is-loaded")}))}))}))}},{key:"showLoadedImages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=s()(e).find("img").not("[srcset], .is-loaded, .is-broken");t.imagesLoaded().progress((function(e,t){var i=t.isLoaded?"is-loaded":"is-broken";s()(t.img).addClass(i)}))}},{key:"initializeHero",value:function(){var e=document.getElementsByClassName("novablocks-hero"),t=Array.from(e);this.HeroCollection=t.map((function(e){return new p(e)})),this.firstHero=t[0]}},{key:"initializeCommentsArea",value:function(){var e=s()(".comments-area");e.length&&(this.commentsArea=new m(e.get(0)))}},{key:"initializeHeader",value:function(){var e=s()(".site-header");e.length&&(this.header=new v(e.get(0)))}},{key:"initializeNavbar",value:function(){this.navbar=new _}},{key:"initializePromoBar",value:function(){var e=document.querySelectorAll(".promo-bar .novablocks-announcement-bar");this.promoBar=new w(e,{onUpdate:this.onPromoBarUpdate.bind(this)})}},{key:"onPromoBarUpdate",value:function(e){var t=this.header,i=this.HeroCollection,n=e?e.height:0;t&&(t.offset=n,t.update()),i.forEach((function(e){e.offset=n,e.updateOnScroll()}))}}]),e}();function T(){new x}s()((function(){var e=s()(window);s()("html").is(".wf-active")?T():e.on("wf-active",T)}))}]); \ No newline at end of file +!function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=15)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function i(e,t){for(var i=0;i0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{var t=window.matchMedia&&matchMedia("(pointer:coarse)");if(t&&"(pointer:coarse)"===t.media)e=!!t.matches;else if("orientation"in window)e=!0;else{var i=navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(i)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(i)}}return e},c=function(e,t){var i=jQuery('
').appendTo("body"),n=i.is(":visible");return i.remove(),n},d=i(3),u=i.n(d),f=new(function(){function e(){a()(this,e),this.props={},this.newProps={},this.renderCallbacks=[],this.resizeCallbacks=[],this.observeCallbacks=[],this.scrollCallbacks=[],this.currentMutationList=[],this.frameRendered=!0,this.useOrientation=l()&&"orientation"in window,this._init()}return h()(e,[{key:"_init",value:function(){s()(window);var e=this._updateProps.bind(this),t=this._renderLoop.bind(this);e(),s()(e),this._bindOnResize(),this._bindOnScroll(),this._bindOnLoad(),this._bindObserver(),this._bindCustomizer(),requestAnimationFrame(t)}},{key:"_bindOnResize",value:function(){var e=s()(window),t=this._updateProps.bind(this);this.useOrientation?e.on("orientationchange",(function(){e.one("resize",t)})):e.on("resize",t)}},{key:"_bindOnScroll",value:function(){s()(window).on("scroll",this._updateScroll.bind(this))}},{key:"_bindOnLoad",value:function(){s()(window).on("load",this._updateProps.bind(this))}},{key:"_bindObserver",value:function(){var e,t,i,n=this,s=this._observeCallback.bind(this),o=(e=function(){s(),n.currentMutationList=[]},t=300,i=null,function(){var n=this,s=arguments,o=function(){e.apply(n,s)};clearTimeout(i),i=setTimeout(o,t)});window.MutationObserver&&new MutationObserver((function(e){n.currentMutationList=n.currentMutationList.concat(e),o()})).observe(document.body,{childList:!0,subtree:!0})}},{key:"_bindCustomizer",value:function(){"undefined"!=typeof wp&&void 0!==wp.customize&&(void 0!==wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",this._updateProps.bind(this)),wp.customize.bind("change",this._updateProps.bind(this)))}},{key:"_updateProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._updateSize(e),this._updateScroll(e)}},{key:"_observeCallback",value:function(){var e=this.currentMutationList;s.a.each(this.observeCallbacks,(function(t,i){i(e)}))}},{key:"_renderLoop",value:function(){this.frameRendered||(this._renderCallback(),this.frameRendered=!0),window.requestAnimationFrame(this._renderLoop.bind(this))}},{key:"_renderCallback",value:function(){var e=arguments;s.a.each(this.renderCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_resizeCallback",value:function(){var e=arguments;s.a.each(this.resizeCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_scrollCallback",value:function(){var e=arguments;s.a.each(this.scrollCallbacks,(function(t,i){i.apply(void 0,u()(e))}))}},{key:"_updateScroll",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.newProps=Object.assign({},this.newProps,{scrollY:window.pageYOffset,scrollX:window.pageXOffset}),this._shouldUpdate(this._scrollCallback.bind(this))}},{key:"_updateSize",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=document.body,t=document.documentElement,i=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight),n=Math.max(t.scrollHeight,t.offsetHeight);this.newProps=Object.assign({},this.newProps,{scrollHeight:Math.max(i,n),adminBarHeight:this.getAdminBarHeight(),windowWidth:this.useOrientation&&window.screen&&window.screen.availWidth||window.innerWidth,windowHeight:this.useOrientation&&window.screen&&window.screen.availHeight||window.innerHeight}),this._shouldUpdate(this._resizeCallback.bind(this))}},{key:"_shouldUpdate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(this._hasNewProps()||t)&&(this.props=Object.assign({},this.props,this.newProps),this.newProps={},this.frameRendered=!1,"function"==typeof e&&e())}},{key:"_hasNewProps",value:function(){var e=this;return Object.keys(this.newProps).some((function(t){return e.newProps[t]!==e.props[t]}))}},{key:"getAdminBarHeight",value:function(){var e=document.getElementById("wpadminbar");return e?e.getBoundingClientRect().height:0}},{key:"registerOnResize",value:function(e){"function"==typeof e&&this.resizeCallbacks.indexOf(e)<0&&this.resizeCallbacks.push(e)}},{key:"registerOnScroll",value:function(e){"function"==typeof e&&this.scrollCallbacks.indexOf(e)<0&&this.scrollCallbacks.push(e)}},{key:"registerObserverCallback",value:function(e){"function"==typeof e&&this.observeCallbacks.indexOf(e)<0&&this.observeCallbacks.push(e)}},{key:"registerRender",value:function(e){"function"==typeof e&&this.renderCallbacks.indexOf(e)<0&&this.renderCallbacks.push(e)}},{key:"getProps",value:function(){return this.props}}]),e}()),p=function(){function e(t){var i=this;a()(this,e),this.element=t,this.progress=0,this.timeline=new TimelineMax({paused:!0,onComplete:function(){i.paused=!0}}),this.pieces=this.getMarkupPieces(),this.paused=!1,this.offset=0,this.reduceMotion=!1,this.update(),this.updateOnScroll(),this.init()}return h()(e,[{key:"init",value:function(){var e=this;f.registerOnScroll((function(){e.update()})),f.registerRender((function(){e.updateOnScroll()}));var t=window.matchMedia("(prefers-reduced-motion: reduce)");if(t.addListener((function(){e.reduceMotion=t.matches,e.updateOnScroll()})),this.reduceMotion=t.matches,this.addIntroToTimeline(),this.timeline.addLabel("middle"),this.addOutroToTimeline(),this.timeline.addLabel("end"),this.pauseTimelineOnScroll(),this.reduceMotion){var i=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end");this.paused=!0,this.timeline.progress(i)}else this.timeline.play()}},{key:"update",value:function(){var e=f.getProps().scrollY;this.box=this.element.getBoundingClientRect(),this.view={left:this.box.left,top:this.box.top+e,width:this.box.width,height:this.box.height}}},{key:"updateOnScroll",value:function(){var e=f.getProps(),t=e.scrollY,i=e.scrollHeight,n=e.windowHeight,s=.5*n,o=i-n-.5*s,a=this.view.top+.5*(this.box.height-n),r=Math.max(0,Math.min(a,o));if(this.start=r-.5*s,this.end=this.start+s,this.progress=(t-this.start)/(this.end-this.start),this.reduceMotion){var h=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end");this.progress=h}this.updateTimelineOnScroll()}},{key:"updateTimelineOnScroll",value:function(){if(this.paused){var e=this.timeline.progress(),t=this.timeline.getLabelTime("middle")/this.timeline.getLabelTime("end"),i=2*(this.progress-.5)*(1-t)+t;e!==(i=Math.min(Math.max(t,i),1))&&this.timeline.progress(i)}}},{key:"getMarkupPieces",value:function(){var e=jQuery(this.element).find(".novablocks-hero__inner-container"),t=e.children().filter(".c-headline").first(),i=t.find(".c-headline__primary"),n=t.find(".c-headline__secondary"),s=t.next(".wp-block-separator"),o=s.find(".c-separator__symbol"),a=s.find(".c-separator__line"),r=s.find(".c-separator__arrow"),h=t.prevAll(),l=t.length?t.nextAll().not(s):e.children();return{headline:t,title:i,subtitle:n,separator:s,sepFlower:o,sepLine:a,sepArrow:r,othersBefore:h,othersAfter:l}}},{key:"addIntroToTimeline",value:function(){var e=this.timeline,t=f.getProps().windowWidth,i=this.pieces,n=i.headline,s=i.title,o=i.subtitle,a=i.separator,r=i.sepFlower,h=i.sepLine,l=i.sepArrow,c=i.othersBefore,d=i.othersAfter;s.length&&s.text().trim().length&&(this.splitTitle=new SplitText(s,{wordsClass:"c-headline__word"}),this.splitTitle.lines.forEach((function(i){var n=Array.from(i.children),s=[];n.forEach((function(e){s.push.apply(s,u()(e.children))})),s.forEach((function(i){var n=i.getBoundingClientRect(),o=(i.offsetWidth,2*(n.x-t/2)/t),a=400*s.length*o;e.from(i,.72,{x:a,ease:Expo.easeOut},0)}))})),e.fromTo(s,.89,{opacity:0},{opacity:1,ease:Expo.easeOut},0),e.fromTo(n,1,{y:30},{y:0,ease:Expo.easeOut},0)),o.length&&(e.fromTo(o,.65,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.65"),e.fromTo(o,.9,{y:30},{y:0,ease:Quint.easeOut},"-=0.65")),a.length&&(r.length&&(e.fromTo(r,.15,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.6"),e.fromTo(r,.55,{rotation:-270},{rotation:0,ease:Back.easeOut},"-=0.5")),h.length&&(e.fromTo(h,.6,{width:0},{width:"42%",opacity:1,ease:Quint.easeOut},"-=0.55"),e.fromTo(a,.6,{width:0},{width:"100%",opacity:1,ease:Quint.easeOut},"-=0.6")),l.length&&e.fromTo(l,.2,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.27")),d.length&&(e.fromTo(d,.5,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.28"),e.fromTo(d,.75,{y:-20},{y:0},"-=0.5")),c.length&&(e.fromTo(c,.5,{opacity:0},{opacity:1,ease:Quint.easeOut},"-=0.75"),e.fromTo(c,.75,{y:20},{y:0},"-=0.75")),this.timeline=e}},{key:"addOutroToTimeline",value:function(){var e=this.pieces,t=e.title,i=e.subtitle,n=e.othersBefore,s=e.othersAfter,o=e.separator,a=e.sepLine,r=e.sepFlower,h=e.sepArrow,l=this.timeline;l.fromTo(t,1.08,{y:0},{opacity:0,y:-60,ease:Quad.easeIn},"middle"),l.to(i,1.08,{opacity:0,y:-90,ease:Quad.easeIn},"middle"),l.to(n,1.08,{y:60,opacity:0,ease:Quad.easeIn},"middle"),l.to(s,1.08,{y:60,opacity:0,ease:Quad.easeIn},"middle"),l.to(a,.86,{width:"0%",opacity:0,ease:Quad.easeIn},"-=0.94"),l.to(o,.86,{width:"0%",opacity:0,ease:Quad.easeIn},"-=0.86"),l.to(r,1,{rotation:180},"-=1.08"),l.to(r,.11,{opacity:0},"-=0.03"),l.to(h,.14,{opacity:0},"-=1.08"),this.timeline=l}},{key:"revertTitle",value:function(){void 0!==this.splitTitle&&this.splitTitle.revert()}},{key:"pauseTimelineOnScroll",value:function(){var e=this,t=this.timeline.getLabelTime("middle"),i=this.timeline.getLabelTime("end");this.timeline.eventCallback("onUpdate",(function(n){var s=n.time(),o=s>t,a=.5*((s-t)/(i-t))+.5>=e.progress;o&&a&&(n.pause(),e.revertTitle(),e.timeline.eventCallback("onUpdate",null),e.paused=!0)}),["{self}"])}}]),e}(),m=function(){function e(t){a()(this,e),this.$element=s()(t),this.$checkbox=this.$element.find(".c-comments-toggle__checkbox"),this.$content=this.$element.find(".comments-area__content"),this.$contentWrap=this.$element.find(".comments-area__wrap"),this.$contentWrap.css("display","block"),this.$checkbox.on("change",this.onChange.bind(this)),this.checkWindowLocationComments()}return h()(e,[{key:"onChange",value:function(){this.toggle(!1)}},{key:"toggle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.$contentWrap,i=this.$checkbox.prop("checked"),n=i?this.$content.outerHeight():0;e?t.css("height",n):TweenMax.to(t,.4,{height:n,onComplete:function(){i&&t.css("height","")}})}},{key:"checkWindowLocationComments",value:function(){-1===window.location.href.indexOf("#comment")&&(this.$checkbox.prop("checked",!1),this.toggle(!0))}}]),e}(),g={offsetTargetElement:null},v=function(){function e(t,i){a()(this,e),t&&(this.element=t,this.options=Object.assign({},g,i),this.$header=s()(this.element),this.$toggle=s()(".c-menu-toggle"),this.$toggleWrap=s()(".c-menu-toggle__wrap"),this.scrolled=!1,this.inversed=!1,this.abovePromoBar=!1,this.wasSticky=s()("body").is(".has-site-header-fixed"),this.offset=0,this.scrollOffset=0,this.mobileHeaderHeight=0,this.promoBarHeight=0,this.$page=s()("#page .site-content"),this.$hero=s()(".has-hero .novablocks-hero").first().find(".novablocks-hero__foreground"),this.$promoBar=s()(".novablocks-announcement-bar"),this.createMobileHeader(),this.onResize(),this.render(),f.registerOnResize(this.onResize.bind(this)),this.initialize())}return h()(e,[{key:"initialize",value:function(){this.timeline=this.getInroTimeline(),s()(".site-header__wrapper").css("transition","none"),this.$header.addClass("site-header--fixed site-header--ready"),this.$mobileHeader.addClass("site-header--fixed site-header--ready"),this.timeline.play()}},{key:"update",value:function(){this.updatePageOffset(),this.updateHeaderOffset(),this.updateMobileHeaderOffset()}},{key:"getInroTimeline",value:function(){var e=this.element,t=new TimelineMax({paused:!0}),i=s()(e).outerHeight(),n=Power4.easeInOut;return t.to(e,.5,{opacity:1,ease:n},0),t.to({height:0},.5,{height:i,onUpdate:this.onHeightUpdate.bind(this),onUpdateParams:["{self}"],onComplete:function(){s()(".site-header__wrapper").css("transition","")},ease:n},0),t}},{key:"onHeightUpdate",value:function(e){this.getProps(),this.box=Object.assign(this.box,{height:e.target.height}),this.setVisibleHeaderHeight(),this.update()}},{key:"getMobileHeaderHeight",value:function(){var e=this.$mobileHeader.css("height","").outerHeight(),t=this.$toggleWrap.css("height","").outerHeight();return Math.max(e,t)}},{key:"isMobileHeaderVisibile",value:function(){return this.$mobileHeader.is(":visible")}},{key:"setVisibleHeaderHeight",value:function(){this.visibleHeaderHeight=this.isMobileHeaderVisibile()?this.mobileHeaderHeight:this.box.height}},{key:"getProps",value:function(){this.box=this.element.getBoundingClientRect(),this.scrollOffset=this.getScrollOffset(),this.mobileHeaderHeight=this.getMobileHeaderHeight(),this.$promoBar.length&&(this.promoBarHeight=this.$promoBar.outerHeight())}},{key:"onResize",value:function(){var e=s()(this.element),t=e.hasClass("site-header--scrolled");e.css("transition","none"),e.removeClass("site-header--scrolled"),this.getProps(),this.setVisibleHeaderHeight(),this.shouldMakeHeaderStatic(),e.toggleClass("site-header--scrolled",t),window.requestIdleCallback?requestIdleCallback((function(){e.css("transition","")})):setTimeout((function(){e.css("transition","")}),0),this.update()}},{key:"shouldMakeHeaderStatic",value:function(){var e=s()("body"),t=f.getProps().windowHeight;this.wasSticky&&e.toggleClass("has-site-header-fixed",this.visibleHeaderHeight<.2*t)}},{key:"updateHeaderOffset",value:function(){this.element&&(this.element.style.marginTop=this.offset+"px")}},{key:"updateMobileHeaderOffset",value:function(){this.$mobileHeader&&(this.$mobileHeader.css({height:this.mobileHeaderHeight}),TweenMax.to(this.$mobileHeader,.2,{y:this.offset}),s()(".site-header__inner-container").css({transform:"translateY(".concat(this.mobileHeaderHeight,"px)")}),this.$toggleWrap.css({height:this.mobileHeaderHeight}),TweenMax.to(this.$toggleWrap,.2,{y:this.offset}))}},{key:"getScrollOffset",value:function(){var e=f.getProps(),t=e.adminBarHeight,i=e.scrollY,n=this.options.offsetTargetElement;if(n){var s=n.getBoundingClientRect();return s.top+i+s.height-(t+this.offset+this.box.height/2)}return 0}},{key:"updatePageOffset",value:function(){TweenMax.set(this.$page,{css:{marginTop:this.visibleHeaderHeight+this.offset}})}},{key:"updateMobileNavigationOffset",value:function(){var e=f.getProps().scrollY;c("below","lap")&&(this.element.style.marginTop=Math.max(this.promoBarHeight-e,0)+"px")}},{key:"updateMobileHeaderState",value:function(){var e=f.getProps().scrollY>this.promoBarHeight;e!==this.abovePromoBar&&(s()(body).toggleClass("site-header-mobile--scrolled",e),this.abovePromoBar=e)}},{key:"updateDesktopHeaderState",value:function(e){var t=f.getProps().scrollY>this.scrollOffset;e!==this.inversed&&(this.$header.toggleClass("site-header--normal",!e),this.inversed=e),t!==this.scrolled&&(this.$header.toggleClass("site-header--scrolled",t),this.scrolled=t)}},{key:"createMobileHeader",value:function(){if(!this.createdMobileHeader){var e=s()(".site-header--mobile");if(e.length)return this.$mobileHeader=e,void(this.createdMobileHeader=!0);this.$mobileHeader=s()('
'),s()(".c-branding").first().clone().appendTo(this.$mobileHeader),s()(".menu-item--cart").first().clone().appendTo(this.$mobileHeader),this.$mobileHeader.insertAfter(this.$toggle),this.createdMobileHeader=!0}}},{key:"render",value:function(){this.element&&(window.document.body.style.setProperty("--site-header-height",.75*this.visibleHeaderHeight+this.promoBarHeight+"px"),this.updateMobileNavigationOffset(),this.updateMobileHeaderState(),this.updateDesktopHeaderState(!1))}}]),e}(),b=i(4),y=i.n(b),k=function(){function e(t,i){a()(this,e),this.element=t,this.parent=i.parent||null,this.transitionDuration=i.transitionDuration||.5,this.transitionEasing=i.transitionEasing||Power4.easeOut,this.pieces=this.getPieces(),this.id=s()(t).data("id"),this.cookieName="novablocks-announcement-"+this.id+"-disabled",this.height=0;var n=y.a.get(this.cookieName),o=s()("body").hasClass("logged-in");!n||o?(this.onResize(),f.registerOnResize(this.onResize.bind(this)),this.timeline.play(),this.bindEvents()):s()(t).remove()}return h()(e,[{key:"onResize",value:function(){var e=0,t=!1,i=!1;void 0!==this.timeline&&(e=this.timeline.progress(),t=this.timeline.isActive(),i=this.timeline.reversed(),this.timeline.clear(),this.timeline.kill(),this.pieces.wrapper.css("height","")),this.timeline=this.getTimeline(),this.timeline.progress(e),this.timeline.reversed(i),t&&this.timeline.resume()}},{key:"getPieces",value:function(){var e=s()(this.element);return{element:e,wrapper:e.find(".novablocks-announcement-bar__wrapper"),content:e.find(".novablocks-announcement-bar__content"),close:e.find(".novablocks-announcement-bar__close")}}},{key:"getTimeline",value:function(){var e=this.transitionDuration,t=this.transitionEasing,i=this.pieces,n=i.element,s=i.wrapper,o=(i.content,i.close,new TimelineMax({paused:!0})),a=s.outerHeight();return o.fromTo(n,e,{height:0},{height:a,ease:t},0),o.to({height:0},e,{height:a,onUpdate:this.onHeightUpdate.bind(this),onUpdateParams:["{self}"],ease:t},0),o}},{key:"bindEvents",value:function(){this.pieces.close.on("click",this.onClose.bind(this))}},{key:"onClose",value:function(){void 0!==this.timeline&&this.timeline.reverse()}},{key:"onHeightUpdate",value:function(e){this.height=e.target.height,this.parent&&this.parent.update()}}]),e}(),w=function(){function e(t,i){var n=this;a()(this,e);var s=Array.from(t);this.bars=s.map((function(e){return new k(e,{parent:n,transitionDuration:.5,transitionEasing:Power4.easeInOut})})),this.height=0,this.onUpdate=i.onUpdate,this.update()}return h()(e,[{key:"update",value:function(){var e=0;this.bars.forEach((function(t){e+=t.height})),this.height=e,"function"==typeof this.onUpdate&&this.onUpdate(this)}}]),e}(),C=".menu-item, .page_item",H=".menu-item-has-children, .page_item_has_children",O="hover",_=function(){function e(){a()(this,e),this.$menuItems=s()(C),this.$menuItemsWithChildren=this.$menuItems.filter(H).removeClass(O),this.$menuItemsWithChildrenLinks=this.$menuItemsWithChildren.children("a"),this.initialize()}return h()(e,[{key:"initialize",value:function(){this.onResize(),this.addSocialMenuClass(),this.initialized=!0,f.registerOnResize(this.onResize.bind(this))}},{key:"onResize",value:function(){if(window.matchMedia("only screen and (min-width: 1000px)").matches)return this.addSubMenusLeftClass(),this.initialized&&!this.desktop&&this.unbindClick(),this.initialized&&this.desktop||this.bindHoverIntent(),void(this.desktop=!0);this.removeSubMenusLeftClass(),this.initialized&&this.desktop&&this.unbindHoverIntent(),this.initialized&&!this.desktop||this.bindClick(),this.desktop=!1}},{key:"addSubMenusLeftClass",value:function(){var e=f.getProps().windowWidth;this.$menuItemsWithChildren.each((function(t,i){var n=s()(i),o=n.children(".sub-menu, .children"),a=o.outerWidth(),r=o.offset();e-r.left=o.left&&o.left+o.width>=s.left+s.width/2,r=s.top+s.height/2>=o.top&&o.top+o.height>=s.top+s.height/2,a&&r;var s,o,a,r}));n&&n.render(s)}},{key:"initializeImages",value:function(){var e=this.showLoadedImages.bind(this);e(),f.registerObserverCallback((function(t){s.a.each(t,(function(t,i){s.a.each(i.addedNodes,(function(t,i){("img"===(i.nodeName&&i.nodeName.toLowerCase())||i.childNodes.length)&&e(i)}))}))}))}},{key:"initializeReservationForm",value:function(){f.registerObserverCallback((function(e){s.a.each(e,(function(e,t){s.a.each(t.addedNodes,(function(e,t){var i=s()(t);i.is("#ot-reservation-widget")&&i.closest(".novablocks-opentable").addClass("is-loaded")}))}))}))}},{key:"showLoadedImages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=s()(e).find("img").not("[srcset], .is-loaded, .is-broken");t.imagesLoaded().progress((function(e,t){var i=t.isLoaded?"is-loaded":"is-broken";s()(t.img).addClass(i)}))}},{key:"initializeHero",value:function(){var e=document.getElementsByClassName("novablocks-hero"),t=Array.from(e);this.HeroCollection=t.map((function(e){return new p(e)})),this.firstHero=t[0]}},{key:"initializeCommentsArea",value:function(){var e=s()(".comments-area");e.length&&(this.commentsArea=new m(e.get(0)))}},{key:"initializeHeader",value:function(){var e=s()(".site-header");e.length&&(this.header=new v(e.get(0)))}},{key:"initializeNavbar",value:function(){this.navbar=new _}},{key:"initializePromoBar",value:function(){var e=document.querySelectorAll(".promo-bar .novablocks-announcement-bar");this.promoBar=new w(e,{onUpdate:this.onPromoBarUpdate.bind(this)})}},{key:"onPromoBarUpdate",value:function(e){var t=this.header,i=this.HeroCollection,n=e?e.height:0;t&&(t.offset=n,t.update()),i.forEach((function(e){e.offset=n,e.updateOnScroll()}))}}]),e}();function T(){new x}s()((function(){var e=s()(window);s()("html").is(".wf-active")?T():e.on("wf-active",T)}))}]); \ No newline at end of file diff --git a/src/js/components/header.js b/src/js/components/header.js index d946a181..f6a7a293 100644 --- a/src/js/components/header.js +++ b/src/js/components/header.js @@ -246,7 +246,7 @@ class Header { render() { if ( ! this.element ) return; - window.document.body.style.setProperty( '--site-header-height', this.visibleHeaderHeight + this.promoBarHeight + 'px' ); + window.document.body.style.setProperty( '--site-header-height', ( this.visibleHeaderHeight * 0.75 ) + this.promoBarHeight + 'px' ); this.updateMobileNavigationOffset(); this.updateMobileHeaderState(); diff --git a/src/scss/components/site-header/_theme.scss b/src/scss/components/site-header/_theme.scss index 7cf43691..0be12ec1 100644 --- a/src/scss/components/site-header/_theme.scss +++ b/src/scss/components/site-header/_theme.scss @@ -30,7 +30,7 @@ $site-header-transition-speed: .3s !default; pointer-events: auto; .has-site-header-fixed .site-header--scrolled & { - min-height: calc( var(--theme-header-height) * var(--theme-header-srolled-ratio, 0.75) ) + min-height: calc( var(--theme-header-height) * var(--theme-header-scrolled-ratio, 0.75) ) } } diff --git a/style-rtl.css b/style-rtl.css index 8198c42f..604d3f9e 100644 --- a/style-rtl.css +++ b/style-rtl.css @@ -1517,7 +1517,7 @@ ul.menu a, transition-property: min-height, color, background-color; pointer-events: auto; } .has-site-header-fixed .site-header--scrolled .site-header__wrapper { - min-height: calc( var(--theme-header-height) * var(--theme-header-srolled-ratio, 0.75)); } + min-height: calc( var(--theme-header-height) * var(--theme-header-scrolled-ratio, 0.75)); } .site-header__inner-container { width: 100%; } .site-header__wrapper:after { diff --git a/style.css b/style.css index 327a539b..79447bd0 100644 --- a/style.css +++ b/style.css @@ -1517,7 +1517,7 @@ ul.menu a, transition-property: min-height, color, background-color; pointer-events: auto; } .has-site-header-fixed .site-header--scrolled .site-header__wrapper { - min-height: calc( var(--theme-header-height) * var(--theme-header-srolled-ratio, 0.75)); } + min-height: calc( var(--theme-header-height) * var(--theme-header-scrolled-ratio, 0.75)); } .site-header__inner-container { width: 100%; } .site-header__wrapper:after {