design: redesign pageination
This commit is contained in:
4 files changed
+32
-30
No files matched your search
+17
-14
@@ -5,6 +5,7 @@
|
||||
import ViewSelect from '$lib/components/lemmy/dropdowns/ViewSelect.svelte'
|
||||
import PostFeed from '$lib/components/lemmy/post/feed/PostFeed.svelte'
|
||||
import VirtualFeed from '$lib/components/lemmy/post/feed/VirtualFeed.svelte'
|
||||
import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||
import { t } from '$lib/i18n/translations.js'
|
||||
@@ -65,20 +66,22 @@
|
||||
this={settings.infiniteScroll && !settings.posts.noVirtualize
|
||||
? 'noscript'
|
||||
: 'div'}
|
||||
class="mt-auto"
|
||||
class="mt-auto flex flex-col"
|
||||
>
|
||||
<Pageination
|
||||
cursor={{ next: data.feed.value.cursor.next }}
|
||||
href={page =>
|
||||
typeof page == 'number' ? `?page=${page}` : `?cursor=${page}`}
|
||||
back={false}
|
||||
>
|
||||
<span class="flex flex-row items-center gap-1">
|
||||
<Icon src={ChartBar} size="16" mini />
|
||||
{$t('routes.frontpage.footer', {
|
||||
users: site.data?.site_view?.counts?.users_active_day ?? '??',
|
||||
})}
|
||||
</span>
|
||||
</Pageination>
|
||||
<EndPlaceholder>
|
||||
<Icon src={ChartBar} size="16" mini />
|
||||
|
||||
{$t('routes.frontpage.footer', {
|
||||
users: site.data?.site_view?.counts?.users_active_day ?? '??',
|
||||
})}
|
||||
{#snippet action()}
|
||||
<Pageination
|
||||
cursor={{ next: data.feed.value.cursor.next }}
|
||||
href={page =>
|
||||
typeof page == 'number' ? `?page=${page}` : `?cursor=${page}`}
|
||||
back={false}
|
||||
/>
|
||||
{/snippet}
|
||||
</EndPlaceholder>
|
||||
</svelte:element>
|
||||
</div>
|
||||
@@ -17,6 +17,7 @@
|
||||
import { expoOut } from 'svelte/easing'
|
||||
import { fly } from 'svelte/transition'
|
||||
import SearchBar from '../search/SearchBar.svelte'
|
||||
import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte'
|
||||
|
||||
let { data } = $props()
|
||||
|
||||
@@ -96,9 +97,7 @@
|
||||
{/each}
|
||||
</div>
|
||||
{:else}
|
||||
<ul
|
||||
class="flex flex-col divide-y divide-slate-100 dark:divide-zinc-925 my-6 h-full"
|
||||
>
|
||||
<ul class="flex flex-col h-full">
|
||||
{#if data.communities.value.length == 0}
|
||||
<Placeholder
|
||||
icon={QuestionMarkCircle}
|
||||
@@ -108,9 +107,9 @@
|
||||
{/if}
|
||||
|
||||
{#if showTop}
|
||||
<SectionTitle class="border-0! pb-2">
|
||||
<EndPlaceholder size="lg" margin="lg">
|
||||
{$t('routes.search.top')}
|
||||
</SectionTitle>
|
||||
</EndPlaceholder>
|
||||
<div
|
||||
class="grid md:grid-cols-2 lg:grid-cols-3 gap-4 items-center mb-6 border-0!"
|
||||
>
|
||||
@@ -138,9 +137,9 @@
|
||||
{/if}
|
||||
|
||||
{#if data.communities.value.slice(showTop ? 3 : 0).length > 0}
|
||||
<SectionTitle class="border-0! pb-2">
|
||||
<EndPlaceholder size="lg" margin="lg">
|
||||
{$t('routes.search.other')}
|
||||
</SectionTitle>
|
||||
</EndPlaceholder>
|
||||
{/if}
|
||||
{#if data.communities.value}
|
||||
{@const sliced = data.communities.value.slice(showTop ? 3 : 0)}
|
||||
|
||||
Reference in new issue
Block a user