diff --git a/src/components/Head.astro b/src/components/Head.astro index 07f466e..88fac47 100644 --- a/src/components/Head.astro +++ b/src/components/Head.astro @@ -14,46 +14,74 @@ const canonicalImageSrc = new URL(imageSrc, Astro.site); - - - - - - - - - - - - + + + + @@ -77,14 +105,74 @@ window.addEventListener("load", function(){ }); + + (function () { + var loaded = false; + var chatRequested = false; + + function loadIntercom(isAccepted) { + if (loaded || !isAccepted('functional')) return; + loaded = true; + + window.intercomSettings = { + api_base: 'https://api-iam.intercom.io', + app_id: 'yyljw8tl' + }; + + var w = window; + var ic = w.Intercom; + if (typeof ic === 'function') { + ic('reattach_activator'); + ic('update', w.intercomSettings); + } else { + var d = document; + var i = function () { + i.c(arguments); + }; + i.q = []; + i.c = function (args) { + i.q.push(args); + }; + w.Intercom = i; + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://widget.intercom.io/widget/yyljw8tl'; + var x = d.getElementsByTagName('script')[0]; + x.parentNode.insertBefore(s, x); + } + // The visitor allowed chat from a chat link, so open it. + if (chatRequested) w.Intercom('show'); + } - diff --git a/src/components/SkipLink.astro b/src/components/SkipLink.astro index 1af7f67..220ba9d 100644 --- a/src/components/SkipLink.astro +++ b/src/components/SkipLink.astro @@ -3,10 +3,6 @@ import type { Props } from '@astrojs/starlight/props'; const PAGE_TITLE_ID = '_top'; --- - - - {Astro.locals.t('skipLink.label')}