mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web: add dynamic page titles
This commit is contained in:
parent
7b289bfb16
commit
635561394c
5 changed files with 30 additions and 0 deletions
|
@ -3,6 +3,10 @@
|
||||||
import MeowbaltLoaf from "$components/meowbalt/MeowbaltLoaf.svelte";
|
import MeowbaltLoaf from "$components/meowbalt/MeowbaltLoaf.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>cobalt</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
<div id="cobalt-save-container" class="center-column-container">
|
<div id="cobalt-save-container" class="center-column-container">
|
||||||
<main id="cobalt-save">
|
<main id="cobalt-save">
|
||||||
<MeowbaltLoaf />
|
<MeowbaltLoaf />
|
||||||
|
|
|
@ -2,4 +2,10 @@
|
||||||
import Placeholder from "$components/misc/Placeholder.svelte";
|
import Placeholder from "$components/misc/Placeholder.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>
|
||||||
|
cobalt: about
|
||||||
|
</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
<Placeholder pageName="about" />
|
<Placeholder pageName="about" />
|
||||||
|
|
|
@ -2,4 +2,10 @@
|
||||||
import Placeholder from "$components/misc/Placeholder.svelte";
|
import Placeholder from "$components/misc/Placeholder.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>
|
||||||
|
cobalt: donate
|
||||||
|
</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
<Placeholder pageName="donate" />
|
<Placeholder pageName="donate" />
|
||||||
|
|
|
@ -15,11 +15,19 @@
|
||||||
let screenWidth: number;
|
let screenWidth: number;
|
||||||
|
|
||||||
$: currentPageTitle = $page.url.pathname.split("/").at(-1);
|
$: currentPageTitle = $page.url.pathname.split("/").at(-1);
|
||||||
|
$: stringPageTitle =
|
||||||
|
currentPageTitle !== "settings" ? `/ ${currentPageTitle}` : "";
|
||||||
|
|
||||||
$: isMobile = screenWidth <= 750;
|
$: isMobile = screenWidth <= 750;
|
||||||
$: isHome = $page.url.pathname === `/settings`;
|
$: isHome = $page.url.pathname === `/settings`;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>
|
||||||
|
cobalt: settings {stringPageTitle}
|
||||||
|
</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
<svelte:window bind:innerWidth={screenWidth} />
|
<svelte:window bind:innerWidth={screenWidth} />
|
||||||
|
|
||||||
<div id="settings-page">
|
<div id="settings-page">
|
||||||
|
|
|
@ -2,4 +2,10 @@
|
||||||
import Placeholder from "$components/misc/Placeholder.svelte";
|
import Placeholder from "$components/misc/Placeholder.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>
|
||||||
|
cobalt: updates
|
||||||
|
</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
<Placeholder pageName="updates" />
|
<Placeholder pageName="updates" />
|
||||||
|
|
Loading…
Reference in a new issue