feat: add page title

This commit is contained in:
madkarmaa 2025-04-05 12:35:52 +02:00
parent 997a226e4a
commit 70af4e501c
7 changed files with 52 additions and 2 deletions

View File

@ -3,10 +3,18 @@
import NavBar from '$components/organisms/NavBar.svelte';
import Footer from '$components/organisms/Footer.svelte';
type Props = { children: Snippet };
let { children }: Props = $props();
type Props = { title?: string; children: Snippet };
let { title, children }: Props = $props();
</script>
<svelte:head>
{#if title}
<title>ReVanced - {title.trim()}</title>
{:else}
<title>ReVanced</title>
{/if}
</svelte:head>
<main>
<NavBar />
{@render children()}

View File

@ -0,0 +1,7 @@
<script lang="ts">
import Page from '$components/templates/Page.svelte';
</script>
<Page>
<h1>Home</h1>
</Page>

View File

@ -0,0 +1,7 @@
<script lang="ts">
import Page from '$components/templates/Page.svelte';
</script>
<Page title="Announcements">
<h1>Announcements</h1>
</Page>

View File

@ -0,0 +1,7 @@
<script lang="ts">
import Page from '$components/templates/Page.svelte';
</script>
<Page title="Contributors of ReVanced">
<h1>Contributors</h1>
</Page>

View File

@ -0,0 +1,7 @@
<script lang="ts">
import Page from '$components/templates/Page.svelte';
</script>
<Page title="Donate to ReVanced">
<h1>Donate</h1>
</Page>

View File

@ -0,0 +1,7 @@
<script lang="ts">
import Page from '$components/templates/Page.svelte';
</script>
<Page title="Download ReVanced">
<h1>Download</h1>
</Page>

View File

@ -0,0 +1,7 @@
<script lang="ts">
import Page from '$components/templates/Page.svelte';
</script>
<Page title="Patches for ReVanced">
<h1>Patches</h1>
</Page>