Update +page.svelte

This commit is contained in:
freearhey 2023-09-18 19:41:02 +03:00
parent 156dd81f26
commit 3bf37aa123

View file

@ -91,57 +91,54 @@
let scrollTop = 0 let scrollTop = 0
</script> </script>
<svelte:window bind:scrollY="{scrollTop}" /> <svelte:window bind:scrollY={scrollTop} />
<svelte:head> <svelte:head>
<title>iptv-org</title> <title>iptv-org</title>
<meta name="description" content="Collection of resources dedicated to IPTV" /> <meta name="description" content="Collection of resources dedicated to IPTV" />
</svelte:head> </svelte:head>
<header <header
class:absolute="{scrollTop <= 150}" class:absolute={scrollTop <= 150}
class:fixed="{scrollTop > 150}" class:fixed={scrollTop > 150}
class="z-40 w-full min-w-[360px] flex items-center" class="z-40 w-full min-w-[360px] flex items-center"
style="top: {scrollTop > 150 && scrollTop <= 210 ? scrollTop-210: 0}px" style="top: {scrollTop > 150 && scrollTop <= 210 ? scrollTop - 210 : 0}px"
> >
<NavBar withSearch="{scrollTop > 150}" /> <NavBar withSearch={scrollTop > 150} />
</header> </header>
<main class="bg-slate-50 dark:bg-[#1d232e] min-h-screen min-w-[360px]"> <main class="bg-slate-50 dark:bg-[#1d232e] min-h-screen min-w-[360px]">
<Modal <Modal
unstyled="{true}" unstyled={true}
classBg="fixed top-0 left-0 z-40 w-screen h-screen flex flex-col bg-black/[.7] overflow-y-scroll" classBg="fixed top-0 left-0 z-40 w-screen h-screen flex flex-col bg-black/[.7] overflow-y-auto"
closeButton="{false}" closeButton={false}
> >
<section class="max-w-5xl mx-auto px-2 pt-24 sm:pt-32 pb-20 overflow-hidden"> <section class="max-w-5xl mx-auto px-2 pt-24 sm:pt-32 pb-20 overflow-hidden">
<SearchField <SearchField bind:isLoading bind:found={$filteredChannels.length}></SearchField>
bind:isLoading="{isLoading}"
bind:found="{$filteredChannels.length}"
></SearchField>
{#if isLoading} {#if isLoading}
<div <div
class="flex items-center justify-center w-full pt-1 pb-6 tracking-tight text-sm text-gray-500 dark:text-gray-400 font-mono" class="flex items-center justify-center w-full pt-1 pb-6 tracking-tight text-sm text-gray-500 dark:text-gray-400 font-mono"
> >
loading... loading...
</div> </div>
{/if} {#each visible as country (country.code)} {#if grouped[country.code] && {/if}
grouped[country.code].length > 0} {#each visible as country (country.code)}
<CountryItem {#if grouped[country.code] && grouped[country.code].length > 0}
bind:country="{country}" <CountryItem bind:country bind:channels={grouped[country.code]} bind:hasQuery={$hasQuery}
bind:channels="{grouped[country.code]}" ></CountryItem>
bind:hasQuery="{$hasQuery}" {/if}
></CountryItem> {/each}
{/if} {/each} {#if !isLoading} {#if !isLoading}
<InfiniteLoading on:infinite="{loadMore}" identifier="{infiniteId}" distance="{500}"> <InfiniteLoading on:infinite={loadMore} identifier={infiniteId} distance={500}>
<div slot="noResults"></div> <div slot="noResults"></div>
<div slot="noMore"></div> <div slot="noMore"></div>
<div slot="error"></div> <div slot="error"></div>
<div slot="spinner"></div> <div slot="spinner"></div>
</InfiniteLoading> </InfiniteLoading>
{/if} {/if}
</section> </section>
</Modal> </Modal>
</main> </main>
{#if $downloadMode} {#if $downloadMode}
<BottomBar /> <BottomBar />
{/if} {/if}