Fade out long text

This commit is contained in:
Scott Idem
2025-01-28 16:25:07 -05:00
parent c62507d484
commit a9c96c905a

View File

@@ -40,7 +40,14 @@ onMount(() => {
</header>
<!-- {#if idaa_post_obj.content}<pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap reset_css">{@html idaa_post_obj.content}</pre>{/if} -->
{#if idaa_post_obj.content}<div class="post__content w-full p-2 bg-gray shadow-md rounded text-wrap text-sm font-normal reset_css">{@html idaa_post_obj.content}</div>{/if}
<!-- style="background: linear-gradient(to top, rgba(128, 128, 128, 0.5) 0, transparent 4em);" -->
{#if idaa_post_obj.content}
<div class="post__content w-full p-2 pb-8 bg-gray shadow-md rounded text-wrap text-sm font-normal reset_css overflow-hidden max-h-96 relative">
{@html idaa_post_obj.content}
<!-- Add an overlay to fade the content out when close to max height -->
<div class="post__content__fade w-full h-16 absolute bottom-0 left-0 bg-gradient-to-t from-white to-transparent"></div>
</div>
{/if}
<div class="ae_options flex flex-row gap-2 items-center justify-center">
<button