mirror of
https://github.com/xHyroM/website.git
synced 2024-12-22 12:31:06 +01:00
feat: snow
This commit is contained in:
parent
9820ffbc05
commit
415e75c376
2 changed files with 4 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import SEOEmbed from "@components/widgets/SEOEmbed.astro";
|
import SEOEmbed from "@components/widgets/SEOEmbed.astro";
|
||||||
|
import Snow from "~/components/widgets/decorations/Snow.astro";
|
||||||
|
|
||||||
const { title, description, keywords, schemaOrg } = {
|
const { title, description, keywords, schemaOrg } = {
|
||||||
title: "xHyroM",
|
title: "xHyroM",
|
||||||
|
@ -59,6 +60,7 @@ const { title, description, keywords, schemaOrg } = {
|
||||||
</head>
|
</head>
|
||||||
<body class="overflow-x-hidden bg-dark-900 font-sans">
|
<body class="overflow-x-hidden bg-dark-900 font-sans">
|
||||||
<slot />
|
<slot />
|
||||||
|
<Snow />
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import "@scripts/menu.ts";
|
import "@scripts/menu.ts";
|
||||||
|
|
|
@ -15,7 +15,8 @@ class SnowStorm {
|
||||||
constructor() {
|
constructor() {
|
||||||
// --- common properties ---
|
// --- 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.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.flakesMax = 128; // Limit total amount of snow made (falling + sticking)
|
||||||
this.flakesMaxActive = 64; // Limit amount of snow falling at once (less = lower CPU use)
|
this.flakesMaxActive = 64; // Limit amount of snow falling at once (less = lower CPU use)
|
||||||
|
|
Loading…
Reference in a new issue