mirror of https://github.com/VERT-sh/VERT.git
huuuhhh
This commit is contained in:
parent
156bc89073
commit
02cf3d8d41
|
@ -16,6 +16,9 @@ class Theme {
|
||||||
expires: 2147483647,
|
expires: 2147483647,
|
||||||
});
|
});
|
||||||
log(["theme"], `set to ${this.dark ? "dark" : "light"}`);
|
log(["theme"], `set to ${this.dark ? "dark" : "light"}`);
|
||||||
|
window.plausible("Theme set", {
|
||||||
|
props: { theme: theme.dark ? "dark" : "light" },
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,6 @@
|
||||||
{#if PUB_PLAUSIBLE_URL}<script
|
{#if PUB_PLAUSIBLE_URL}<script
|
||||||
defer
|
defer
|
||||||
data-domain={PUB_HOSTNAME || "vert.sh"}
|
data-domain={PUB_HOSTNAME || "vert.sh"}
|
||||||
event-Theme={theme.dark ? "dark" : "light"}
|
|
||||||
src="{PUB_PLAUSIBLE_URL}/js/script.pageview-props.tagged-events.js"
|
src="{PUB_PLAUSIBLE_URL}/js/script.pageview-props.tagged-events.js"
|
||||||
></script>{/if}
|
></script>{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
|
@ -16,5 +16,8 @@ export const load = ({ data }) => {
|
||||||
theme.dark = themeStr === "dark";
|
theme.dark = themeStr === "dark";
|
||||||
}
|
}
|
||||||
theme.dark = JSCookie.get("theme") === "dark";
|
theme.dark = JSCookie.get("theme") === "dark";
|
||||||
|
window.plausible("Theme set", {
|
||||||
|
props: { theme: theme.dark ? "dark" : "light" },
|
||||||
|
});
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue