misc: Fix overflow
This commit is contained in:
1 parent
b129db8ed5
commit
bcec92a045
3 files changed
+50
-50
No files matched your search
+4
-2
@@ -1,3 +1,5 @@
|
||||
import { LemmyHttp } from 'lemmy-js-client'
|
||||
import { LemmyHttp, type LoginResponse } from 'lemmy-js-client'
|
||||
import { writable } from 'svelte/store'
|
||||
|
||||
export const lemmy = new LemmyHttp('https://programming.dev')
|
||||
export let lemmy = new LemmyHttp(`https://lemmy.world`)
|
||||
export const token = writable<LoginResponse>()
|
||||
@@ -22,6 +22,6 @@
|
||||
</script>
|
||||
|
||||
<Navbar routes={$page.url.pathname.split('/').slice(1)} />
|
||||
<div class="mx-auto max-w-5xl p-4 overflow-hidden">
|
||||
<div class="mx-auto max-w-5xl p-4">
|
||||
<slot />
|
||||
</div>
|
||||
+45
-47
@@ -9,55 +9,53 @@
|
||||
export let data
|
||||
</script>
|
||||
|
||||
<div class="flex flex-row max-w-full w-full">
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex flex-col sm:flex-row gap-4">
|
||||
<MultiSelect
|
||||
options={['Subscribed', 'Local', 'All']}
|
||||
selected={$page.url.searchParams.get('type') ?? 'Local'}
|
||||
on:select={(e) => {
|
||||
const url = $page.url
|
||||
url.searchParams.set('type', e.detail)
|
||||
url.searchParams.delete('page')
|
||||
goto(url, {
|
||||
invalidateAll: true,
|
||||
})
|
||||
}}
|
||||
/>
|
||||
<MultiSelect
|
||||
options={['Active', 'TopDay', 'New']}
|
||||
optionNames={['Active', 'Top (Day)', 'New']}
|
||||
selected={$page.url.searchParams.get('sort') ?? 'Active'}
|
||||
on:select={(e) => {
|
||||
const url = $page.url
|
||||
url.searchParams.set('sort', e.detail)
|
||||
url.searchParams.delete('page')
|
||||
goto(url, {
|
||||
invalidateAll: true,
|
||||
})
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex flex-col sm:flex-row gap-4">
|
||||
<MultiSelect
|
||||
options={['Subscribed', 'Local', 'All']}
|
||||
selected={$page.url.searchParams.get('type') ?? 'Local'}
|
||||
on:select={(e) => {
|
||||
const url = $page.url
|
||||
url.searchParams.set('type', e.detail)
|
||||
url.searchParams.delete('page')
|
||||
goto(url, {
|
||||
invalidateAll: true,
|
||||
})
|
||||
}}
|
||||
/>
|
||||
<MultiSelect
|
||||
options={['Active', 'TopDay', 'New']}
|
||||
optionNames={['Active', 'Top (Day)', 'New']}
|
||||
selected={$page.url.searchParams.get('sort') ?? 'Active'}
|
||||
on:select={(e) => {
|
||||
const url = $page.url
|
||||
url.searchParams.set('sort', e.detail)
|
||||
url.searchParams.delete('page')
|
||||
goto(url, {
|
||||
invalidateAll: true,
|
||||
})
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-4 w-full">
|
||||
{#each data.posts as post}
|
||||
<Post {post} />
|
||||
{/each}
|
||||
</div>
|
||||
<div class="flex flex-col gap-4 w-full">
|
||||
{#each data.posts as post}
|
||||
<Post {post} />
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Link
|
||||
href={(function () {
|
||||
$page.url.searchParams.set(
|
||||
'page',
|
||||
((Number($page.url.searchParams.get('page')) || 1) + 1).toString()
|
||||
)
|
||||
<div>
|
||||
<Link
|
||||
href={(function () {
|
||||
$page.url.searchParams.set(
|
||||
'page',
|
||||
((Number($page.url.searchParams.get('page')) || 1) + 1).toString()
|
||||
)
|
||||
|
||||
return $page.url.toString()
|
||||
})()}
|
||||
>
|
||||
Next
|
||||
</Link>
|
||||
</div>
|
||||
return $page.url.toString()
|
||||
})()}
|
||||
>
|
||||
Next
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user