From 7be05ec093014fd8329bf925d6e5f5623a5fce23 Mon Sep 17 00:00:00 2001 From: AngeloChecked Date: Thu, 10 Oct 2024 20:16:48 +0200 Subject: [PATCH] better ga --- blog/components/Base.ts | 98 ++++++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 45 deletions(-) diff --git a/blog/components/Base.ts b/blog/components/Base.ts index eb6feaf..b45512c 100644 --- a/blog/components/Base.ts +++ b/blog/components/Base.ts @@ -16,73 +16,81 @@ type BaseProps = { site: { domain: string }; }; -export const Base = (props: BaseProps) => - html` +export const Base = (props: BaseProps) => html` - - - - ${ - !props.page?.relativeWebsitePath ? "" : ` + + + + ${!props.page?.relativeWebsitePath + ? "" + : ` - ` - } - - + `} + + - - - - ${ - !props.page?.data?.thumbnail?.src ? "" : ` + + + + ${!props.page?.data?.thumbnail?.src + ? "" + : ` - ` - } - + `} + - ${ - props.keywords - ? `` - : "" - } + ${props.keywords + ? `` + : ""} ${props.author ? ` ` : ""} ${props.title} - ${props.scripts ?? ""} - ${props.style ?? ""} - ${ props.content.includes("lite-youtube") ? `` : ""} - + ${props.scripts ?? ""} ${props.style ?? ""} + ${props.content.includes("lite-youtube") + ? `` + : ""} + - + + - ${googleTagManagerScript()} + - ${props.menu} -
- ${props.content} -
+ ${googleTagManagerScript()} ${props.menu} +
${props.content}
${props.footer} - ${ props.content.includes("lite-youtube") ? '' : ""} + ${props.content.includes("lite-youtube") + ? '' + : ""} `; function googleTagManagerScript() { return html` - - - -`; + + + + `; }