design: space out markdown paragraphs

This commit is contained in:
James Xylight committed 2025-08-26 18:55:19 -07:00
1 parent 25c879d173
commit caa58635f9
5 files changed
+6 -16

No files matched your search

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { tick } from 'svelte' import { tick } from 'svelte'
import type { HTMLTextareaAttributes } from 'svelte/elements' import type { HTMLAttributes } from 'svelte/elements'
let textarea: HTMLTextAreaElement | undefined = $state() let textarea: HTMLTextAreaElement | undefined = $state()
@@ -11,7 +11,7 @@
textarea.style.height = `${textarea.scrollHeight}px` // Set height to the scrollHeight textarea.style.height = `${textarea.scrollHeight}px` // Set height to the scrollHeight
} }
} }
interface Props extends HTMLTextareaAttributes { interface Props extends HTMLAttributes<HTMLTextAreaElement> {
label?: string | undefined label?: string | undefined
value: string value: string
required?: boolean required?: boolean
@@ -337,7 +337,6 @@
{/if} {/if}
{/if} {/if}
<FreeTextInput <FreeTextInput
type="text"
required required
bind:value={data.title} bind:value={data.title}
placeholder={placeholders.get('post')} placeholder={placeholders.get('post')}
+1 -1
View File
@@ -151,7 +151,7 @@
<article <article
dir="auto" dir="auto"
class={[!noStyle && 'break-words space-y-2 leading-normal', clazz]} class={[!noStyle && 'break-words space-y-4 leading-normal', clazz]}
{style} {style}
> >
<SvelteMarkdown <SvelteMarkdown
@@ -9,12 +9,12 @@
let { children } = $props() let { children } = $props()
</script> </script>
<p class="leading-normal break-words {options.inline ? '' : 'max-w'}"> <p class="leading-[1.7] break-words {options.inline ? '' : 'max-w'}">
{@render children?.()} {@render children?.()}
</p> </p>
<style> <style>
.max-w { .max-w {
max-width: 80ch; max-width: 70ch;
} }
</style> </style>
+1 -10
View File
@@ -8,7 +8,7 @@
import { t } from '$lib/i18n/translations' import { t } from '$lib/i18n/translations'
import { LINKED_INSTANCE_URL } from '$lib/instance.svelte' import { LINKED_INSTANCE_URL } from '$lib/instance.svelte'
import { site } from '$lib/lemmy.svelte.js' import { site } from '$lib/lemmy.svelte.js'
import { Badge, Menu, Spinner } from 'mono-svelte' import { Menu, Spinner } from 'mono-svelte'
import { import {
Bars3, Bars3,
GlobeAlt, GlobeAlt,
@@ -32,15 +32,6 @@
let { style = '', class: clazz = '' }: Props = $props() let { style = '', class: clazz = '' }: Props = $props()
</script> </script>
{#snippet notifBadge(number: number)}
<Badge
color={number > 0 ? 'red-subtle' : 'gray-subtle'}
class="min-w-5 h-5 p-0! px-0.5 grid place-items-center ml-auto"
>
{number > 99 ? '∞' : number}
</Badge>
{/snippet}
<CommandsWrapper bind:open={promptOpen} /> <CommandsWrapper bind:open={promptOpen} />
<nav <nav
class={[ class={[