_layout.svelte 451 B

1234567891011121314151617181920
  1. <script lang="typescript">
  2. import { stores } from "@sapper/app";
  3. // You may not want to use `segment`, but it is passed for the time being and will
  4. // https://github.com/sveltejs/sapper/issues/824
  5. export let segment: string = "";
  6. const { page } = stores();
  7. let path: string;
  8. $: path = $page.path.slice(1);
  9. </script>
  10. <svelte:head>
  11. <title>
  12. {path ? path.charAt(0).toUpperCase() + path.slice(1) : "Index"}
  13. </title>
  14. </svelte:head>
  15. <slot />