diff --git a/assets/js/app.js b/assets/js/app.js index 98c38de3c..4d2edb3ab 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -1 +1 @@ -"use strict";(self.webpackChunkliebling=self.webpackChunkliebling||[]).push([[773],{480:(e,t,n)=>{var s=n(755),o=n.n(s),a=n(631),i=n.n(a),l=n(488),c=(n(418),n(433)),r=n(414),u=n(125),d=n(911),m=(n(350),n(769));o()((function(){(0,m.dZ)()&&o()("html").attr("dir","rtl").addClass("rtl");var e=o()("body"),t=o()(".js-header"),n=o()(".js-open-menu"),s=o()(".js-close-menu"),a=o()(".js-menu"),h=o()(".js-toggle-submenu"),g=o()(".js-submenu-option")[0],f=o()(".js-submenu"),v=o()(".js-recent-slider"),p=o()(".js-open-secondary-menu"),k=o()(".js-open-search"),j=o()(".js-close-search"),C=o()(".js-search"),b=o()(".js-input-search"),w=o()(".js-search-results"),y=o()(".js-no-results"),S=o()(".js-toggle-darkmode"),Z=o()(".js-main-nav"),_=o()(".js-main-nav-left"),M=o()(".js-newsletter"),q=o()(".js-native-comments > div > iframe")[0],x=localStorage.getItem("theme"),A=null,L=!1,T=null,H=function(){t.removeClass("submenu-is-active"),h.removeClass("active"),f.removeClass("opened").addClass("closed")},I=function(){e.toggleClass("no-scroll-y")},P=function(e,t){var n=new r.Z({url:e,key:t,version:"v5.0"}),s=[],o={shouldSort:!0,ignoreLocation:!0,findAllMatches:!0,includeScore:!0,minMatchCharLength:2,keys:["title","custom_excerpt","tags.name"]};n.posts.browse({limit:"all",include:"tags",fields:"id, title, url, published_at, custom_excerpt"}).then((function(e){for(var t=0,n=e.length;t0&&A){var e=A.search(b.val()).filter((function(e){if(e.score<=.5)return e})),t="";if(e.length>0){for(var n=0,s=e.length;n

').concat(e[n].item.title,'

').concat((0,m.p6)(e[n].item.published_at),"
");y.hide(),w.html(t),w.show()}else w.html(""),w.hide(),y.show()}else w.html(""),w.hide(),y.hide()})),S.on("change",(function(){S.is(":checked")?(o()("html").attr("data-theme","dark"),localStorage.setItem("theme","dark")):(o()("html").attr("data-theme","light"),localStorage.setItem("theme","light")),q&&q.contentDocument.location.reload(!0)})),S.on("mouseenter",(function(){z(!0)})),S.on("mouseleave",(function(){z(!1)})),o()(window).on("click",(function(e){L&&g&&!g.contains(e.target)&&(L=!1,H())})),o()(document).on("keyup",(function(e){"Escape"===e.key&&C.hasClass("opened")&&j.trigger("click")})),x&&"dark"===x&&S.each((function(){o()(this).attr("checked",!0)})),t.length>0)&&new(i())(t[0],{tolerance:{down:10,up:20},offset:15,onUnpin:function(){if(!(0,m.tq)()&&T){var e=T[0];e&&e.state.isVisible&&e.hide()}}}).init();if(v.length>0)new d.ZP(".js-recent-slider",{modules:[d.Rv,d.s5],freeMode:!0,slidesPerView:"auto",a11y:!0,on:{init:function(){(0,c.Z)(".js-recent-article-title",50)}}});if(p.length>0){var D=document.getElementById("secondary-navigation-template");T=(0,l.ZP)(".js-open-secondary-menu",{appendTo:document.body,content:D.innerHTML,allowHTML:!0,arrow:!0,trigger:"click",interactive:!0,onShow:function(){z(!0)},onHidden:function(){z(!1)}})}(0,l.ZP)(".js-tooltip"),(0,c.Z)(".js-article-card-title",100),(0,c.Z)(".js-article-card-title-no-image",250),"undefined"!=typeof disableNewsletter&&disableNewsletter&&M.remove(),"undefined"!=typeof ghostSearchApiKey?P(ghostHost,ghostSearchApiKey):(k.css("visibility","hidden"),j.remove(),C.remove())}))},769:(e,t,n)=>{n.d(t,{dZ:()=>s,e:()=>i,eS:()=>l,ej:()=>c,p6:()=>a,tq:()=>o});var s=function(){var e=document.querySelector("html");return["ar","he","fa"].includes(e.getAttribute("lang"))},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"768px";return window.matchMedia("(max-width: ".concat(e,")")).matches},a=function(e){return e?new Date(e).toLocaleDateString(document.documentElement.lang,{year:"numeric",month:"long",day:"numeric"}):""},i=function(){for(var e=document.querySelectorAll(".kg-gallery-image img"),t=0,n=e.length;t1&&t.last().hide()}),10)}))}}},e=>{e.O(0,[898],(()=>{return t=480,e(e.s=t);var t}));e.O()}]); \ No newline at end of file +"use strict";(self.webpackChunkliebling=self.webpackChunkliebling||[]).push([[773],{480:(e,t,n)=>{var s=n(755),o=n.n(s),a=n(631),i=n.n(a),l=n(488),c=(n(418),n(433)),r=n(414),u=n(125),d=n(911),m=(n(350),n(769));o()((function(){(0,m.dZ)()&&o()("html").attr("dir","rtl").addClass("rtl");var e=o()("body"),t=o()(".js-header"),n=o()(".js-open-menu"),s=o()(".js-close-menu"),a=o()(".js-menu"),h=o()(".js-toggle-submenu"),g=o()(".js-submenu-option")[0],f=o()(".js-submenu"),v=o()(".js-recent-slider"),p=o()(".js-open-secondary-menu"),k=o()(".js-open-search"),j=o()(".js-close-search"),b=o()(".js-search"),C=o()(".js-input-search"),w=o()(".js-search-results"),y=o()(".js-no-results"),S=o()(".js-toggle-darkmode"),Z=o()(".js-main-nav"),_=o()(".js-main-nav-left"),M=o()(".js-newsletter"),q=o()(".js-native-comments > div > iframe")[0],x=localStorage.getItem("theme"),A=null,L=!1,T=null,E=function(){t.removeClass("submenu-is-active"),h.removeClass("active"),f.removeClass("opened").addClass("closed")},H=function(){e.toggleClass("no-scroll-y")},I=function(e,t){var n=new r.Z({url:e,key:t,version:"v5.0"}),s=[],o={shouldSort:!0,ignoreLocation:!0,findAllMatches:!0,includeScore:!0,minMatchCharLength:2,keys:["title","custom_excerpt","tags.name"]};n.posts.browse({limit:"all",include:"tags",fields:"id, title, url, published_at, custom_excerpt"}).then((function(e){for(var t=0,n=e.length;t0&&A){var e=A.search(C.val()).filter((function(e){if(e.score<=.5)return e})),t="";if(e.length>0){for(var n=0,s=e.length;n

').concat(e[n].item.title,'

').concat((0,m.p6)(e[n].item.published_at),"
");y.hide(),w.html(t),w.show()}else w.html(""),w.hide(),y.show()}else w.html(""),w.hide(),y.hide()})),S.on("change",(function(){S.is(":checked")?(o()("html").attr("data-theme","dark"),localStorage.setItem("theme","dark")):(o()("html").attr("data-theme","light"),localStorage.setItem("theme","light")),q&&q.contentDocument.location.reload(!0)})),S.on("mouseenter",(function(){P(!0)})),S.on("mouseleave",(function(){P(!1)})),o()(window).on("click",(function(e){L&&g&&!g.contains(e.target)&&(L=!1,E())})),o()(document).on("keyup",(function(e){"Escape"===e.key&&b.hasClass("opened")&&j.trigger("click")})),x&&"dark"===x&&S.each((function(){o()(this).attr("checked",!0)})),t.length>0)&&new(i())(t[0],{tolerance:{down:10,up:20},offset:15,onUnpin:function(){if(!(0,m.tq)()&&T){var e=T[0];e&&e.state.isVisible&&e.hide()}}}).init();if(v.length>0)new d.ZP(".js-recent-slider",{modules:[d.Rv,d.s5],freeMode:!0,slidesPerView:"auto",a11y:!0,on:{init:function(){(0,c.Z)(".js-recent-article-title",50)}}});if(p.length>0){var z=document.getElementById("secondary-navigation-template");T=(0,l.ZP)(".js-open-secondary-menu",{appendTo:document.body,content:z.innerHTML,allowHTML:!0,arrow:!0,trigger:"click",interactive:!0,onShow:function(){P(!0)},onHidden:function(){P(!1)}})}(0,l.ZP)(".js-tooltip"),(0,c.Z)(".js-article-card-title",100),(0,c.Z)(".js-article-card-title-no-image",250),"undefined"!=typeof disableNewsletter&&disableNewsletter&&M.remove(),"undefined"!=typeof ghostSearchApiKey&&"undefined"==typeof nativeSearchEnabled?I(ghostHost,ghostSearchApiKey):(k.css("visibility","hidden"),j.remove(),b.remove())}))},769:(e,t,n)=>{n.d(t,{dZ:()=>s,e:()=>i,eS:()=>l,ej:()=>c,p6:()=>a,tq:()=>o});var s=function(){var e=document.querySelector("html");return["ar","he","fa"].includes(e.getAttribute("lang"))},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"768px";return window.matchMedia("(max-width: ".concat(e,")")).matches},a=function(e){return e?new Date(e).toLocaleDateString(document.documentElement.lang,{year:"numeric",month:"long",day:"numeric"}):""},i=function(){for(var e=document.querySelectorAll(".kg-gallery-image img"),t=0,n=e.length;t1&&t.last().hide()}),10)}))}}},e=>{e.O(0,[898],(()=>{return t=480,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/default.hbs b/default.hbs index 43cd61583..485d74abc 100644 --- a/default.hbs +++ b/default.hbs @@ -75,7 +75,7 @@ {{!-- This #block helper will inject a stylesheet for a specific page --}} {{{block "styles"}}} - {{!-- This #block helper will pull data from the hero partial + {{!-- This #block helper will pull data from the hero partial to inject styles of the hero image to make it responsive --}} {{{block "herobackground"}}} @@ -96,6 +96,12 @@ // @license-end + {{#if @custom.enable_native_search}} + + {{/if}} + {{#if @custom.search_api_key}}