aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/LandingHeader.svelte
blob: 5faebb59b9fcb5f0f96a4a3da22f3682e926c320 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<script>
	import { goto } from '$app/navigation';
	import { scroll } from '$lib/utils';
	import { Icon } from '$comp';

  import { _, locale, locales } from 'svelte-i18n';

	export let howItWorks;
	export let faq;
</script>

<header class="w-full lg:w-5/6 pt-10 mx-auto">
	<nav class="block xl:flex flex-wrap justify-between items-center">
		<a href="/">
			<Icon icon="logo" style="mx-auto mb-5 xl:mb-0" />
		</a>

    <select bind:value={$locale}>
      {#each $locales as locale}
        <option value={locale}>{locale}</option>
      {/each}
    </select>

		<div class="hidden space-x-10 md:flex flex-wrap justify-center items-center font-bold">
			<button on:click={() => scroll(howItWorks)}>{$_('howItWorks')}</button>
			<button on:click={() => scroll(faq)}>{$_('FAQ')}</button>
			<button>{$_('about')}</button>
			<button class="border rounded-full px-6 py-2 font-bold" on:click={() => goto('/register')}
				>{$_('startInSeconds')}</button
			>
			<button
				class="bg-black text-white border rounded-full px-6 py-2 font-bold"
				on:click={() => goto('/login')}
			>
        {$_('signIn')}
			</button>
		</div>
	</nav>
</header>