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>
|
</script>
|
||||||
|
|
||||||
<Navbar routes={$page.url.pathname.split('/').slice(1)} />
|
<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 />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
+45
-47
@@ -9,55 +9,53 @@
|
|||||||
export let data
|
export let data
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-row max-w-full w-full">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col sm:flex-row gap-4">
|
||||||
<div class="flex flex-col sm:flex-row gap-4">
|
<MultiSelect
|
||||||
<MultiSelect
|
options={['Subscribed', 'Local', 'All']}
|
||||||
options={['Subscribed', 'Local', 'All']}
|
selected={$page.url.searchParams.get('type') ?? 'Local'}
|
||||||
selected={$page.url.searchParams.get('type') ?? 'Local'}
|
on:select={(e) => {
|
||||||
on:select={(e) => {
|
const url = $page.url
|
||||||
const url = $page.url
|
url.searchParams.set('type', e.detail)
|
||||||
url.searchParams.set('type', e.detail)
|
url.searchParams.delete('page')
|
||||||
url.searchParams.delete('page')
|
goto(url, {
|
||||||
goto(url, {
|
invalidateAll: true,
|
||||||
invalidateAll: true,
|
})
|
||||||
})
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
<MultiSelect
|
||||||
<MultiSelect
|
options={['Active', 'TopDay', 'New']}
|
||||||
options={['Active', 'TopDay', 'New']}
|
optionNames={['Active', 'Top (Day)', 'New']}
|
||||||
optionNames={['Active', 'Top (Day)', 'New']}
|
selected={$page.url.searchParams.get('sort') ?? 'Active'}
|
||||||
selected={$page.url.searchParams.get('sort') ?? 'Active'}
|
on:select={(e) => {
|
||||||
on:select={(e) => {
|
const url = $page.url
|
||||||
const url = $page.url
|
url.searchParams.set('sort', e.detail)
|
||||||
url.searchParams.set('sort', e.detail)
|
url.searchParams.delete('page')
|
||||||
url.searchParams.delete('page')
|
goto(url, {
|
||||||
goto(url, {
|
invalidateAll: true,
|
||||||
invalidateAll: true,
|
})
|
||||||
})
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex flex-col gap-4 w-full">
|
<div class="flex flex-col gap-4 w-full">
|
||||||
{#each data.posts as post}
|
{#each data.posts as post}
|
||||||
<Post {post} />
|
<Post {post} />
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Link
|
<Link
|
||||||
href={(function () {
|
href={(function () {
|
||||||
$page.url.searchParams.set(
|
$page.url.searchParams.set(
|
||||||
'page',
|
'page',
|
||||||
((Number($page.url.searchParams.get('page')) || 1) + 1).toString()
|
((Number($page.url.searchParams.get('page')) || 1) + 1).toString()
|
||||||
)
|
)
|
||||||
|
|
||||||
return $page.url.toString()
|
return $page.url.toString()
|
||||||
})()}
|
})()}
|
||||||
>
|
>
|
||||||
Next
|
Next
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user