Skip to content

Commit

Permalink
Attempt 2
Browse files Browse the repository at this point in the history
not working 🫤
  • Loading branch information
Lamparter committed Dec 7, 2024
1 parent 6fc04cb commit c6edf28
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
8 changes: 8 additions & 0 deletions src/data/minimalism.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { onMount } from "svelte";

export let minimal = false;

onMount(() => {
const params = new URLSearchParams(window.location.search);
minimal = params.has("minimal");
});
9 changes: 2 additions & 7 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import { links, type NavbarItem } from "$data/links";
import { _ } from "svelte-i18n";
import { minimal } from "$data/minimalism";
import "fluent-svelte/theme.css";
import Chat from "~icons/fluent/chat-24-regular";
Expand Down Expand Up @@ -68,13 +70,6 @@
});
});
});
let minimal = false;
onMount(() => {
const params = new URLSearchParams(window.location.search);
minimal = params.has("minimal");
});
</script>

<svelte:head>
Expand Down
9 changes: 1 addition & 8 deletions src/routes/blog/posts/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { defaultI18nValues, externalLink, Metadata } from "$lib";
import { onMount } from "svelte";
import { minimal } from "$data/minimalism";
import { _ } from "svelte-i18n";
import Share from "~icons/fluent/share-24-regular";
import ArrowLeft from "~icons/fluent/arrow-left-24-regular";
Expand All @@ -13,13 +13,6 @@
$: ({ title, thumbnail, author, description, date, slug } = data);
$: pageTitle = title;
let minimal = false;
onMount(() => {
const params = new URLSearchParams(window.location.search);
minimal = params.has("minimal");
});
</script>

<Metadata
Expand Down

0 comments on commit c6edf28

Please sign in to comment.