Skip to content

Commit

Permalink
fix: fade read posts, close #282
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyphyn committed Mar 16, 2024
1 parent a724313 commit 2e4bfd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/components/lemmy/post/Post.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
: 'NotSubscribed'}
id={post.post.id}
title={post.post.name}
read={post.read}
style="grid-area: meta;"
>
<slot name="badges" slot="badges" />
Expand Down
4 changes: 4 additions & 0 deletions src/lib/components/lemmy/post/PostMeta.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import { profile } from '$lib/auth.js'
import Subscribe from '../../../../routes/communities/Subscribe.svelte'
import ShieldIcon from '../moderation/ShieldIcon.svelte'
import { userSettings } from '$lib/settings'
export let community: Community | undefined = undefined
export let subscribed: SubscribedType | undefined = undefined
Expand All @@ -26,6 +27,7 @@
export let published: Date | undefined = undefined
export let title: string | undefined = undefined
export let id: number | undefined = undefined
export let read: boolean = false
// Badges
export let badges = {
Expand Down Expand Up @@ -147,6 +149,8 @@
<a
href="/post/{getInstance()}/{id}"
class="font-medium text-base"
class:text-slate-600={$userSettings.markReadPosts && read}
class:dark:text-zinc-400={$userSettings.markReadPosts && read}
style="grid-area: title;"
>
{title}
Expand Down

0 comments on commit 2e4bfd8

Please sign in to comment.