Skip to content

Commit

Permalink
Update Page Title
Browse files Browse the repository at this point in the history
  • Loading branch information
Loudbooks committed Dec 6, 2024
1 parent faffc48 commit 0c1f695
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion frontend/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
rel="stylesheet"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>PasteBook</title>
<meta name="theme-color" content="#F4537C" />
%sveltekit.head%
</head>
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<script lang="ts">
import Toolbar from "../components/Toolbar.svelte";
import { title, description } from "$lib/stores";
import { onMount } from "svelte";
let { data }: { data: PageData } = $props();
const newTitle = data.title || 'PasteBook';
const newDescription = data.description || 'PasteBook is an aesthetic, effortless way to share your blocks of text, and respects your privacy by automatically deleting your pastes.';
title.set(newTitle);
description.set(newDescription);
onMount(() => {
document.title = newTitle;
});
</script>

<main>
Expand Down

0 comments on commit 0c1f695

Please sign in to comment.