feat: snow

This commit is contained in:
Jozef Steinhübl 2024-12-01 18:41:52 +01:00
parent 9820ffbc05
commit 415e75c376
No known key found for this signature in database
GPG key ID: E6BC90C91973B08F
2 changed files with 4 additions and 1 deletions

View file

@ -18,6 +18,7 @@
*/
import SEOEmbed from "@components/widgets/SEOEmbed.astro";
import Snow from "~/components/widgets/decorations/Snow.astro";
const { title, description, keywords, schemaOrg } = {
title: "xHyroM",
@ -59,6 +60,7 @@ const { title, description, keywords, schemaOrg } = {
</head>
<body class="overflow-x-hidden bg-dark-900 font-sans">
<slot />
<Snow />
<script>
import "@scripts/menu.ts";

View file

@ -15,7 +15,8 @@ class SnowStorm {
constructor() {
// --- common properties ---
this.autoStart = true; // Whether the snow should start automatically or not.
var currentDate = new Date();
this.autoStart = currentDate.getMonth() < 3 || currentDate.getMonth() == 11; // Whether the snow should start automatically or not.
this.excludeMobile = true; // Snow is likely to be bad news for mobile phones' CPUs (and batteries.) Enable at your own risk.
this.flakesMax = 128; // Limit total amount of snow made (falling + sticking)
this.flakesMaxActive = 64; // Limit amount of snow falling at once (less = lower CPU use)