design: redesign user pages

This commit is contained in:
Xylight committed 2024-07-18 18:55:21 -07:00
1 parent 5e9ea24709
commit cc0a7e2869
4 files changed
+149 -124

No files matched your search

@@ -6,6 +6,7 @@
export let body: string
export let view: View = 'cozy'
export let clickThrough = false
let expanded = false
let element: Element
@@ -31,8 +32,8 @@
bg-gradient-to-b text-transparent from-slate-600 via-slate-600
dark:from-zinc-400 dark:via-zinc-400 bg-clip-text z-0
${view == 'list' ? `max-h-24` : 'max-h-48'}`
: 'text-slate-600 dark:text-zinc-400 max-h-full'} pointer-events-none {$$props.class ??
''}"
: 'text-slate-600 dark:text-zinc-400 max-h-full'} {$$props.class ?? ''}"
class:pointer-events-none={!clickThrough}
bind:this={element}
>
<Markdown inline={!expanded} source={body} />
@@ -13,6 +13,7 @@
export let showInstance: boolean =
$userSettings.showInstances.user ||
($userSettings.showInstances.comments && inComment)
export let displayName = $userSettings.displayNames
</script>
<a
@@ -34,7 +35,7 @@
class:ml-0.5={avatar}
>
<span class:font-medium={showInstance} class="username-text">
{$userSettings.displayNames ? user.display_name || user.name : user.name}
{displayName ? user.display_name || user.name : user.name}
</span>
{#if showInstance}
<span
+2 -2
View File
@@ -3,7 +3,7 @@
import { createAvatar } from '@dicebear/core'
import * as initials from '@dicebear/initials'
const sizes = [16, 32, 48, 64, 128, 256, 512]
const sizes = [16, 24, 32, 48, 64, 96, 128, 256, 512]
export let url: string | undefined
export let alt: string = ''
@@ -21,7 +21,7 @@
urlObj.searchParams.append('format', 'webp')
urlObj.searchParams.append(
'thumbnail',
findClosestNumber(sizes, res || width).toString()
findClosestNumber(sizes, (res || width) * 1.5).toString(),
)
return urlObj.toString()