misc: Minor tweaks

This commit is contained in:
Xyphyn committed 2023-07-18 12:19:59 -07:00
1 parent 12d4a9d9de
commit f3c3982eff
4 files changed
+27 -10

No files matched your search

+11 -1
View File
@@ -2,6 +2,7 @@
import { createEventDispatcher } from 'svelte'
import { Color } from '$lib/ui/colors.js'
import Loading from '$lib/components/ui/loader/Loading.svelte'
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
export let color: Color = Color.secondary
export let loading = false
@@ -9,6 +10,7 @@
export let disabled = false
export let submit = false
export let label: string = ''
export let spinner = false
const dispatch = createEventDispatcher()
</script>
@@ -29,5 +31,13 @@
<slot name="icon" />
<slot />
</div>
<div class="mx-auto py-2" class:hidden={!loading}><Loading /></div>
<div class="mx-auto" class:hidden={!loading}>
{#if spinner}
<Spinner />
{:else}
<div class="py-2">
<Loading />
</div>
{/if}
</div>
</button>
@@ -9,6 +9,7 @@
import type { Post } from 'lemmy-js-client'
import { Color } from '$lib/ui/colors.js'
import { fly } from 'svelte/transition'
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
export let nodes: CommentNodeI[]
export let isParent: boolean
@@ -73,7 +74,7 @@
<svelte:self {post} nodes={node.children} isParent={false} />
{/if}
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
<div class="my-2 min-w-[9rem] w-max h-8 border-l border-black/10 pl-2">
<div class="my-2 min-w-[7rem] w-max h-8 border-l border-black/10 pl-2">
<Button
loading={loadingChildren}
disabled={loadingChildren}
@@ -81,7 +82,7 @@
on:click={() => fetchChildren(node)}
>
<Icon src={ChevronDown} width={16} mini />
Load {node.comment_view.counts.child_count} more
{node.comment_view.counts.child_count} more
</Button>
</div>
{/if}
+12 -3
View File
@@ -32,25 +32,34 @@
}
.markdown :global(a) {
@apply text-sky-400 hover:underline;
@apply text-sky-500 hover:underline;
}
.markdown :global(ul) {
@apply list-disc pl-4;
line-height: 0.75rem;
line-height: 1rem;
}
.markdown :global(ol) {
@apply list-decimal pl-4;
line-height: 0.75rem;
line-height: 1rem;
}
.markdown :global(li) {
@apply m-0 !important;
}
.markdown :global(li > *) {
@apply m-0 !important;
line-height: 22px;
}
.markdown :global(blockquote) {
@apply border-l-2 border-black/20 dark:border-white/20 pl-2 my-1 h-max;
line-height: 0.5rem;
}
.markdown :global(blockquote > *) {
line-height: 22px;
}
</style>
+1 -4
View File
@@ -1,5 +1,5 @@
<script lang="ts">
export let width: number = 40
export let width: number = 28
</script>
<div class="spinner" style="width: {width}px; height: {width}px;">
@@ -21,9 +21,6 @@
div.spinner {
position: relative;
display: inline-block;
margin-left: 50%;
margin-right: 50%;
padding: 10px;
border-radius: 10px;
}