From b9f0e05755d4019eb548557b5beac1eeaba2fc19 Mon Sep 17 00:00:00 2001 From: EETagent Date: Mon, 21 Nov 2022 13:21:26 +0100 Subject: [PATCH] feat: add pagination to registration --- frontend/src/routes/register/+page.svelte | 55 +++++++++-------------- 1 file changed, 21 insertions(+), 34 deletions(-) diff --git a/frontend/src/routes/register/+page.svelte b/frontend/src/routes/register/+page.svelte index 5e38d90..30965ca 100644 --- a/frontend/src/routes/register/+page.svelte +++ b/frontend/src/routes/register/+page.svelte @@ -14,6 +14,7 @@ } }; + const pageCount = 3; let pageIndex = 0; @@ -61,13 +62,6 @@ - - {/if} {#if pageIndex === 1}

Něco o tobě

@@ -100,12 +94,6 @@ - {/if} {#if pageIndex === 2}

Už jen kousek!

@@ -117,13 +105,6 @@ - - {/if} {#if pageIndex === 3}

Poslední krok

@@ -131,10 +112,8 @@ Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Fusce suscipit libero eget elit.

- -
- ssj -
+ +
ssj
@@ -144,19 +123,24 @@
- {/if} + { + if (pageIndex === pageCount) { + //TODO: Submit + } else { + pageIndex++; + } + }} + class="w-full mt-8 md:w-3/5 p-3 rounded-lg font-semibold text-xl transition-colors duration-300 bg-sspsBlue hover:bg-sspsBlueDark text-white" + type="submit" + value={pageIndex === pageCount ? 'Odeslat' : 'Pokračovat'} + />
- - - - + {#each Array(pageCount + 1) as _, i} + + {/each}
@@ -167,4 +151,7 @@ @apply mx-auto w-[90%] h-full; @apply items-center justify-center; } + .dotActive { + @apply bg-sspsBlue; + }