Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

fix: april fools

Maya438f91aa0c7a
diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts
deleted file mode 100644
index 7e476c0..0000000
--- a/src/routes/+layout.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export const load = () => {
- const isAprilFools =
- new Date().getDate() === 1 && new Date().getMonth() === 3;
- return { isAprilFools };
-};
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 5b6e669..c040f30 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -26,8 +26,9 @@
import { m } from "$lib/paraglide/messages.js";
import { log } from "$lib/util/logger.js";
- let { children, data } = $props();
+ let { children } = $props();
let enablePlausible = $state(false);
+ let isAprilFools = $state(false);
let scrollPositions = new Map<string, number>();
@@ -67,6 +68,9 @@
};
onMount(() => {
+ const now = new Date();
+ isAprilFools = now.getDate() === 1 && now.getMonth() === 3;
+
initAnimStores();
const handleResize = () => {
@@ -166,7 +170,7 @@
src="{PUB_PLAUSIBLE_URL}/js/script.js"
></script>
{/if}
- {#if data.isAprilFools}
+ {#if isAprilFools}
<style>
* {
font-family: "Comic Sans MS", "Comic Sans", cursive !important;