_layout.svelte 685 B

123456789101112131415161718192021222324
  1. <script lang="typescript">
  2. // @ts-ignore -- generated package
  3. import { stores } from "@sapper/app"; // eslint-disable-line import/no-unresolved
  4. // You may not want to use `segment`, but it is passed for the time being and will
  5. // create a warning if not expected: https://github.com/sveltejs/sapper-template/issues/210
  6. // https://github.com/sveltejs/sapper/issues/824
  7. export let segment: string = "";
  8. // Silence unused export property warning
  9. if (segment) {};
  10. const { page } = stores();
  11. let path: string;
  12. $: path = $page.path.slice(1);
  13. </script>
  14. <svelte:head>
  15. <title>
  16. {path ? path.charAt(0).toUpperCase() + path.slice(1) : "Index"}
  17. </title>
  18. </svelte:head>
  19. <slot />