Skip to content

Commit

Permalink
Changed the screen UI height flow
Browse files Browse the repository at this point in the history
Removed the "h-screen" from the DIV holding the (button, Login and progress) which removed the default extra screen scroll.

Added a parent DIV to hold both the Logo and the DIV holding the (button, Login and progress) with class="py-10 space-y-20 h-full". The h-full is to allow the page height to flow with more items to be added. More items added will make the page scrollable. The "space-y-20" is to give a decent space between the logo and the button container/DIV

For the DIV holding the (button, Login and progress), I moved it into another DIV with class="py-20" to make the space distinct.
  • Loading branch information
umeklinks authored Jun 22, 2022
1 parent 55b1da2 commit da3b262
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions src/frontend/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,28 +62,32 @@
<Menu />

<!-- svelte-ignore a11y-missing-attribute -->
<div class="flex items-center justify-center">
<img src={Logo} class="w-1/2 h-auto" />
</div>
<div class="py-10 space-y-20 h-full">
<div class="flex items-center justify-center">
<img src={Logo} class="w-1/2 h-auto" />
</div>

<div class="flex justify-center items-center h-screen">
{#if !userIsAuthorized}
<a href={REDIRECT_URL}>
<button class="btn">authenticate via discord</button>
</a>
{/if}
{#if !$store.isAuthed && userIsAuthorized}
<Login />
{:else if $store.isAuthed && userIsAuthorized}
<div class="flex flex-col items-center justify-center">
{#if verifyingUser}
<progress class="progress w-56" />
<div>verifying user ...</div>
{:else if error}
<div>an error occured, please try again</div>
{:else}
<div>you can close this page now</div>
<div class="py-20">
<div class="flex justify-center items-center py-20">
{#if !userIsAuthorized}
<a href={REDIRECT_URL}>
<button class="btn rounded-xl">authenticate via discord</button>
</a>
{/if}
{#if !$store.isAuthed && userIsAuthorized}
<Login />
{:else if $store.isAuthed && userIsAuthorized}
<div class="flex flex-col items-center justify-center">
{#if verifyingUser}
<progress class="progress w-56" />
<div>verifying user ...</div>
{:else if error}
<div>an error occured, please try again</div>
{:else}
<div>you can close this page now</div>
{/if}
</div>
{/if}
</div>
{/if}
</div>
</div>

1 comment on commit da3b262

@letmejustputthishere
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want you can open a PR on the repo to merge this? :)

Please sign in to comment.