Skip to content

Commit

Permalink
Fixed loader
Browse files Browse the repository at this point in the history
  • Loading branch information
prokawsar committed Jul 15, 2024
1 parent 2c0c4b7 commit 7b7a131
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 28 deletions.
3 changes: 2 additions & 1 deletion src/lib/elements/Loader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
import Icon from '@iconify/svelte'
</script>

<Icon icon="svg-spinners:wind-toy" width="36px" />
<!-- <Icon icon="svg-spinners:wind-toy" width="36px" /> -->
<Icon icon="ei:spinner-3" width="44px" class="animate-spin" />
50 changes: 24 additions & 26 deletions src/routes/(app)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,33 @@

<main class="h-[100svh] flex flex-col">
{#if $navigating}
<div class="flex h-full w-full items-center justify-center">
<div
class="absolute bg-white bg-opacity-80 flex h-full w-full items-center justify-center z-10"
>
<Loader />
</div>
{:else}
<nav>
<div class="flex justify-center py-2">
<p class="text-center text-2xl text-red-600 font-semibold">Molla Printing & Packaging</p>
</div>
<div
class="w-full max-w-6xl mx-auto bg-gradient-to-r from-transparent via-orange-800/40 to-transparent p-[1px]"
/>
<div class="px-4 flex w-full mt-2">
<div
class="flex w-full flex-row justify-end gap-3 py-1 px-2 rounded border border-teal-400"
{/if}
<nav>
<div class="flex justify-center py-2">
<p class="text-center text-2xl text-red-600 font-semibold">Molla Printing & Packaging</p>
</div>
<div
class="w-full max-w-6xl mx-auto bg-gradient-to-r from-transparent via-orange-800/40 to-transparent p-[1px]"
/>
<div class="px-4 flex w-full mt-2">
<div class="flex w-full flex-row justify-end gap-3 py-1 px-2 rounded border border-teal-400">
<a href="/history" class:hidden={$page.url.pathname == '/history'} class="h-full">History</a
>
<a href="/history" class:hidden={$page.url.pathname == '/history'} class="h-full"
>History</a
>
<a href="/" class:!block={$page.url.pathname == '/history'} class="hidden h-full">Home</a>
</div>
<a href="/" class:!block={$page.url.pathname == '/history'} class="hidden h-full">Home</a>
</div>
</nav>
<slot />

<div class="absolute bottom-0 w-full">
<p class="text-center text-gray-400">
&#x1F4BB;Developed by <a href="https://github.com/prokawsar" target="_blank">ProKawsar</a
>&#x1F60E;
</p>
</div>
{/if}
</nav>
<slot />

<div class="absolute bottom-0 w-full">
<p class="text-center text-gray-400">
&#x1F4BB;Developed by <a href="https://github.com/prokawsar" target="_blank">ProKawsar</a
>&#x1F60E;
</p>
</div>
</main>
2 changes: 1 addition & 1 deletion src/routes/(app)/history/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</div>
<div class="w-full bg-gradient-to-r from-transparent via-slate-600/10 to-transparent p-[1px]" />
<div class="flex flex-col w-full justify-between gap-4 h-[80%] items-center">
<div class="relative flex flex-col h-full gap-2 overflow-y-auto w-full max-w-3xl py-2">
<div class="relative flex flex-col h-full gap-2 overflow-y-auto w-full max-w-3xl py-2 z-0">
{#if !isLoading}
{#if data.histories.length}
{#each data.histories as { name, id, final_price, created_at }}
Expand Down

0 comments on commit 7b7a131

Please sign in to comment.