diff --git a/_vendor/github.com/linode/linode-docs-theme/common-partials/dist/js/header.js b/_vendor/github.com/linode/linode-docs-theme/common-partials/dist/js/header.js index 2a8c24ed152..37caf97de8e 100644 --- a/_vendor/github.com/linode/linode-docs-theme/common-partials/dist/js/header.js +++ b/_vendor/github.com/linode/linode-docs-theme/common-partials/dist/js/header.js @@ -1 +1 @@ -(()=>{var g=document.querySelector("html"),s,h=function(){s=document.querySelector(".c-site-header"),s&&(L(),b())},u=function(){document.documentElement.style.setProperty("--site-scroll-y",window.scrollY+"px")},L=function(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",u):u(),window.addEventListener("scroll",u),s.addEventListener("toggle:on",function(e){d(!1)}),s.addEventListener("toggle:off",function(e){d(!0)}),document.addEventListener("keyup",function(e){switch(e.keyCode){case 27:s.querySelectorAll(".active").forEach(t=>t.classList.remove("active")),document.activeElement.blur(),d(!0);break}})},b=function(){var e=window.location.pathname;if(e!=="/"){e.match(/^\/community\/questions\/.+/)?e="/community/questions/":e.match(/^\/docs\/.+/)?e="/docs/":e.match(/^\/blog|marketplace\/.+/)?e=e.replace(/^\/([^\/]+)\/.+/,"/$1/"):e.match(/^\/event\/.+/)?e="/events/":e.match(/^\/content|content-type|featuring|resources|series\/.+/)?e="/resources/":e.match(/^\/media\-coverage|press\-release\/.+/)&&(e="/company/press/");var t=s.querySelectorAll(':scope a.o-menu__link[href*="'+e+'"');t&&Array.from(t).forEach(r=>{if(!r.getAttribute("href").split(/[?#]/)[0].endsWith(e))return;r.classList.add("current");const n=r.closest(".c-submenu");if(n===null)return;const i=s.querySelectorAll(`:scope [data-toggle="#${n.id}"]`);Array.from(i).forEach(c=>c.classList.add("current"))})}},d=function(e){g.style.overflow=e?"":"hidden"};g.classList.contains("fl-builder-edit")||h(),document.addEventListener("turbolinks:render",function(e){h()});function w(e){if(!e.ok){let t="";throw e.statusText?t=e.statusText:e.status===404?t="Resource not found":t="Problem fetching resource",new Error(`${t} (${e.url})`)}return e}var _=["de","es","fr","it","ja","ko","pt","zh"];function $(){let e=document.documentElement.lang;return e&&_.includes(e)?e:""}function C(e,t=["b","br","em","i","span","strong","u"]){let r=document.createElement("div");r.textContent=e;let n=r.innerHTML,i=new RegExp(`<(/?(${t.join("|")}))>`,"gi");return n=n.replace(i,"<$1>"),n}var y,v=function(){const e=window.LinodeHeader?.env||"prod",t=$(),r=t?`${t}/`:"",n=`https://www.linode.com/ns/features/${e}/${r}features.json`;fetch(n).then(w).then(i=>i.json()).then(i=>k(i)).catch(i=>console.log(i))},k=function(e){e.forEach(t=>{let r=document.querySelector('.c-site-header [data-featured="'+t.slot+'"]');if(!r)return;let n=x(t);if(n){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(n)}})},p=function(e){let t=document.createElement("img");return t.src=e.src,t.width=e.width,t.height=e.height,t.loading="lazy",t.fetchPriority="low",e.alt&&(t.alt=e.alt),e.srcset&&(t.srcset=e.srcset),e.sizes&&(t.sizes=e.sizes),t},x=function(e){let t=document.createElement("div"),r=document.createElement("h6"),n=document.createElement("a"),i=document.createElement("div"),c=document.createElement("div"),l=document.createElement("div"),f=document.createElement("span"),m=document.createElement("style");if(r.textContent=e.eyebrow,n.classList.add("c-featured"),n.id=`c-featured--${e.slot}`,n.href=e.link_url,n.setAttribute("style",e.wrap_styles),n.setAttribute("data-analytics-event",`${e.ga_category} | ${e.ga_action} | ${e.ga_label}`),i.classList.add("c-featured__text"),c.classList.add("c-featured__headline"),c.innerHTML=C(e.headline),l.classList.add("c-featured__excerpt"),l.innerHTML=e.excerpt,f.classList.add("c-featured__button"),f.textContent=e.link_text,m.type="text/css",m.textContent=e.css,i.appendChild(c),i.appendChild(l),i.appendChild(f),e.background_image.src){let o=p(e.background_image);o.classList.add("c-featured__background"),n.appendChild(o)}if(e.foreground_image.src){let o=p(e.foreground_image);o.classList.add("c-featured__image"),n.appendChild(o)}return n.appendChild(i),t.appendChild(r),t.appendChild(n),t.appendChild(m),t},y=document.querySelector("html");y.classList.contains("fl-builder-edit")||v(),document.addEventListener("turbolinks:render",function(e){v()});var a=document.querySelector("html"),E=function(){S()},S=function(){a.addEventListener("click",q)},q=function(e){const t=e.target.closest("[data-toggle]");if(t===null||e.target.closest("form")!==null)return;const r=t.dataset.toggle?a.querySelector(t.dataset.toggle):t;if(r===null)return;const n=e.target.closest("a");if(n)if(n===t)e.preventDefault();else{const i=new URL(n.getAttribute("href"));if(i&&i.pathname!==window.location.pathname)return;n.blur()}A(r,t)},A=function(e,t){const r=e.classList.contains("active"),n=e.dataset.group,i=n?a.querySelectorAll('[data-group="'+n+'"].active'):null,c=new CustomEvent("toggle:"+(r?"off":"on"),{bubbles:!0});i&&i.forEach(l=>l.classList.remove("active")),r?t.blur():(e.classList.add("active"),t.classList.add("active")),e.dispatchEvent(c)};a.classList.contains("fl-builder-edit")||E(),document.addEventListener("turbolinks:render",function(e){E()}),window.addEventListener("click",e=>{(e.target.matches('a[href*="#open-consent-prefs"]')||e.target.matches("span#open-consent-prefs"))&&(e.preventDefault(),typeof window.OneTrust<"u"&&window.OneTrust.ToggleInfoDisplay())})})(); +(()=>{var g=document.querySelector("html"),s,h=function(){s=document.querySelector(".c-site-header"),s&&(L(),b())},u=function(){document.documentElement.style.setProperty("--site-scroll-y",window.scrollY+"px")},L=function(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",u):u(),window.addEventListener("scroll",u),s.addEventListener("toggle:on",function(e){d(!1)}),s.addEventListener("toggle:off",function(e){d(!0)}),document.addEventListener("keyup",function(e){switch(e.keyCode){case 27:s.querySelectorAll(".active").forEach(t=>t.classList.remove("active")),document.activeElement.blur(),d(!0);break}})},b=function(){var e=window.location.pathname;if(e!=="/"){e.match(/^\/community\/questions\/.+/)?e="/community/questions/":e.match(/^\/docs\/.+/)?e="/docs/":e.match(/^\/blog|marketplace\/.+/)?e=e.replace(/^\/([^\/]+)\/.+/,"/$1/"):e.match(/^\/event\/.+/)?e="/events/":e.match(/^\/content|content-type|featuring|resources|series\/.+/)?e="/resources/":e.match(/^\/media\-coverage|press\-release\/.+/)&&(e="/company/press/");var t=s.querySelectorAll(':scope a.o-menu__link[href*="'+e+'"');t&&Array.from(t).forEach(r=>{if(!r.getAttribute("href").split(/[?#]/)[0].endsWith(e))return;r.classList.add("current");const n=r.closest(".c-submenu");if(n===null)return;const i=s.querySelectorAll(`:scope [data-toggle="#${n.id}"]`);Array.from(i).forEach(c=>c.classList.add("current"))})}},d=function(e){g.style.overflow=e?"":"hidden"};g.classList.contains("fl-builder-edit")||h(),document.addEventListener("turbolinks:render",function(e){h()});function w(e){if(!e.ok){let t="";throw e.statusText?t=e.statusText:e.status===404?t="Resource not found":t="Problem fetching resource",new Error(`${t} (${e.url})`)}return e}var _=["de","es","fr","it","ja","ko","pt","zh"];function $(){let e=document.documentElement.lang;return e&&_.includes(e)?e:""}function C(e,t=["b","br","em","i","span","strong","u"]){let r=document.createElement("div");r.textContent=e;let n=r.innerHTML,i=new RegExp(`<(/?(${t.join("|")}))>`,"gi");return n=n.replace(i,"<$1>"),n}var y,v=function(){const e=window.LinodeHeader?.env||"prod",t=$(),r=t?`${t}/`:"",n="/cloud/tech-guides-assets/js/features.json";fetch(n).then(w).then(i=>i.json()).then(i=>k(i)).catch(i=>console.log(i))},k=function(e){e.forEach(t=>{let r=document.querySelector('.c-site-header [data-featured="'+t.slot+'"]');if(!r)return;let n=x(t);if(n){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(n)}})},p=function(e){let t=document.createElement("img");return t.src=e.src,t.width=e.width,t.height=e.height,t.loading="lazy",t.fetchPriority="low",e.alt&&(t.alt=e.alt),e.srcset&&(t.srcset=e.srcset),e.sizes&&(t.sizes=e.sizes),t},x=function(e){let t=document.createElement("div"),r=document.createElement("h6"),n=document.createElement("a"),i=document.createElement("div"),c=document.createElement("div"),l=document.createElement("div"),f=document.createElement("span"),m=document.createElement("style");if(r.textContent=e.eyebrow,n.classList.add("c-featured"),n.id=`c-featured--${e.slot}`,n.href=e.link_url,n.setAttribute("style",e.wrap_styles),n.setAttribute("data-analytics-event",`${e.ga_category} | ${e.ga_action} | ${e.ga_label}`),i.classList.add("c-featured__text"),c.classList.add("c-featured__headline"),c.innerHTML=C(e.headline),l.classList.add("c-featured__excerpt"),l.innerHTML=e.excerpt,f.classList.add("c-featured__button"),f.textContent=e.link_text,m.type="text/css",m.textContent=e.css,i.appendChild(c),i.appendChild(l),i.appendChild(f),e.background_image.src){let o=p(e.background_image);o.classList.add("c-featured__background"),n.appendChild(o)}if(e.foreground_image.src){let o=p(e.foreground_image);o.classList.add("c-featured__image"),n.appendChild(o)}return n.appendChild(i),t.appendChild(r),t.appendChild(n),t.appendChild(m),t},y=document.querySelector("html");y.classList.contains("fl-builder-edit")||v(),document.addEventListener("turbolinks:render",function(e){v()});var a=document.querySelector("html"),E=function(){S()},S=function(){a.addEventListener("click",q)},q=function(e){const t=e.target.closest("[data-toggle]");if(t===null||e.target.closest("form")!==null)return;const r=t.dataset.toggle?a.querySelector(t.dataset.toggle):t;if(r===null)return;const n=e.target.closest("a");if(n)if(n===t)e.preventDefault();else{const i=new URL(n.getAttribute("href"));if(i&&i.pathname!==window.location.pathname)return;n.blur()}A(r,t)},A=function(e,t){const r=e.classList.contains("active"),n=e.dataset.group,i=n?a.querySelectorAll('[data-group="'+n+'"].active'):null,c=new CustomEvent("toggle:"+(r?"off":"on"),{bubbles:!0});i&&i.forEach(l=>l.classList.remove("active")),r?t.blur():(e.classList.add("active"),t.classList.add("active")),e.dispatchEvent(c)};a.classList.contains("fl-builder-edit")||E(),document.addEventListener("turbolinks:render",function(e){E()}),window.addEventListener("click",e=>{(e.target.matches('a[href*="#open-consent-prefs"]')||e.target.matches("span#open-consent-prefs"))&&(e.preventDefault(),typeof window.OneTrust<"u"&&window.OneTrust.ToggleInfoDisplay())})})(); diff --git a/_vendor/github.com/linode/linode-docs-theme/common-partials/dist/wordpress/footer.html b/_vendor/github.com/linode/linode-docs-theme/common-partials/dist/wordpress/footer.html index 33de4dd92bc..75c94bd697a 100644 --- a/_vendor/github.com/linode/linode-docs-theme/common-partials/dist/wordpress/footer.html +++ b/_vendor/github.com/linode/linode-docs-theme/common-partials/dist/wordpress/footer.html @@ -268,7 +268,7 @@