fix: inline/expandable styling issues
This commit is contained in:
6 files changed
+21
-19
No files matched your search
@@ -376,9 +376,8 @@
|
|||||||
class="inline-block hover:underline hover:text-primary-900 dark:hover:text-primary-100 transition-colors"
|
class="inline-block hover:underline hover:text-primary-900 dark:hover:text-primary-100 transition-colors"
|
||||||
>
|
>
|
||||||
<Markdown
|
<Markdown
|
||||||
source={title}
|
|
||||||
inline
|
inline
|
||||||
noStyle
|
source={title}
|
||||||
class={view != 'compact' ? '' : 'leading-[1.3]'}
|
class={view != 'compact' ? '' : 'leading-[1.3]'}
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -138,7 +138,11 @@
|
|||||||
},
|
},
|
||||||
}: Props = $props()
|
}: Props = $props()
|
||||||
|
|
||||||
setContext('options', { ...rendererOptions, inline: inline })
|
setContext('options', {
|
||||||
|
...rendererOptions,
|
||||||
|
inline: inline,
|
||||||
|
noStyle: noStyle,
|
||||||
|
})
|
||||||
|
|
||||||
let tokens = $derived(marked.lexer(source))
|
let tokens = $derived(marked.lexer(source))
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
let { children } = $props()
|
let { children } = $props()
|
||||||
|
|
||||||
const options = getContext('options')
|
const options = getContext('options')
|
||||||
|
|
||||||
|
console.log(options.noStyle)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<p class={[!options.inline && 'leading-[1.7] break-words max-w']}>
|
<p class={[!options.noStyle && 'leading-[1.7] break-words max-w']}>
|
||||||
{@render children?.()}
|
{@render children?.()}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<div
|
<div
|
||||||
class={[
|
class={[
|
||||||
'font-medium w-full text-left flex flex-row items-center justify-between hover:text-primary-900',
|
'font-medium w-full text-left flex flex-row items-center justify-between hover:text-primary-900',
|
||||||
'dark:hover:text-primary-100 transition-colors h-full z-0 group relative cursor-pointer',
|
'dark:hover:text-primary-100 transition-colors z-0 group relative cursor-pointer',
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<div class="flex flex-row gap-1 items-center w-full">
|
<div class="flex flex-row gap-1 items-center w-full">
|
||||||
|
|||||||
@@ -127,14 +127,14 @@
|
|||||||
color: var(--color-slate-50);
|
color: var(--color-slate-50);
|
||||||
|
|
||||||
@variant hover {
|
@variant hover {
|
||||||
color: initial;
|
color: var(--color-slate-50);
|
||||||
}
|
}
|
||||||
|
|
||||||
@variant dark {
|
@variant dark {
|
||||||
background-color: var(--color-primary-100);
|
background-color: var(--color-primary-100);
|
||||||
color: var(--color-zinc-900);
|
color: var(--color-zinc-900);
|
||||||
@variant hover {
|
@variant hover {
|
||||||
color: initial;
|
color: var(--color-zinc-900);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,24 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { page } from '$app/state'
|
import { page } from '$app/state'
|
||||||
import { profile } from '$lib/auth.svelte.js'
|
|
||||||
import { client } from '$lib/client/lemmy.svelte'
|
|
||||||
import {
|
import {
|
||||||
mediaType,
|
mediaType,
|
||||||
parseTags,
|
parseTags,
|
||||||
Post,
|
|
||||||
PostActions,
|
PostActions,
|
||||||
postLink,
|
postLink,
|
||||||
PostMedia,
|
PostMedia,
|
||||||
PostMeta,
|
PostMeta,
|
||||||
type Tag,
|
type Tag,
|
||||||
} from '$comp/lemmy/post'
|
} from '$comp/lemmy/post'
|
||||||
|
import PostItem from '$comp/lemmy/post/PostItem.svelte'
|
||||||
import Markdown from '$comp/markdown/Markdown.svelte'
|
import Markdown from '$comp/markdown/Markdown.svelte'
|
||||||
import EndPlaceholder from '$comp/ui/EndPlaceholder.svelte'
|
import EndPlaceholder from '$comp/ui/EndPlaceholder.svelte'
|
||||||
import Expandable from '$comp/ui/Expandable.svelte'
|
import Expandable from '$comp/ui/Expandable.svelte'
|
||||||
|
import { CommonList } from '$comp/ui/layout'
|
||||||
import Placeholder from '$comp/ui/Placeholder.svelte'
|
import Placeholder from '$comp/ui/Placeholder.svelte'
|
||||||
import { publishedToDate } from '$comp/util/date.js'
|
import { publishedToDate } from '$comp/util/date.js'
|
||||||
import FormattedNumber from '$comp/util/FormattedNumber.svelte'
|
import FormattedNumber from '$comp/util/FormattedNumber.svelte'
|
||||||
|
import { profile } from '$lib/auth.svelte.js'
|
||||||
|
import { client } from '$lib/client/lemmy.svelte'
|
||||||
import { t } from '$lib/i18n/translations.js'
|
import { t } from '$lib/i18n/translations.js'
|
||||||
import { resumables } from '$lib/lemmy/item.js'
|
import { resumables } from '$lib/lemmy/item.js'
|
||||||
import { settings } from '$lib/settings.svelte.js'
|
import { settings } from '$lib/settings.svelte.js'
|
||||||
@@ -203,15 +204,11 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</EndPlaceholder>
|
</EndPlaceholder>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
<div
|
<CommonList items={crossposts}>
|
||||||
class="divide-y! divide-slate-200 dark:divide-zinc-800 flex flex-col"
|
{#snippet item(item)}
|
||||||
>
|
<PostItem post={item} />
|
||||||
{#key crossposts}
|
{/snippet}
|
||||||
{#each crossposts as crosspost (crosspost.post.id)}
|
</CommonList>
|
||||||
<Post view="compact" post={crosspost} />
|
|
||||||
{/each}
|
|
||||||
{/key}
|
|
||||||
</div>
|
|
||||||
</Expandable>
|
</Expandable>
|
||||||
{/if}
|
{/if}
|
||||||
{/await}
|
{/await}
|
||||||
|
|||||||
Reference in new issue
Block a user