design: improve post page

This commit is contained in:
Xylight committed 2024-08-03 11:36:23 -07:00
1 parent 160622e760
commit 9bde0e5686
4 files changed
+63 -35

No files matched your search

@@ -17,7 +17,7 @@
import { profile } from '$lib/auth.js'
import { Button } from 'mono-svelte'
import { afterNavigate } from '$app/navigation'
import { backOut } from 'svelte/easing'
import { backOut, expoOut } from 'svelte/easing'
import { t } from '$lib/translations'
import { browser } from '$app/environment'
@@ -73,7 +73,7 @@
// 0.18.2 -> 0.18.3 broke this
// so i'm adding this check
const treeParent = tree.find(
(c) => c.comment_view.comment.id == parent.comment_view.comment.id,
(c) => c.comment_view.comment.id == parent.comment_view.comment.id
)
if (treeParent) {
@@ -107,7 +107,7 @@
</script>
<ul
in:fly={{ opacity: 0, y: -4, duration: 400, easing: backOut }}
in:fly={{ duration: 500, easing: expoOut, y: -12 }}
class={isParent
? 'divide-y dark:divide-zinc-900 divide-slate-100'
: 'pl-3.5 border-l border-slate-200 dark:border-zinc-800 my-1'}
@@ -140,7 +140,7 @@
fetchChildren(node).then(() => (node.loading = false))
}}
>
<Icon src={ChevronDoubleDown} mini size="16" slot="prefix" />
<Icon src={ChevronDoubleDown} micro size="16" slot="prefix" />
{$t('comment.more', {
// @ts-ignore
comments: node.comment_view.counts.child_count,
@@ -170,7 +170,7 @@
</Label>
{/if}
<div
class="flex flex-col border border-slate-200 border-b-slate-300 dark:border-t-zinc-700 dark:border-zinc-800
class="flex flex-col border border-slate-200 border-b-slate-300 dark:border-t-zinc-700/70 dark:border-zinc-800
focus-within:border-primary-900 focus-within:dark:border-primary-100 focus-within:ring ring-slate-300
dark:ring-zinc-700 rounded-xl
overflow-hidden transition-colors {$$props.class}"
+2 -2
View File
@@ -21,7 +21,7 @@
urlObj.searchParams.append('format', 'webp')
urlObj.searchParams.append(
'thumbnail',
findClosestNumber(sizes, (res || width) * 1.5).toString(),
findClosestNumber(sizes, (res || width) * 1.5).toString()
)
return urlObj.toString()
@@ -35,11 +35,11 @@
{#if optimizedURL}
<img
loading="lazy"
src={optimizedURL}
{alt}
{width}
{title}
loading="lazy"
class="aspect-square object-cover overflow-hidden {$$props.class} flex-shrink-0"
style="width: {width}px; height: {width}px;"
class:rounded-full={circle}