Объединил логику изменения заголовка страницы в +layout.svelte
This commit is contained in:
parent
454c52916f
commit
32387791d4
10 changed files with 26 additions and 20 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import '$src/app.css';
|
import '$src/app.css';
|
||||||
|
import { page } from '$app/state';
|
||||||
// import '../syntax-highlight.css'; // https://github.com/PrismJS/prism-themes
|
// import '../syntax-highlight.css'; // https://github.com/PrismJS/prism-themes
|
||||||
import NavBar from '$lib/components/NavBar.svelte';
|
import NavBar from '$lib/components/NavBar.svelte';
|
||||||
|
|
||||||
|
|
@ -13,11 +14,15 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
{#if page.data.title !== undefined}
|
||||||
|
<title>{page.data.title} — Tea Sanctuary</title>
|
||||||
|
<meta property="og:title" content="{page.data.title} — Tea Sanctuary" />
|
||||||
|
{:else}
|
||||||
|
<title>Tea Sanctuary</title>
|
||||||
<meta property="og:title" content="Tea Sanctuary" />
|
<meta property="og:title" content="Tea Sanctuary" />
|
||||||
|
{/if}
|
||||||
<meta property="og:image" content="https://teasanctuary.ru/common/logo.png" />
|
<meta property="og:image" content="https://teasanctuary.ru/common/logo.png" />
|
||||||
<meta property="og:description" content="Делаем вещи как можем." />
|
<meta property="og:description" content="Делаем вещи как можем." />
|
||||||
|
|
||||||
<title>Tea Sanctuary</title>
|
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="flex h-screen w-screen flex-row portrait:flex-col-reverse">
|
<div class="flex h-screen w-screen flex-row portrait:flex-col-reverse">
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,12 @@
|
||||||
<section id="how-can-you-contact-us">
|
<section id="how-can-you-contact-us">
|
||||||
<h1>Как с вами связаться?</h1>
|
<h1>Как с вами связаться?</h1>
|
||||||
<div class="text-justify">
|
<div class="text-justify">
|
||||||
TODO: <SocialHyperlink href="/contact">контакты</SocialHyperlink>.
|
Общие вопросы можно задавать в <SocialHyperlink href={PUBLIC_TS_DISCORD}>сообществе Tea Sanctuary</SocialHyperlink>.
|
||||||
|
Там же можете написать личное сообщение администраторам.
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="text-justify">
|
||||||
|
Наши соцсети и почту для более важных обращений можно найти на странице <SocialHyperlink href="/contact">Контакты</SocialHyperlink>.
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
3
src/routes/+page.ts
Normal file
3
src/routes/+page.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
export async function load() {
|
||||||
|
return { title: undefined };
|
||||||
|
}
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
import SocialButton from '$lib/components/SocialButton.svelte';
|
import SocialButton from '$lib/components/SocialButton.svelte';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>Блог — Tea Sanctuary</title>
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<section
|
<section
|
||||||
class="flex shrink-0 flex-col items-center justify-center gap-5 overflow-hidden p-4 hero-background"
|
class="flex shrink-0 flex-col items-center justify-center gap-5 overflow-hidden p-4 hero-background"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
import SocialButton from '$lib/components/SocialButton.svelte';
|
import SocialButton from '$lib/components/SocialButton.svelte';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>Контакты — Tea Sanctuary</title>
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<section
|
<section
|
||||||
class="flex shrink-0 flex-col items-center justify-center gap-5 overflow-hidden p-4 hero-background"
|
class="flex shrink-0 flex-col items-center justify-center gap-5 overflow-hidden p-4 hero-background"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
3
src/routes/contact/+page.ts
Normal file
3
src/routes/contact/+page.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
export async function load() {
|
||||||
|
return { title: "Контакты" };
|
||||||
|
}
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
import SocialButton from '$lib/components/SocialButton.svelte';
|
import SocialButton from '$lib/components/SocialButton.svelte';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>Проекты — Tea Sanctuary</title>
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<section
|
<section
|
||||||
class="flex shrink-0 flex-col items-center justify-center gap-5 overflow-hidden p-4 hero-background"
|
class="flex shrink-0 flex-col items-center justify-center gap-5 overflow-hidden p-4 hero-background"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
3
src/routes/projects/+page.ts
Normal file
3
src/routes/projects/+page.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
export async function load() {
|
||||||
|
return { title: "Проекты" };
|
||||||
|
}
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
import SocialButton from '$lib/components/SocialButton.svelte';
|
import SocialButton from '$lib/components/SocialButton.svelte';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>Команда — Tea Sanctuary</title>
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<section
|
<section
|
||||||
class="flex shrink-0 flex-col items-center justify-center gap-5 overflow-hidden p-4 hero-background"
|
class="flex shrink-0 flex-col items-center justify-center gap-5 overflow-hidden p-4 hero-background"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
3
src/routes/team/+page.ts
Normal file
3
src/routes/team/+page.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
export async function load() {
|
||||||
|
return { title: "Команда" };
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue