misc: Tweak markdown
This commit is contained in:
1 parent
8269de35e9
commit
5486facb81
4 files changed
+20
-12
No files matched your search
@@ -60,6 +60,11 @@
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
{#if postRes.post.nsfw}
|
||||
<span class="bg-red-600 px-1 py-0.5 rounded-md text-xs ml-auto font-bold">
|
||||
NSFW
|
||||
</span>
|
||||
{/if}
|
||||
</span>
|
||||
<a
|
||||
href="/post/{getInstance()}/{postRes.post.id}"
|
||||
@@ -77,7 +82,7 @@
|
||||
</a>
|
||||
{/if}
|
||||
{#if isImage(postRes.post.url)}
|
||||
<div class="self-start">
|
||||
<div class="self-start" class:blur-3xl={postRes.post.nsfw}>
|
||||
<img
|
||||
src="{postRes.post.url}?thumbnail=1024&format=webp"
|
||||
alt={postRes.post.name}
|
||||
@@ -85,7 +90,7 @@
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{#if postRes.post.body}
|
||||
{#if postRes.post.body && !postRes.post.nsfw}
|
||||
<p
|
||||
class="text-sm max-h-[74px] line-clamp-3 bg-slate-100 dark:bg-zinc-800
|
||||
border border-slate-200 dark:border-zinc-700 rounded-md p-2 mt-2"
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
export let source: string = ''
|
||||
</script>
|
||||
|
||||
<article class="break-words flex flex-col gap-2 markdown">
|
||||
<div class="break-words flex flex-col gap-2 leading-[22px] markdown">
|
||||
{@html md.render(source)}
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.markdown :global(h1) {
|
||||
@@ -35,11 +35,11 @@
|
||||
}
|
||||
|
||||
.markdown :global(ul) {
|
||||
@apply list-disc pl-3;
|
||||
@apply list-disc pl-3 leading-3;
|
||||
}
|
||||
|
||||
.markdown :global(ol) {
|
||||
@apply list-decimal pl-3;
|
||||
@apply list-decimal pl-3 leading-3;
|
||||
}
|
||||
|
||||
.markdown :global(blockquote) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import { goto } from '$app/navigation'
|
||||
import Card from '$lib/components/ui/StickyCard.svelte'
|
||||
import CommunityCard from '$lib/components/community/CommunityCard.svelte'
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
|
||||
export let data
|
||||
</script>
|
||||
@@ -35,18 +36,20 @@
|
||||
<Post {post} />
|
||||
{/each}
|
||||
<div>
|
||||
<Link
|
||||
href={(function () {
|
||||
<Button
|
||||
on:click={() => {
|
||||
$page.url.searchParams.set(
|
||||
'page',
|
||||
((Number($page.url.searchParams.get('page')) || 1) + 1).toString()
|
||||
)
|
||||
|
||||
return $page.url.toString()
|
||||
})()}
|
||||
goto($page.url.toString(), {
|
||||
invalidateAll: true,
|
||||
})
|
||||
}}
|
||||
>
|
||||
Next
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
{#await data.streamed.community}
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ pre {
|
||||
border-slate-200 border dark:bg-zinc-900 dark:border-zinc-800 text-sm;
|
||||
}
|
||||
|
||||
code {
|
||||
:not(pre) > code {
|
||||
@apply bg-slate-200 border border-slate-300 dark:bg-zinc-800
|
||||
dark:border-zinc-700 rounded-md px-1 py-0.5;
|
||||
}
|
||||
Reference in new issue
Block a user