design: update comment sizing
This commit is contained in:
9 files changed
+23
-31
No files matched your search
@@ -208,8 +208,7 @@
|
||||
source={node.comment_view.comment.content}
|
||||
noStyle
|
||||
class={[
|
||||
'text-base text-slate-700 dark:text-zinc-300 *:leading-[1.6] break-words space-y-3',
|
||||
|
||||
'text-[14px] sm:text-base text-slate-700 dark:text-zinc-300 *:leading-[1.6] break-words space-y-3',
|
||||
node.comment_view.comment.distinguished
|
||||
? 'bg-green-400/10 p-2 rounded-xl max-w-max font-medium'
|
||||
: page.url.hash.slice(1) ==
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
{@render passedTarget(acting)}
|
||||
{/snippet}
|
||||
{#if (profile.current?.user && amMod(profile.current.user, item.community)) || (profile.current?.user && isAdmin(profile.current.user))}
|
||||
<MenuDivider>
|
||||
<MenuDivider showLabel>
|
||||
{#if !item.community.local && !amMod(profile.current.user, item.community)}
|
||||
{$t('moderation.labelInstanceOnly')}
|
||||
{:else}
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
}: Props = $props()
|
||||
</script>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
@component
|
||||
This component will build two different things: a post's meta block and the title.
|
||||
-->
|
||||
@@ -337,7 +337,7 @@
|
||||
class={[
|
||||
'inline max-sm:mt-0!',
|
||||
'hover:underline hover:text-primary-900 dark:hover:text-primary-100 transition-colors',
|
||||
'font-medium',
|
||||
'font-medium text-balance max-w-xl',
|
||||
titleClass,
|
||||
settings.markReadPosts && read && 'text-slate-600 dark:text-zinc-400',
|
||||
view == 'compact' ? 'text-base' : 'text-lg',
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="text-slate-700 dark:text-zinc-300 flex flex-col w-max mx-auto items-center gap-4 {clazz}"
|
||||
class="text-slate-500 dark:text-zinc-500 contrast-more:text-slate-700 contrast-more:dark:text-zinc-300 flex flex-col w-max mx-auto items-center gap-4 {clazz}"
|
||||
>
|
||||
<div class="flex flex-col gap-2 items-center max-w-sm">
|
||||
{#if icon}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
>
|
||||
{@render navbar?.({
|
||||
class: [
|
||||
'bg-slate-100/50 dark:bg-zinc-950/90 border-slate-200/50 dark:border-zinc-900',
|
||||
'bg-slate-100/70 dark:bg-zinc-950/90 border-slate-200/50 dark:border-zinc-900',
|
||||
'pointer-events-auto backdrop-blur-xl border lg:border-t-0 lg:border-x-0',
|
||||
'rounded-full lg:rounded-none',
|
||||
],
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
'hover:text-slate-900 dark:hover:text-zinc-50 transition-colors',
|
||||
isSelected
|
||||
? 'text-primary-900 dark:text-primary-100 max-lg:bg-slate-100 max-lg:dark:bg-zinc-800'
|
||||
: 'text-slate-600 dark:text-zinc-400',
|
||||
: 'text-slate-500 dark:text-zinc-400',
|
||||
clazz,
|
||||
]}
|
||||
shadow="none"
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
</Modal>
|
||||
{/if}
|
||||
|
||||
<MenuDivider>{$t('nav.menu.label')}</MenuDivider>
|
||||
{#if profile.current?.jwt}
|
||||
<MenuButton href="/profile">
|
||||
{#snippet prefix()}
|
||||
@@ -146,7 +145,6 @@
|
||||
Debug
|
||||
</MenuButton>
|
||||
{/if}
|
||||
<MenuDivider />
|
||||
<li class="flex flex-col px-2 py-1 mx-auto my-1 text-xs w-full">
|
||||
<div class="flex flex-row gap-2 w-full items-center">
|
||||
<div class="flex-1">
|
||||
@@ -161,7 +159,10 @@
|
||||
</button>
|
||||
</div>
|
||||
<Button
|
||||
onclick={() => (showInstance = !showInstance)}
|
||||
onclick={e => {
|
||||
e.stopPropagation()
|
||||
showInstance = !showInstance
|
||||
}}
|
||||
color="tertiary"
|
||||
title={$t('nav.menu.instance')}
|
||||
size="square-md"
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
<script lang="ts">
|
||||
let { children } = $props()
|
||||
import type { Snippet } from 'svelte'
|
||||
|
||||
let {
|
||||
showLabel = false,
|
||||
children,
|
||||
}: { showLabel?: boolean; children: Snippet } = $props()
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="text-slate-800 dark:text-zinc-200 text-xs font-medium m-3 my-2 mb-1 flex items-center gap-1"
|
||||
>
|
||||
<div class="sr-only">{@render children?.()}</div>
|
||||
<div class={[!showLabel && 'sr-only']}>{@render children?.()}</div>
|
||||
<hr
|
||||
class="shrink flex-1 border-slate-100 dark:border-zinc-800 border-opacity-70 -mx-4"
|
||||
class={[
|
||||
'shrink flex-1 border-slate-100 dark:border-zinc-800',
|
||||
!showLabel && '-mx-4',
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
@@ -68,30 +68,14 @@
|
||||
strategy: strategy,
|
||||
placement: placement,
|
||||
middleware: middleware,
|
||||
onComputed: ({ x, y, placement }) => {
|
||||
onComputed: ({ placement }) => {
|
||||
if (popoverEl) {
|
||||
popoverEl.style.transformOrigin = origins[placement]
|
||||
}
|
||||
|
||||
console.log(placement)
|
||||
|
||||
// @ts-expect-error svelte hell
|
||||
Object.assign(el?.children?.item?.(0) ?? el, {
|
||||
top: '0',
|
||||
left: '0',
|
||||
transform: `translate3d(${roundByDPR(x)}px,${roundByDPR(y)}px,0)`,
|
||||
})
|
||||
},
|
||||
})
|
||||
|
||||
function roundByDPR(value: number) {
|
||||
const dpr = window.devicePixelRatio || 1
|
||||
return Math.round(value * dpr) / dpr
|
||||
}
|
||||
|
||||
const customFloatingContent = (node: HTMLDivElement) => {
|
||||
// if (!canUseContents) return
|
||||
|
||||
floatingContent(node)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user