Revela-v4/src/components/WelcomeLogging.astro

17 lines
1.2 KiB
Text

<script>
const primaryColor = "#8c25fa";
const secondaryColor = "#601aab";
console.log("%cWelcome to Alu", `color: ${primaryColor}; font-size: 2rem; font-weight: bold; text-shadow: 2px 2px 0 ${secondaryColor};`);
console.log("%cSystem Information: ", `color: ${primaryColor}; font-size: 1rem; font-weight: bold;`);
console.log("%cOS: " + navigator.platform, `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
console.log("%cBrowser: " + navigator.userAgent, `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
console.log("%cCPU Cores: " + navigator.hardwareConcurrency, `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
// Cmon firefox, do we really not support this?? Basic stuff here from the "indie browser".
if (!navigator.userAgent.includes("Firefox")) {
console.log("%cMemory: " + (navigator as any).deviceMemory + "GB", `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
} else {
console.log("%cMemory: Not supported in Firefox", `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
}
console.log("%cPlease include this information in a bug report!", `color: ${primaryColor}; font-size: 0.75rem; font-weight: bold;`);
</script>