fix: april fools

this didn't work last year lmao
This commit is contained in:
Maya 2026-04-01 10:59:30 +03:00
parent 9154213868
commit 438f91aa0c
2 changed files with 6 additions and 7 deletions

View File

@ -1,5 +0,0 @@
export const load = () => {
const isAprilFools =
new Date().getDate() === 1 && new Date().getMonth() === 3;
return { isAprilFools };
};

View File

@ -26,8 +26,9 @@
import { m } from "$lib/paraglide/messages.js"; import { m } from "$lib/paraglide/messages.js";
import { log } from "$lib/util/logger.js"; import { log } from "$lib/util/logger.js";
let { children, data } = $props(); let { children } = $props();
let enablePlausible = $state(false); let enablePlausible = $state(false);
let isAprilFools = $state(false);
let scrollPositions = new Map<string, number>(); let scrollPositions = new Map<string, number>();
@ -67,6 +68,9 @@
}; };
onMount(() => { onMount(() => {
const now = new Date();
isAprilFools = now.getDate() === 1 && now.getMonth() === 3;
initAnimStores(); initAnimStores();
const handleResize = () => { const handleResize = () => {
@ -166,7 +170,7 @@
src="{PUB_PLAUSIBLE_URL}/js/script.js" src="{PUB_PLAUSIBLE_URL}/js/script.js"
></script> ></script>
{/if} {/if}
{#if data.isAprilFools} {#if isAprilFools}
<style> <style>
* { * {
font-family: "Comic Sans MS", "Comic Sans", cursive !important; font-family: "Comic Sans MS", "Comic Sans", cursive !important;