misc: I haven't eaten in 16 hours brb gonna get some food
This commit is contained in:
1 parent
a363fe3baf
commit
eb006ed982
21 files changed
+126
-58
No files matched your search
@@ -31,6 +31,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dicebear/core": "^6.0.4",
|
"@dicebear/core": "^6.0.4",
|
||||||
"@dicebear/initials": "^6.0.4",
|
"@dicebear/initials": "^6.0.4",
|
||||||
|
"@tailwindcss/container-queries": "^0.1.1",
|
||||||
"lemmy-js-client": "^0.18.0-rc.2",
|
"lemmy-js-client": "^0.18.0-rc.2",
|
||||||
"markdown-it": "^13.0.1"
|
"markdown-it": "^13.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
+3
-1
@@ -3,7 +3,9 @@
|
|||||||
declare global {
|
declare global {
|
||||||
namespace App {
|
namespace App {
|
||||||
// interface Error {}
|
// interface Error {}
|
||||||
// interface Locals {}
|
interface Locals {
|
||||||
|
instance?: string
|
||||||
|
}
|
||||||
// interface PageData {}
|
// interface PageData {}
|
||||||
// interface Platform {}
|
// interface Platform {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { createEventDispatcher } from 'svelte'
|
import { createEventDispatcher } from 'svelte'
|
||||||
import { Color } from '$lib/ui/colors.js'
|
import { Color } from '$lib/ui/colors.js'
|
||||||
import Loading from '$lib/components/ui/Loading.svelte'
|
import Loading from '$lib/components/ui/loader/Loading.svelte'
|
||||||
|
|
||||||
export let color: Color = Color.secondary
|
export let color: Color = Color.secondary
|
||||||
export let loading = false
|
export let loading = false
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
optionNames.set(null, 'None')
|
optionNames.set(null, 'None')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Menu rtl={false} let:toggleOpen>
|
<Menu let:toggleOpen>
|
||||||
<button
|
<button
|
||||||
class="flex flex-row gap-2 items-center px-3 py-1.5 w-full text-sm
|
class="flex flex-row gap-2 items-center px-3 py-1.5 w-full text-sm
|
||||||
transition-all max-w-64 rounded-md bg-slate-100 border border-slate-200
|
transition-all max-w-64 rounded-md bg-slate-100 border border-slate-200
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
>
|
>
|
||||||
{optionNames.get(selected) || selected}
|
{optionNames.get(selected) || selected}
|
||||||
</button>
|
</button>
|
||||||
|
<li class="text-xs opacity-80 my-1 py-1 mx-4">Communities</li>
|
||||||
{#each options as option}
|
{#each options as option}
|
||||||
<MenuButton on:click={() => (selected = option)}>
|
<MenuButton on:click={() => (selected = option)}>
|
||||||
{optionNames.get(option) || option}
|
{optionNames.get(option) || option}
|
||||||
|
|||||||
@@ -8,6 +8,14 @@
|
|||||||
import { getInstance } from '$lib/lemmy.js'
|
import { getInstance } from '$lib/lemmy.js'
|
||||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||||
import PostActions from '$lib/components/lemmy/PostActions.svelte'
|
import PostActions from '$lib/components/lemmy/PostActions.svelte'
|
||||||
|
import Badge from '$lib/components/ui/Badge.svelte'
|
||||||
|
import {
|
||||||
|
Bookmark,
|
||||||
|
Icon,
|
||||||
|
InformationCircle,
|
||||||
|
Link,
|
||||||
|
Trash,
|
||||||
|
} from 'svelte-hero-icons'
|
||||||
|
|
||||||
let postRes: PostView
|
let postRes: PostView
|
||||||
export { postRes as post }
|
export { postRes as post }
|
||||||
@@ -37,9 +45,22 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{#if postRes.post.nsfw}
|
{#if postRes.post.nsfw}
|
||||||
<span class="bg-red-600 px-1 py-0.5 rounded-md text-xs ml-auto font-bold">
|
<Badge class="bg-red-600 text-white">NSFW</Badge>
|
||||||
NSFW
|
{/if}
|
||||||
</span>
|
{#if postRes.saved}
|
||||||
|
<Badge class="bg-yellow-500 text-white py-1" label="Saved">
|
||||||
|
<Icon src={Bookmark} mini width={16} />
|
||||||
|
</Badge>
|
||||||
|
{/if}
|
||||||
|
{#if postRes.post.deleted || postRes.post.removed}
|
||||||
|
<Badge class="bg-red-600 text-white py-1" label="Deleted">
|
||||||
|
<Icon src={Trash} mini width={16} />
|
||||||
|
</Badge>
|
||||||
|
{/if}
|
||||||
|
{#if postRes.post.featured_community || postRes.post.featured_local}
|
||||||
|
<Badge class="bg-green-500 text-white py-1" label="Pinned">
|
||||||
|
<Icon src={InformationCircle} mini width={16} />
|
||||||
|
</Badge>
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
<a
|
<a
|
||||||
@@ -48,32 +69,53 @@
|
|||||||
>
|
>
|
||||||
{postRes.post.name}
|
{postRes.post.name}
|
||||||
</a>
|
</a>
|
||||||
{#if postRes.post.url}
|
|
||||||
<a
|
|
||||||
href={postRes.post.url}
|
|
||||||
class="text-sky-400 max-w-[24ch] overflow-hidden
|
|
||||||
whitespace-nowrap text-ellipsis text-xs hover:underline"
|
|
||||||
>
|
|
||||||
{postRes.post.url}
|
|
||||||
</a>
|
|
||||||
{/if}
|
|
||||||
{#if isImage(postRes.post.url)}
|
{#if isImage(postRes.post.url)}
|
||||||
<div class="self-start" class:blur-3xl={postRes.post.nsfw}>
|
<div class="self-start" class:blur-3xl={postRes.post.nsfw}>
|
||||||
|
<picture
|
||||||
|
class="rounded-md overflow-hidden max-h-[min(50vh,500px)] w-full max-w-full"
|
||||||
|
>
|
||||||
|
<source
|
||||||
|
srcset="{postRes.post.url}?thumbnail=256&format=webp"
|
||||||
|
media="(max-width: 256px)"
|
||||||
|
/>
|
||||||
|
<source
|
||||||
|
srcset="{postRes.post.url}?thumbnail=512&format=webp"
|
||||||
|
media="(max-width: 512px)"
|
||||||
|
/>
|
||||||
|
<source
|
||||||
|
srcset="{postRes.post.url}?thumbnail=720&format=webp"
|
||||||
|
media="(max-width: 720px)"
|
||||||
|
/>
|
||||||
|
<!-- svelte-ignore a11y-missing-attribute -->
|
||||||
<img
|
<img
|
||||||
src="{postRes.post.url}?thumbnail=1024&format=webp"
|
src="{postRes.post.url}?thumbnail=1024&format=webp"
|
||||||
alt={postRes.post.name}
|
|
||||||
class="rounded-md max-h-[32rem] w-full max-w-full"
|
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
|
class="object-cover bg-slate-100 rounded-md max-h-[50vh] w-full"
|
||||||
|
width={512}
|
||||||
|
height={300}
|
||||||
/>
|
/>
|
||||||
|
</picture>
|
||||||
</div>
|
</div>
|
||||||
{:else if postRes.post.thumbnail_url}
|
{:else if postRes.post.thumbnail_url && postRes.post.url}
|
||||||
<div class="self-start" class:blur-3xl={postRes.post.nsfw}>
|
<a
|
||||||
|
href={postRes.post.url}
|
||||||
|
class="self-start relative group"
|
||||||
|
class:blur-3xl={postRes.post.nsfw}
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
src={postRes.post.thumbnail_url}
|
src={postRes.post.thumbnail_url}
|
||||||
alt={postRes.post.name}
|
alt={postRes.post.name}
|
||||||
class="rounded-md max-h-[16rem] w-full max-w-full"
|
class="rounded-md max-h-[16rem] w-full max-w-full"
|
||||||
/>
|
/>
|
||||||
</div>
|
<span
|
||||||
|
class="w-full px-4 py-2 overflow-hidden
|
||||||
|
whitespace-nowrap text-ellipsis text-sm group-hover:underline bg-slate-100 border
|
||||||
|
absolute bottom-0 rounded-b-md flex flex-row gap-1 items-center"
|
||||||
|
>
|
||||||
|
<Icon src={Link} width={16} mini />
|
||||||
|
{new URL(postRes.post.url).hostname}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
{#if postRes.post.body && !postRes.post.nsfw}
|
{#if postRes.post.body && !postRes.post.nsfw}
|
||||||
<p
|
<p
|
||||||
|
|||||||
@@ -68,7 +68,6 @@
|
|||||||
>
|
>
|
||||||
<Icon src={EllipsisHorizontal} width={16} height={16} mini />
|
<Icon src={EllipsisHorizontal} width={16} height={16} mini />
|
||||||
</button>
|
</button>
|
||||||
<span class="opacity-80 my-1 py-1 text-xs mx-4">Comment actions</span>
|
|
||||||
{#if $authData?.token}
|
{#if $authData?.token}
|
||||||
<MenuButton on:click={save}>
|
<MenuButton on:click={save}>
|
||||||
<Icon src={comment.saved ? BookmarkSlash : Bookmark} mini size="16" />
|
<Icon src={comment.saved ? BookmarkSlash : Bookmark} mini size="16" />
|
||||||
|
|||||||
@@ -48,14 +48,16 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="max-w-lg flex flex-col gap-2">
|
<div class="flex flex-col gap-2 relative">
|
||||||
<TextArea
|
<TextArea
|
||||||
rows={3}
|
rows={4}
|
||||||
placeholder="What are you thinking?"
|
placeholder="What are you thinking?"
|
||||||
class="bg-slate-100 dark:bg-zinc-900"
|
class="bg-slate-100 dark:bg-zinc-900"
|
||||||
bind:value={newComment}
|
bind:value={newComment}
|
||||||
/>
|
/>
|
||||||
<div class="w-24 ml-auto flex flex-row gap-2">
|
<div
|
||||||
|
class="w-full ml-auto flex flex-row gap-2 md:w-24 md:absolute md:bottom-0 md:right-0 md:m-2"
|
||||||
|
>
|
||||||
<Button
|
<Button
|
||||||
large
|
large
|
||||||
on:click={submit}
|
on:click={submit}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
import { ChevronDown, Icon } from 'svelte-hero-icons'
|
import { ChevronDown, Icon } from 'svelte-hero-icons'
|
||||||
import { authData, getClient } from '$lib/lemmy.js'
|
import { authData, getClient } from '$lib/lemmy.js'
|
||||||
import type { Post } from 'lemmy-js-client'
|
import type { Post } from 'lemmy-js-client'
|
||||||
|
import { Color } from '$lib/ui/colors.js'
|
||||||
|
import { fly } from 'svelte/transition'
|
||||||
|
|
||||||
const maxComments = 250
|
const maxComments = 250
|
||||||
|
|
||||||
@@ -57,11 +59,12 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ul
|
<ul
|
||||||
|
in:fly={{ opacity: 0, y: -4 }}
|
||||||
class={isParent
|
class={isParent
|
||||||
? ''
|
? ''
|
||||||
: 'ml-2.5 mt-2 pl-2.5 border-l-2 border-black/10 dark:border-white/10'}
|
: 'ml-2.5 mt-2 pl-2.5 border-l-2 border-black/10 dark:border-white/10'}
|
||||||
>
|
>
|
||||||
{#each nodes.slice(0, maxComments) as node}
|
{#each nodes.slice(0, maxComments) as node (node.comment_view.comment.id)}
|
||||||
<Comment
|
<Comment
|
||||||
postId={post.id}
|
postId={post.id}
|
||||||
{node}
|
{node}
|
||||||
@@ -72,10 +75,11 @@
|
|||||||
<svelte:self {post} nodes={node.children} isParent={false} />
|
<svelte:self {post} nodes={node.children} isParent={false} />
|
||||||
{/if}
|
{/if}
|
||||||
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
|
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
|
||||||
<div class="m-1">
|
<div class="my-2 w-36 h-8">
|
||||||
<Button
|
<Button
|
||||||
loading={loadingChildren}
|
loading={loadingChildren}
|
||||||
disabled={loadingChildren}
|
disabled={loadingChildren}
|
||||||
|
large
|
||||||
on:click={() => fetchChildren(node)}
|
on:click={() => fetchChildren(node)}
|
||||||
>
|
>
|
||||||
<Icon src={ChevronDown} width={16} mini />
|
<Icon src={ChevronDown} width={16} mini />
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
export let source: string = ''
|
export let source: string = ''
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="break-words flex flex-col gap-2 leading-[22px] markdown">
|
<div class="break-words flex flex-col gap-3 leading-[22px] markdown">
|
||||||
{@html md.render(source)}
|
{@html md.render(source)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -36,17 +36,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.markdown :global(ul) {
|
.markdown :global(ul) {
|
||||||
@apply list-disc pl-3;
|
@apply list-disc pl-4;
|
||||||
line-height: initial;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown :global(ol) {
|
.markdown :global(ol) {
|
||||||
@apply list-decimal pl-3;
|
@apply list-decimal pl-4;
|
||||||
line-height: initial;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown :global(il) {
|
.markdown :global(li) {
|
||||||
@apply my-1;
|
@apply my-2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown :global(blockquote) {
|
.markdown :global(blockquote) {
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
export let label: string = ''
|
||||||
|
|
||||||
|
let clazz = ''
|
||||||
|
export { clazz as class }
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<span
|
||||||
|
class="px-1 py-0.5 rounded-md text-xs ml-auto font-bold {clazz}"
|
||||||
|
aria-label={label}
|
||||||
|
title={label}
|
||||||
|
>
|
||||||
|
<slot />
|
||||||
|
</span>
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { fly } from 'svelte/transition'
|
||||||
|
|
||||||
let clazz = ''
|
let clazz = ''
|
||||||
export { clazz as class }
|
export { clazz as class }
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="loading">
|
<div class="loading" role="progressbar">
|
||||||
<div class="dot dot1" />
|
<div class="dot dot1" />
|
||||||
<div class="dot dot2" />
|
<div class="dot dot2" />
|
||||||
<div class="dot dot3" />
|
<div class="dot dot3" />
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
height: 5px;
|
height: 5px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-color: #555;
|
background-color: #555;
|
||||||
|
opacity: 0.3;
|
||||||
margin: 0px 1px;
|
margin: 0px 1px;
|
||||||
animation: blink 750ms infinite;
|
animation: blink 750ms infinite;
|
||||||
}
|
}
|
||||||
@@ -34,13 +35,13 @@
|
|||||||
|
|
||||||
@keyframes blink {
|
@keyframes blink {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0.6;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
20% {
|
20% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
opacity: 0.6;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -60,6 +60,7 @@
|
|||||||
: 'relative'} cursor-auto {clazz}"
|
: 'relative'} cursor-auto {clazz}"
|
||||||
bind:this={element}
|
bind:this={element}
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
|
role="menu"
|
||||||
>
|
>
|
||||||
<slot name="button" {toggleOpen} />
|
<slot name="button" {toggleOpen} />
|
||||||
{#if open}
|
{#if open}
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ import { writable } from 'svelte/store'
|
|||||||
|
|
||||||
interface Settings {
|
interface Settings {
|
||||||
newComments: boolean
|
newComments: boolean
|
||||||
|
expandableImages: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultSettings: Settings = {
|
const defaultSettings: Settings = {
|
||||||
newComments: true,
|
newComments: true,
|
||||||
|
expandableImages: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const userSettings = writable(defaultSettings)
|
export const userSettings = writable(defaultSettings)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||||
import Post from '$lib/components/lemmy/Post.svelte'
|
import Post from '$lib/components/lemmy/Post.svelte'
|
||||||
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
||||||
|
import { fly, scale } from 'svelte/transition'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
</script>
|
</script>
|
||||||
@@ -44,8 +45,10 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col gap-4">
|
<div class="flex flex-col gap-4">
|
||||||
{#each data.posts.posts as post}
|
{#each data.posts.posts as post, index (post.post.id)}
|
||||||
|
<div in:fly={{ y: -8, opacity: 0, delay: index < 4 ? index * 100 : 0 }}>
|
||||||
<Post {post} />
|
<Post {post} />
|
||||||
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import { authData, getClient } from '$lib/lemmy.js'
|
|||||||
import type { ListingType, SortType } from 'lemmy-js-client'
|
import type { ListingType, SortType } from 'lemmy-js-client'
|
||||||
import { get } from 'svelte/store'
|
import { get } from 'svelte/store'
|
||||||
|
|
||||||
export async function load({ url, params }) {
|
export async function load({ url }) {
|
||||||
const page = Number(url.searchParams.get('page') || 1) || 1
|
const page = Number(url.searchParams.get('page') || 1) || 1
|
||||||
|
|
||||||
const sort: SortType = (url.searchParams.get('sort') as SortType) || 'Active'
|
const sort: SortType = (url.searchParams.get('sort') as SortType) || 'Active'
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
import CommunityCard from '$lib/components/community/CommunityCard.svelte'
|
import CommunityCard from '$lib/components/community/CommunityCard.svelte'
|
||||||
import Button from '$lib/components/input/Button.svelte'
|
import Button from '$lib/components/input/Button.svelte'
|
||||||
import { Color } from '$lib/ui/colors'
|
import { Color } from '$lib/ui/colors'
|
||||||
|
import { fly } from 'svelte/transition'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
</script>
|
</script>
|
||||||
@@ -57,8 +58,10 @@
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{#each data.posts.posts as post}
|
{#each data.posts.posts as post, index (post.post.id)}
|
||||||
|
<div in:fly={{ y: -8, opacity: 0, delay: index < 4 ? index * 100 : 0 }}>
|
||||||
<Post {post} />
|
<Post {post} />
|
||||||
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
<Button
|
<Button
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||||
import Card from '$lib/components/ui/Card.svelte'
|
import Card from '$lib/components/ui/Card.svelte'
|
||||||
import Loading from '$lib/components/ui/Loading.svelte'
|
import Loading from '$lib/components/ui/loader/Loading.svelte'
|
||||||
import { ToastType, addToast } from '$lib/components/ui/toasts/toasts.js'
|
import { ToastType, addToast } from '$lib/components/ui/toasts/toasts.js'
|
||||||
import { authData, buildBaseUrl, getClient } from '$lib/lemmy.js'
|
import { authData, buildBaseUrl, getClient } from '$lib/lemmy.js'
|
||||||
import { Color } from '$lib/ui/colors.js'
|
import { Color } from '$lib/ui/colors.js'
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
import Button from '$lib/components/input/Button.svelte'
|
import Button from '$lib/components/input/Button.svelte'
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import PostActions from '$lib/components/lemmy/PostActions.svelte'
|
import PostActions from '$lib/components/lemmy/PostActions.svelte'
|
||||||
|
import Loading from '$lib/components/ui/loader/Loading.svelte'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
|
|
||||||
@@ -119,18 +120,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{#await data.streamed.comments}
|
{#await data.streamed.comments}
|
||||||
<div class="flex flex-col gap-8">
|
<Loading />
|
||||||
{#each new Array(10) as comment}
|
|
||||||
<div class="flex flex-col gap-2">
|
|
||||||
<div
|
|
||||||
class="dark:bg-zinc-700 bg-slate-200 animate-pulse w-64 h-3 rounded-md"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="dark:bg-zinc-700 bg-slate-200 animate-pulse w-128 h-4 rounded-md"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
||||||
{:then comments}
|
{:then comments}
|
||||||
{#if $user}
|
{#if $user}
|
||||||
<CommentForm
|
<CommentForm
|
||||||
@@ -142,11 +132,6 @@
|
|||||||
])}
|
])}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<MultiSelect
|
|
||||||
options={['hot', 'new', 'top']}
|
|
||||||
optionNames={['Hot', 'New', 'Top']}
|
|
||||||
selected="hot"
|
|
||||||
/>
|
|
||||||
<Comments
|
<Comments
|
||||||
{post}
|
{post}
|
||||||
nodes={buildCommentsTree(comments.comments, false)}
|
nodes={buildCommentsTree(comments.comments, false)}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
import CommunityLink from '$lib/components/community/CommunityLink.svelte'
|
import CommunityLink from '$lib/components/community/CommunityLink.svelte'
|
||||||
import Link from '$lib/components/input/Link.svelte'
|
import Link from '$lib/components/input/Link.svelte'
|
||||||
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
|
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
|
||||||
|
import { fly } from 'svelte/transition'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
|
|
||||||
@@ -27,7 +28,8 @@
|
|||||||
Wow, it's quite empty in here.
|
Wow, it's quite empty in here.
|
||||||
</p>
|
</p>
|
||||||
{:else}
|
{:else}
|
||||||
{#each data.data as item}
|
{#each data.data as item, index}
|
||||||
|
<div in:fly={{ opacity: 0, y: -4, delay: index * 50 }}>
|
||||||
{#if isComment(item)}
|
{#if isComment(item)}
|
||||||
<Card class="flex flex-col bg-white rounded-md p-4 flex-1">
|
<Card class="flex flex-col bg-white rounded-md p-4 flex-1">
|
||||||
<div class="flex flex-row justify-between items-center">
|
<div class="flex flex-row justify-between items-center">
|
||||||
@@ -54,6 +56,7 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<Post post={asPost(item)} />
|
<Post post={asPost(item)} />
|
||||||
{/if}
|
{/if}
|
||||||
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -263,6 +263,11 @@
|
|||||||
svelte-hmr "^0.15.2"
|
svelte-hmr "^0.15.2"
|
||||||
vitefu "^0.2.4"
|
vitefu "^0.2.4"
|
||||||
|
|
||||||
|
"@tailwindcss/container-queries@^0.1.1":
|
||||||
|
version "0.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@tailwindcss/container-queries/-/container-queries-0.1.1.tgz#9a759ce2cb8736a4c6a0cb93aeb740573a731974"
|
||||||
|
integrity sha512-p18dswChx6WnTSaJCSGx6lTmrGzNNvm2FtXmiO6AuA1V4U5REyoqwmT6kgAsIMdjo07QdAfYXHJ4hnMtfHzWgA==
|
||||||
|
|
||||||
"@tootallnate/once@2":
|
"@tootallnate/once@2":
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
|
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
|
||||||
|
|||||||
Reference in new issue
Block a user