Merge pull request #551 from Xyphyn/tailwindcss-v4
migrate: update to TailwindCSS v4
This commit is contained in:
119 files changed
+383
-5772
No files matched your search
@@ -11,5 +11,4 @@ vite.config.ts.timestamp-*
|
||||
stats.html
|
||||
dev-dist
|
||||
yarn-error.log
|
||||
bun.lockb
|
||||
yarn.lock
|
||||
Generated
-5404
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -11,9 +11,9 @@
|
||||
"@sveltejs/kit": "^2.17.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
||||
"@tailwindcss/container-queries": "^0.1.1",
|
||||
"@tailwindcss/postcss": "^4.1.8",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/ua-parser-js": "^0.7.39",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"jsdom": "^22.1.0",
|
||||
"lemmy-js-client": "^0.19.6-beta.1",
|
||||
"linkify-it": "^5.0.0",
|
||||
@@ -33,7 +33,7 @@
|
||||
"svelte-infinite-scroll": "^2.0.1",
|
||||
"svelte-markdown": "^0.4.1",
|
||||
"sveltekit-i18n": "^2.4.2",
|
||||
"tailwindcss": "^3.3.3",
|
||||
"tailwindcss": "^4.1.8",
|
||||
"tslib": "^2.4.1",
|
||||
"typescript": "^5.5.0",
|
||||
"ua-parser-js": "^1.0.38",
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
export default {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
'@tailwindcss/postcss': {},
|
||||
},
|
||||
}
|
||||
@@ -50,6 +50,6 @@
|
||||
{required}
|
||||
{...rest}
|
||||
rows={1}
|
||||
class="font-semibold text-2xl focus:outline-none w-full bg-transparent resize-none {clazz}"
|
||||
class="font-semibold text-2xl focus:outline-hidden w-full bg-transparent resize-none {clazz}"
|
||||
></textarea>
|
||||
</label>
|
||||
@@ -54,7 +54,7 @@
|
||||
{richURL.hostname}
|
||||
</span>
|
||||
<span
|
||||
class="text-transparent bg-clip-text bg-gradient-to-r
|
||||
class="text-transparent bg-clip-text bg-linear-to-r
|
||||
from-blue-300 via-blue-300 to-blue-300/0 w-full
|
||||
dark:from-blue-800 dark:via-blue-800 dark:to-blue-800/0
|
||||
"
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
`
|
||||
|
||||
const buttonClass = (selected: boolean) => `
|
||||
first:rounded-l-lg first:border-l first:dark:border-l-transparent
|
||||
last:rounded-r-lg last:border-r last:dark:border-r-transparent
|
||||
first:rounded-l-lg first:border-l dark:first:border-l-transparent
|
||||
last:rounded-r-lg last:border-r dark:last:border-r-transparent
|
||||
rounded-l-none
|
||||
rounded-r-none
|
||||
px-3 py-1.5 text-sm hover:brightness-110 ${buttonClazz || ''}
|
||||
${
|
||||
!selected
|
||||
? `hover:dark:bg-zinc-800 border-slate-100 border-t border-b border-b-slate-300 dark:border-b-0
|
||||
? `dark:hover:bg-zinc-800 border-slate-100 border-t border-b border-b-slate-300 dark:border-b-0
|
||||
dark:border-t dark:border-t-zinc-700`
|
||||
: ''
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<div class="flex flex-col gap-1">
|
||||
{#if taglines && taglines.length > 0}
|
||||
<Markdown
|
||||
class="!pt-0"
|
||||
class="pt-0!"
|
||||
source={taglines[Math.floor(Math.random() * taglines.length)].content}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
src={open ? Minus : Plus}
|
||||
size="16"
|
||||
micro
|
||||
class="transition-transform duration-[400ms] ease-out {open
|
||||
class="transition-transform duration-400 ease-out {open
|
||||
? ''
|
||||
: 'rotate-90'} text-primary-900 dark:text-primary-100"
|
||||
/>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</script>
|
||||
|
||||
<Material
|
||||
class="flex flex-col flex-1 !bg-transparent !border-0 rounded-none
|
||||
class="flex flex-col flex-1 bg-transparent! border-0! rounded-none
|
||||
{view == 'compact' ? 'py-4' : 'py-5'} {clazz}"
|
||||
color="distinct"
|
||||
padding="none"
|
||||
|
||||
@@ -48,14 +48,19 @@
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="h-full flex items-center overflow-hidden {buttonColor.ghost} rounded-full hover:bg-transparent font-medium"
|
||||
class={[
|
||||
'h-full flex items-center overflow-hidden rounded-full hover:bg-transparent font-medium',
|
||||
buttonColor.ghost,
|
||||
]}
|
||||
>
|
||||
<button
|
||||
onclick={() => castVote(vote == 1 ? 0 : 1)}
|
||||
class="flex items-center gap-0.5 transition-colors px-1.5 h-full
|
||||
{vote == 1
|
||||
? shouldShowVoteColor(vote, 'upvotes')
|
||||
: 'hover:bg-slate-100 hover:dark:bg-zinc-800'}"
|
||||
class={[
|
||||
'flex items-center gap-0.5 transition-colors px-1.5 h-full cursor-pointer',
|
||||
vote == 1
|
||||
? shouldShowVoteColor(vote, 'upvotes')
|
||||
: 'hover:bg-slate-100 dark:hover:bg-zinc-800',
|
||||
]}
|
||||
>
|
||||
<Icon src={ChevronUp} size="18" mini />
|
||||
<span class="grid text-sm">
|
||||
@@ -71,14 +76,16 @@
|
||||
</span>
|
||||
</button>
|
||||
<div
|
||||
class="border-l h-4 w-0 !p-0 border-slate-200 dark:border-zinc-800"
|
||||
class="border-l h-4 w-0 p-0! border-slate-200 dark:border-zinc-800"
|
||||
></div>
|
||||
<button
|
||||
onclick={() => castVote(vote == -1 ? 0 : -1)}
|
||||
class="flex flex-row-reverse items-center gap-0.5 h-full transition-colors border-0 px-1.5
|
||||
{vote == -1
|
||||
? shouldShowVoteColor(vote, 'downvotes')
|
||||
: 'hover:bg-slate-100 hover:dark:bg-zinc-800'}"
|
||||
class={[
|
||||
'flex flex-row-reverse items-center gap-0.5 transition-colors px-1.5 h-full cursor-pointer',
|
||||
vote == 1
|
||||
? shouldShowVoteColor(vote, 'upvotes')
|
||||
: 'hover:bg-slate-100 dark:hover:bg-zinc-800',
|
||||
]}
|
||||
>
|
||||
<Icon src={ChevronDown} size="18" mini />
|
||||
<span class="grid text-sm">
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
{#if node.comment_view.counts.child_count > 0 && node.children.length == 0}
|
||||
<svelte:element
|
||||
this={hydrated ? 'div' : 'a'}
|
||||
class="w-full h-10 !border-y-0 -mt-2 -ml-2.5"
|
||||
class="w-full h-10 border-y-0! -mt-2 -ml-2.5"
|
||||
href="/comment/{page.params.instance}/{node.comment_view.comment.id}"
|
||||
>
|
||||
<Button
|
||||
@@ -138,7 +138,7 @@
|
||||
disabled={nodes[index].loading}
|
||||
rounding="pill"
|
||||
color="tertiary"
|
||||
class="font-normal !text-sm text-slate-600 dark:text-zinc-400"
|
||||
class="font-normal text-sm! text-slate-600 dark:text-zinc-400"
|
||||
loaderWidth={16}
|
||||
onclick={() => {
|
||||
if (nodes[index].depth > 4) {
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
<Expandable bind:open={settings.expand.about} class="!pt-0">
|
||||
<Expandable bind:open={settings.expand.about} class="pt-0!">
|
||||
{#snippet title()}
|
||||
<span class="py-1 px-1 flex gap-1 items-center w-full">
|
||||
{$t('cards.site.about')}
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||
import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte'
|
||||
import LabelStat from '$lib/components/ui/LabelStat.svelte'
|
||||
import PostBody from '../post/PostBody.svelte'
|
||||
import { t } from '$lib/translations'
|
||||
import Entity from '$lib/components/ui/Entity.svelte'
|
||||
|
||||
let showInfo = $state(false)
|
||||
interface Props {
|
||||
@@ -79,9 +77,9 @@
|
||||
/>
|
||||
{/if}
|
||||
<div
|
||||
class="flex flex-col overflow-hidden whitespace-nowrap flex-1 min-w-0 flex-shrink"
|
||||
class="flex flex-col overflow-hidden whitespace-nowrap flex-1 min-w-0 shrink"
|
||||
>
|
||||
<div class="font-medium text-base overflow-hidden overflow-ellipsis">
|
||||
<div class="font-medium text-base overflow-hidden text-ellipsis">
|
||||
<span>{community.community.title}</span>
|
||||
{#if community.community.deleted}
|
||||
<Icon
|
||||
@@ -124,10 +122,10 @@
|
||||
class="text-sm text-slate-600 dark:text-zinc-400 flex gap-0.5"
|
||||
class:justify-center={view == 'cozy'}
|
||||
>
|
||||
<span class="overflow-hidden overflow-ellipsis">
|
||||
<span class="overflow-hidden text-ellipsis">
|
||||
{new URL(community.community.actor_id).hostname}
|
||||
</span>
|
||||
<span class="overflow-hidden overflow-ellipsis">
|
||||
<span class="overflow-hidden text-ellipsis">
|
||||
{#if !showCounts}
|
||||
•
|
||||
<FormattedNumber number={community.counts.subscribers} />
|
||||
@@ -138,7 +136,12 @@
|
||||
</div>
|
||||
</a>
|
||||
<div class="flex flex-row items-center gap-2">
|
||||
<Button size="square-md" onclick={() => (showInfo = !showInfo)}>
|
||||
<Button
|
||||
size="square-md"
|
||||
rounding="pill"
|
||||
color="ghost"
|
||||
onclick={() => (showInfo = !showInfo)}
|
||||
>
|
||||
<Icon src={InformationCircle} size="16" mini />
|
||||
</Button>
|
||||
<Subscribe {community}>
|
||||
@@ -172,7 +175,7 @@
|
||||
class="{isSubscribed(community.subscribed)
|
||||
? 'text-slate-600 dark:text-zinc-400'
|
||||
: ''}
|
||||
aspect-square h-8 @md:px-2 @md:min-w-32 @md:aspect-auto"
|
||||
aspect-square h-8.5 @md:px-2 @md:min-w-30 @md:aspect-auto @md:rounded-full"
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon
|
||||
|
||||
@@ -51,14 +51,14 @@
|
||||
{/if}
|
||||
|
||||
{#if name}
|
||||
<span class="flex gap-0 items-center max-w-full min-w-0 flex-shrink">
|
||||
<span class="flex gap-0 items-center max-w-full min-w-0 shrink">
|
||||
<span class="font-medium username-text">
|
||||
{displayName ? community.title : community.name}
|
||||
</span>
|
||||
{#if showInstance}
|
||||
<span
|
||||
class="text-slate-500 dark:text-zinc-500 font-normal
|
||||
instance-text flex-shrink {instanceClass || ''}"
|
||||
instance-text shrink {instanceClass || ''}"
|
||||
>
|
||||
@{new URL(community.actor_id).hostname}
|
||||
</span>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<Menu placement="bottom" class="top-0 h-[26px] w-[26px] ">
|
||||
{#snippet target()}
|
||||
<Button
|
||||
class="w-[26px] h-[26px] hover:!text-green-500 dark:text-zinc-400 text-slate-600"
|
||||
class="w-[26px] h-[26px] hover:text-green-500! dark:text-zinc-400 text-slate-600"
|
||||
size="square-md"
|
||||
color="tertiary"
|
||||
{...rest}
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<Menu placement="bottom-end">
|
||||
{#snippet target()}
|
||||
<Button
|
||||
class="hover:!text-green-500"
|
||||
class="hover:text-green-500!"
|
||||
size="square-md"
|
||||
color="ghost"
|
||||
loading={acting}
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
import { goto } from '$app/navigation'
|
||||
import type { ClassValue } from 'svelte/elements'
|
||||
|
||||
function getTagRule(tags: Tag[]): 'blur' | 'hide' | undefined {
|
||||
function getTagRule(tags: Tag[]): 'blur-sm' | 'hide' | undefined {
|
||||
const tagContent = tags.map((t) => t.content.toLowerCase())
|
||||
|
||||
let rule: 'blur' | 'hide' | undefined
|
||||
let rule: 'blur-sm' | 'hide' | undefined
|
||||
if (settings.nsfwBlur && (post.post.nsfw || post.community.nsfw))
|
||||
rule = 'blur'
|
||||
rule = 'blur-sm'
|
||||
tagContent.forEach((tag) => {
|
||||
if (settings.tagRules?.[tag]) rule = settings.tagRules?.[tag] ?? rule
|
||||
if (rule == 'hide') return rule
|
||||
@@ -104,7 +104,7 @@
|
||||
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
||||
<div
|
||||
class={[
|
||||
'post relative max-w-full min-w-0 w-full cursor-pointer outline-none group',
|
||||
'post relative max-w-full min-w-0 w-full cursor-pointer outline-hidden group',
|
||||
settings.leftAlign && 'left-align',
|
||||
view == 'compact' && 'py-3 list-type compact',
|
||||
view == 'cozy' && 'py-5 flex flex-col gap-2',
|
||||
@@ -146,7 +146,7 @@
|
||||
{#if rule != 'hide'}
|
||||
<PostMedia
|
||||
post={post.post}
|
||||
blur={rule == 'blur' ? true : undefined}
|
||||
blur={rule == 'blur-sm' ? true : undefined}
|
||||
{view}
|
||||
{type}
|
||||
/>
|
||||
@@ -158,9 +158,9 @@
|
||||
{type}
|
||||
class="{settings.leftAlign
|
||||
? 'mr-3'
|
||||
: 'ml-3'} flex-shrink no-list-margin"
|
||||
: 'ml-3'} shrink no-list-margin"
|
||||
style="grid-area: media;"
|
||||
blur={rule == 'blur' ? true : undefined}
|
||||
blur={rule == 'blur-sm' ? true : undefined}
|
||||
{view}
|
||||
/>
|
||||
{/if}
|
||||
@@ -181,8 +181,8 @@
|
||||
class="absolute overflow-hidden inset-0
|
||||
sm:rounded-xl bg-slate-50 dark:bg-zinc-900
|
||||
opacity-0 transition-all -z-50 no-list-margin
|
||||
group-hover:inset-y-0.5 group-hover:-inset-x-4 group-hover:sm:-inset-x-5 group-hover:opacity-100
|
||||
group-focus:inset-y-0.5 group-focus:-inset-x-4 group-focus:sm:-inset-x-5 group-focus:opacity-100
|
||||
group-hover:inset-y-0.5 group-hover:-inset-x-4 sm:group-hover:-inset-x-5 group-hover:opacity-100
|
||||
group-focus:inset-y-0.5 group-focus:-inset-x-4 sm:group-focus:-inset-x-5 group-focus:opacity-100
|
||||
duration-150"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
{/if}
|
||||
|
||||
<footer
|
||||
class="flex flex-row gap-2 items-center flex-shrink-0 {buttonHeight}"
|
||||
class="flex flex-row gap-2 items-center shrink-0 {buttonHeight}"
|
||||
class:flex-row-reverse={settings.posts.reverseActions}
|
||||
{style}
|
||||
>
|
||||
@@ -131,7 +131,7 @@
|
||||
<Button
|
||||
size="custom"
|
||||
href="{postLink(post.post)}#comments"
|
||||
class="!text-inherit h-full px-3 relative"
|
||||
class="text-inherit! h-full px-3 relative"
|
||||
color="ghost"
|
||||
rounding="pill"
|
||||
target={settings.openLinksInNewTab ? '_blank' : ''}
|
||||
@@ -280,7 +280,7 @@
|
||||
<MenuDivider>{$t('post.actions.more.creator')}</MenuDivider>
|
||||
<MenuButton link href={userLink(post.creator)}>
|
||||
{#snippet prefix()}
|
||||
<Icon src={UserCircle} size="16" micro class="flex-shrink-0" />
|
||||
<Icon src={UserCircle} size="16" micro class="shrink-0" />
|
||||
{/snippet}
|
||||
<TextProps wrap="no-wrap">
|
||||
{post.creator.name}
|
||||
@@ -288,7 +288,7 @@
|
||||
</MenuButton>
|
||||
<MenuButton link href={communityLink(post.community)}>
|
||||
{#snippet prefix()}
|
||||
<Icon src={Newspaper} size="16" micro class="flex-shrink-0" />
|
||||
<Icon src={Newspaper} size="16" micro class="shrink-0" />
|
||||
{/snippet}
|
||||
<TextProps wrap="no-wrap">
|
||||
{post.community.title}
|
||||
@@ -338,7 +338,7 @@
|
||||
)
|
||||
toast({ content: $t('toast.copied') })
|
||||
}}
|
||||
class="flex-1 !py-0"
|
||||
class="flex-1 py-0!"
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon src={Share} size="16" micro />
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
{style}
|
||||
class="{!expanded
|
||||
? ` overflow-hidden
|
||||
bg-gradient-to-b text-transparent from-slate-600 via-slate-600
|
||||
bg-linear-to-b text-transparent from-slate-600 via-slate-600
|
||||
dark:from-zinc-400 dark:via-zinc-400 bg-clip-text z-0 max-h-36`
|
||||
: 'text-slate-600 dark:text-zinc-400 max-h-full'} text-base {clazz}"
|
||||
class:pointer-events-none={!clickThrough}
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<Popover autoClose={false} popoverClass="backdrop-blur-xl rounded-2xl">
|
||||
{#snippet target()}
|
||||
<button
|
||||
class="row-span-2 flex-shrink-0 mr-2 self-center group/btn bg-slate-200 dark:bg-zinc-800 rounded-full"
|
||||
class="row-span-2 shrink-0 mr-2 self-center group/btn bg-slate-200 dark:bg-zinc-800 rounded-full"
|
||||
>
|
||||
<Avatar
|
||||
url={community?.icon}
|
||||
@@ -147,7 +147,7 @@
|
||||
{#if community && subscribed}
|
||||
<div
|
||||
class="bg-white/80 dark:bg-zinc-900/90 border border-slate-200 dark:border-zinc-800 rounded-2xl shadow-xl p-4
|
||||
max-w-2xl w-full max-h-[32rem] overflow-auto"
|
||||
max-w-2xl w-full max-h-128 overflow-auto"
|
||||
>
|
||||
<CommunityHeader {community} {subscribed} />
|
||||
</div>
|
||||
@@ -159,7 +159,7 @@
|
||||
<CommunityLink
|
||||
{community}
|
||||
style="grid-area: community;"
|
||||
class="flex-shrink no-list-margin"
|
||||
class="shrink no-list-margin"
|
||||
badges={{
|
||||
nsfw: community.nsfw,
|
||||
}}
|
||||
@@ -186,7 +186,7 @@
|
||||
avatarSize={20}
|
||||
{user}
|
||||
avatar={!showCommunity}
|
||||
class="flex-shrink "
|
||||
class="shrink "
|
||||
>
|
||||
{#snippet extraBadges()}
|
||||
{#if badges.moderator}
|
||||
@@ -200,7 +200,7 @@
|
||||
</address>
|
||||
{/if}
|
||||
{#if published}
|
||||
<RelativeDate date={published} class="flex-shrink-0" />
|
||||
<RelativeDate date={published} class="shrink-0" />
|
||||
{/if}
|
||||
{#if edited}
|
||||
<div
|
||||
@@ -216,7 +216,7 @@
|
||||
</div>
|
||||
<div
|
||||
class="flex flex-row min-[480px]:justify-end items-center self-center
|
||||
flex-wrap gap-2 [&>*]:flex-shrink-0 badges min-[480px]:ml-2"
|
||||
flex-wrap gap-2 *:shrink-0 badges min-[480px]:ml-2"
|
||||
style="grid-area: badges;"
|
||||
>
|
||||
{#if tags}
|
||||
@@ -306,7 +306,7 @@
|
||||
<a
|
||||
href="/post/{encodeURIComponent(instance.data)}/{id}"
|
||||
class="inline hover:underline
|
||||
hover:text-primary-900 hover:dark:text-primary-100 transition-colors max-[480px]:!mt-0
|
||||
hover:text-primary-900 dark:hover:text-primary-100 transition-colors max-[480px]:mt-0!
|
||||
{settings.font == 'satoshi/nunito'
|
||||
? 'font-display font-semibold'
|
||||
: 'font-medium'} {titleClass}"
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
import { settings } from '$lib/settings.svelte.js'
|
||||
export const voteColor = (vote: number, border: boolean = false) =>
|
||||
vote == 1
|
||||
? `bg-gradient-to-br from-blue-500 to-indigo-500 dark:from-blue-400 dark:to-indigo-500 text-slate-50 dark:text-zinc-900`
|
||||
? `bg-linear-to-br from-blue-500 to-indigo-500 dark:from-blue-400 dark:to-indigo-500 text-slate-50 dark:text-zinc-900`
|
||||
: vote == -1
|
||||
? `bg-gradient-to-br from-red-500 to-pink-500 dark:from-red-400 dark:to-pink-600 text-slate-50 `
|
||||
? `bg-linear-to-br from-red-500 to-pink-500 dark:from-red-400 dark:to-pink-600 text-slate-50 `
|
||||
: ''
|
||||
|
||||
export const shouldShowVoteColor = (
|
||||
@@ -72,21 +72,24 @@
|
||||
|
||||
{#if children}{@render children({ vote, score })}{:else}
|
||||
<div
|
||||
class="{buttonColor.ghost} rounded-full h-full font-medium flex items-center *:p-2
|
||||
hover:bg-white hover:dark:bg-zinc-900 overflow-hidden transition-colors flex-shrink-0
|
||||
{vote != 0
|
||||
? ''
|
||||
: '!text-inherit'} !text-inherit divide-x divide-slate-200 dark:divide-zinc-800
|
||||
{loading ? 'animate-pulse opacity-75 pointer-events-none' : ''}"
|
||||
class={[
|
||||
buttonColor.ghost,
|
||||
'rounded-full h-full font-medium flex items-center *:p-2',
|
||||
'hover:bg-white dark:hover:bg-zinc-900 overflow-hidden transition-colors shrink-0',
|
||||
'text-inherit! divide-x divide-slate-200 dark:divide-zinc-800',
|
||||
loading && 'animate-pulse opacity-75 pointer-events-none',
|
||||
]}
|
||||
role="group"
|
||||
aria-label={$t('aria.vote.group')}
|
||||
>
|
||||
<button
|
||||
onclick={() => castVote(vote == 1 ? 0 : 1)}
|
||||
class="flex items-center gap-0.5 transition-colors relative z-0
|
||||
{vote == 1
|
||||
? shouldShowVoteColor(vote, 'upvotes')
|
||||
: 'hover:bg-slate-100 hover:dark:bg-zinc-800'}"
|
||||
class={[
|
||||
'flex items-center gap-0.5 transition-colors relative cursor-pointer',
|
||||
vote == 1
|
||||
? shouldShowVoteColor(vote, 'upvotes')
|
||||
: 'hover:bg-slate-100 dark:hover:bg-zinc-800',
|
||||
]}
|
||||
aria-pressed={vote == 1}
|
||||
aria-label={$t('post.actions.vote.upvote')}
|
||||
>
|
||||
@@ -109,10 +112,12 @@
|
||||
{#if site.data?.site_view.local_site.enable_downvotes ?? true}
|
||||
<button
|
||||
onclick={() => castVote(vote == -1 ? 0 : -1)}
|
||||
class="flex items-center flex-row-reverse gap-0.5 transition-colors
|
||||
{vote == -1
|
||||
? shouldShowVoteColor(vote, 'downvotes')
|
||||
: 'hover:bg-slate-100 hover:dark:bg-zinc-800'}"
|
||||
class={[
|
||||
'flex items-center flex-row-reverse gap-0.5 transition-colors cursor-pointer',
|
||||
vote == -1
|
||||
? shouldShowVoteColor(vote, 'downvotes')
|
||||
: 'hover:bg-slate-100 dark:hover:bg-zinc-800',
|
||||
]}
|
||||
aria-pressed={vote == -1}
|
||||
aria-label={$t('post.actions.vote.downvote')}
|
||||
>
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
<div
|
||||
class="flex flex-col justify-center items-center
|
||||
rounded-xl gap-2 py-8 mt-6
|
||||
border !border-b !border-red-500 bg-red-500/5 px-4"
|
||||
border border-b! border-red-500! bg-red-500/5 px-4"
|
||||
>
|
||||
<div class="bg-red-500/30 rounded-full p-3 text-red-500">
|
||||
<Icon src={ExclamationTriangle} size="24" solid></Icon>
|
||||
@@ -229,7 +229,7 @@
|
||||
class="w-96 max-w-full h-8 bg-slate-100 dark:bg-zinc-800 rounded-md"
|
||||
></div>
|
||||
<div class="w-full h-48 bg-slate-100 dark:bg-zinc-800 rounded-md"></div>
|
||||
<div class="!bg-transparent h-8 flex justify-between">
|
||||
<div class="bg-transparent! h-8 flex justify-between">
|
||||
<div class="w-48 h-8 bg-slate-100 dark:bg-zinc-800 rounded-md"></div>
|
||||
<div class="w-24 h-8 bg-slate-100 dark:bg-zinc-800 rounded-md"></div>
|
||||
</div>
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
<div class="flex flex-col gap-1">
|
||||
<span class="font-medium text-sm">{$t('form.post.community')}</span>
|
||||
<Button
|
||||
class="w-full !bg-white dark:!bg-black h-[38px]"
|
||||
class="w-full bg-white! dark:bg-black! h-[38px]"
|
||||
onclick={() => (data.community = null)}
|
||||
alignment="left"
|
||||
size="sm"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
class="flex flex-col-reverse sm:flex-row
|
||||
overflow-hidden gap-4 embed-card z-0 relative
|
||||
dark:border-t-zinc-800 border-opacity-80 max-w-full
|
||||
dark:bg-zinc-950 group-hover/link:bg-slate-50 group-hover/link:dark:bg-zinc-900 transition-colors"
|
||||
dark:bg-zinc-950 group-hover/link:bg-slate-50 dark:group-hover/link:bg-zinc-900 transition-colors"
|
||||
rounding="2xl"
|
||||
element="article"
|
||||
>
|
||||
@@ -67,7 +67,7 @@
|
||||
</div>
|
||||
{#if thumbnail_url}
|
||||
<picture
|
||||
class="-m-4 mb-auto sm:-mb-4 sm:ml-auto flex-shrink-0 sm:w-1/3 sm:max-w-60"
|
||||
class="-m-4 mb-auto sm:-mb-4 sm:ml-auto shrink-0 sm:w-1/3 sm:max-w-60"
|
||||
>
|
||||
<source
|
||||
srcset={optimizeImageURL(thumbnail_url, 256)}
|
||||
@@ -98,7 +98,7 @@
|
||||
href={url}
|
||||
target="_blank"
|
||||
class="text-slate-900 dark:text-zinc-300 items-center
|
||||
text-xs overflow-hidden max-w-full block flex-shrink self-start w-max"
|
||||
text-xs overflow-hidden max-w-full block shrink self-start w-max"
|
||||
size="xs"
|
||||
color="ghost"
|
||||
rounding="pill"
|
||||
|
||||
@@ -135,12 +135,12 @@
|
||||
{#if thumbnail}
|
||||
<img
|
||||
src={optimizeImageURL(thumbnail, 512)}
|
||||
class="absolute top-0 left-0 -z-10 brightness-[25%] w-full object-cover h-full"
|
||||
class="absolute top-0 left-0 -z-10 brightness-25 w-full object-cover h-full"
|
||||
alt=""
|
||||
/>
|
||||
{:else}
|
||||
<div
|
||||
class="absolute blur-3xl -z-10 top-0 left-0 w-full h-full bg-gradient-to-br from-green-800 via-blue-900 via-20% to-red-700"
|
||||
class="absolute blur-3xl -z-10 top-0 left-0 w-full h-full bg-linear-to-br from-green-800 via-blue-900 via-20% to-red-700"
|
||||
></div>
|
||||
{/if}
|
||||
<Icon src={data.icon} solid size="48" />
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<div
|
||||
class="absolute bottom-0 left-0 right-0 flex justify-between items-center
|
||||
rounded-full ml-auto w-max m-2 p-0 gap-1
|
||||
*:bg-white *:border *:border-slate-200 *:dark:border-zinc-800 *:dark:bg-zinc-900"
|
||||
*:bg-white *:border *:border-slate-200 dark:*:border-zinc-800 dark:*:bg-zinc-900"
|
||||
onclick={(e) => e.stopPropagation()}
|
||||
>
|
||||
{#if post.alt_text}
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<div
|
||||
class="object-cover overflow-hidden bg-slate-50 dark:bg-zinc-900 rounded-xl
|
||||
border border-slate-200 dark:border-zinc-800 group-hover/media:border-slate-400
|
||||
group-hover/media:dark:border-zinc-600 transition-colors text-slate-400 dark:text-zinc-600 grid
|
||||
dark:group-hover/media:border-zinc-600 transition-colors text-slate-400 dark:text-zinc-600 grid
|
||||
place-items-center {size}"
|
||||
>
|
||||
<Icon
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if (badges.photon && badges.photon?.includes?.(actor_id)) {
|
||||
return {
|
||||
classes:
|
||||
'bg-gradient-to-r bg-clip-text text-transparent from-blue-500 to-purple-700 dark:from-blue-400 dark:to-purple-500',
|
||||
'bg-linear-to-r bg-clip-text text-transparent from-blue-500 to-purple-700 dark:from-blue-400 dark:to-purple-500',
|
||||
icon: 'photon',
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@
|
||||
if (badges.translator && badges.translator?.includes?.(actor_id)) {
|
||||
return {
|
||||
classes:
|
||||
'bg-gradient-to-r bg-clip-text text-transparent from-sky-500 to-blue-700 dark:from-blue-300 dark:to-indigo-500',
|
||||
'bg-linear-to-r bg-clip-text text-transparent from-sky-500 to-blue-700 dark:from-blue-300 dark:to-indigo-500',
|
||||
icon: Language,
|
||||
iconClass: 'text-blue-500 dark:text-blue-400',
|
||||
}
|
||||
@@ -97,11 +97,11 @@
|
||||
url={user.avatar}
|
||||
alt={user.name}
|
||||
width={avatarSize}
|
||||
class="flex-shrink-0"
|
||||
class="shrink-0"
|
||||
/>
|
||||
{/if}
|
||||
<span
|
||||
class="flex gap-0 items-center flex-shrink max-w-full min-w-0"
|
||||
class="flex gap-0 items-center shrink max-w-full min-w-0"
|
||||
class:ml-0.5={avatar}
|
||||
>
|
||||
<span
|
||||
@@ -112,7 +112,7 @@
|
||||
</span>
|
||||
{#if showInstance}
|
||||
<span
|
||||
class="text-slate-500 dark:text-zinc-500 font-normal instance-text flex-shrink {instanceClass ??
|
||||
class="text-slate-500 dark:text-zinc-500 font-normal instance-text shrink {instanceClass ??
|
||||
''}"
|
||||
>
|
||||
@{new URL(user.actor_id).hostname}
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
<div
|
||||
class="{noStyle
|
||||
? ''
|
||||
: 'break-words flex flex-col gap-2 leading-[1.5]'} {clazz}"
|
||||
: 'break-words flex flex-col gap-2 leading-normal'} {clazz}"
|
||||
{style}
|
||||
>
|
||||
<SvelteMarkdown
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
{/if}
|
||||
<div
|
||||
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
|
||||
focus-within:border-primary-900 dark:focus-within:border-primary-100 focus-within:ring-3 ring-slate-300
|
||||
dark:ring-zinc-700 rounded-xl
|
||||
overflow-hidden transition-colors {clazz}"
|
||||
class:mt-1={label}
|
||||
@@ -160,7 +160,7 @@ overflow-hidden transition-colors {clazz}"
|
||||
{#if tools}
|
||||
<!--Toolbar-->
|
||||
<div
|
||||
class="[&>*]:flex-shrink-0 flex flex-row overflow-auto p-1.5 gap-1.5 border-b
|
||||
class="*:shrink-0 flex flex-row overflow-auto p-1.5 gap-1.5 border-b
|
||||
border-slate-200 dark:border-zinc-900 {disabled
|
||||
? 'opacity-60 pointer-events-none'
|
||||
: ''}"
|
||||
@@ -262,7 +262,7 @@ overflow-hidden transition-colors {clazz}"
|
||||
{/if}
|
||||
<!--Actual text area-->
|
||||
<TextArea
|
||||
class="bg-inherit z-0 border-0 rounded-none !ring-0 focus:!ring-transparent !transition-none resize-none"
|
||||
class="bg-inherit z-0 border-0 rounded-none ring-0! focus:ring-transparent! transition-none! resize-none"
|
||||
bind:value
|
||||
bind:element={textArea}
|
||||
onkeydown={(e) => {
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
{#if ordered}
|
||||
<ol
|
||||
{start}
|
||||
class="pl-5 list-decimal *:marker:font-medium *:marker:text-primary-900 *:marker:dark:text-primary-100"
|
||||
class="pl-5 list-decimal *:marker:font-medium *:marker:text-primary-900 dark:*:marker:text-primary-100"
|
||||
>
|
||||
{@render children?.()}
|
||||
</ol>
|
||||
{:else}
|
||||
<ul
|
||||
class="list-disc pl-4 *:marker:text-primary-900 *:marker:dark:text-primary-100"
|
||||
class="list-disc pl-4 *:marker:text-primary-900 dark:*:marker:text-primary-100"
|
||||
>
|
||||
{@render children?.()}
|
||||
</ul>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
let { children } = $props()
|
||||
</script>
|
||||
|
||||
<p class="leading-[1.5] break-words {options.inline ? '' : 'max-w'}">
|
||||
<p class="leading-normal break-words {options.inline ? '' : 'max-w'}">
|
||||
{@render children?.()}
|
||||
</p>
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
{alt}
|
||||
{width}
|
||||
{title}
|
||||
class={['aspect-square object-cover overflow-hidden flex-shrink-0', clazz]}
|
||||
class={['aspect-square object-cover overflow-hidden shrink-0', clazz]}
|
||||
style="width: {width}px; height: {width}px; {style}"
|
||||
class:rounded-full={circle}
|
||||
class:rounded-md={!circle}
|
||||
@@ -74,7 +74,7 @@
|
||||
{:else}
|
||||
<div
|
||||
style="width: {width}px; height: {width}px;"
|
||||
class={['aspect-square object-cover overflow-hidden flex-shrink-0', clazz]}
|
||||
class={['aspect-square object-cover overflow-hidden shrink-0', clazz]}
|
||||
class:rounded-full={circle}
|
||||
class:rounded-md={!circle}
|
||||
>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
this={url ? 'a' : 'span'}
|
||||
href={url}
|
||||
class="text-xl font-semibold {url
|
||||
? 'hover:underline hover:text-primary-900 hover:dark:text-primary-100'
|
||||
? 'hover:underline hover:text-primary-900 dark:hover:text-primary-100'
|
||||
: ''}"
|
||||
>
|
||||
{name}
|
||||
@@ -97,7 +97,7 @@
|
||||
<div
|
||||
class={[
|
||||
'overflow-hidden whitespace-nowrap',
|
||||
'bg-gradient-to-r from-slate-700 via-slate-700 to-slate-700/0',
|
||||
'bg-linear-to-r from-slate-700 via-slate-700 to-slate-700/0',
|
||||
'dark:from-zinc-400 dark:via-zinc-400 dark:to-zinc-400/0',
|
||||
'text-transparent bg-clip-text',
|
||||
'max-w-[50%] overflow-hidden',
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
}: Props = $props()
|
||||
</script>
|
||||
|
||||
<Disclosure {extended} bind:open class=" gap-2 {clazz}">
|
||||
<Disclosure {extended} bind:open class={['gap-2', clazz]}>
|
||||
{#snippet summary()}
|
||||
<div
|
||||
class="font-medium w-full text-left flex flex-row items-center justify-between hover:text-primary-900
|
||||
hover:dark:text-primary-100 transition-colors h-full z-0 group relative"
|
||||
class={[
|
||||
'font-medium w-full text-left flex flex-row items-center justify-between hover:text-primary-900',
|
||||
'dark:hover:text-primary-100 transition-colors h-full z-0 group relative cursor-pointer',
|
||||
]}
|
||||
>
|
||||
<div class="flex flex-row gap-1 items-center w-full">
|
||||
{@render title?.(open)}
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
<!-- svelte-ignore a11y_positive_tabindex -->
|
||||
<div
|
||||
class="fixed top-0 left-0 w-screen h-[100svh] overflow-auto bg-white/50 dark:bg-black/50
|
||||
flex flex-col z-[100] backdrop-blur-sm"
|
||||
class="fixed top-0 left-0 w-screen h-svh overflow-auto bg-white/50 dark:bg-black/50
|
||||
flex flex-col z-100 backdrop-blur-xs"
|
||||
transition:fade={{ duration: 150 }}
|
||||
onclick={() => history.back()}
|
||||
onkeydown={(e) => {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
viewBox="0 0 100 100"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="inline fill-black dark:fill-white hover:fill-slate-700 hover:dark:fill-zinc-300 transition-colors"
|
||||
class="inline fill-black dark:fill-white hover:fill-slate-700 dark:hover:fill-zinc-300 transition-colors"
|
||||
>
|
||||
<path
|
||||
id="hexagon"
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
title={$t('common.back')}
|
||||
size="square-md"
|
||||
rounding="pill"
|
||||
class="text-inherit dark:text-inherit disabled:!opacity-20 disabled:!bg-transparent"
|
||||
class="text-inherit dark:text-inherit disabled:opacity-20! disabled:bg-transparent!"
|
||||
disabled={(cursor?.back == undefined && cursor?.next != undefined) ||
|
||||
page <= 0}
|
||||
data-sveltekit-preload-data="off"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</script>
|
||||
|
||||
<aside
|
||||
class="sticky top-0 left-0 break-words flex flex-shrink
|
||||
class="sticky top-0 left-0 break-words flex shrink
|
||||
flex-col gap-4 px-6 pt-4 max-w-full w-full h-full
|
||||
overflow-auto text-sm border-slate-200 dark:border-zinc-800 {clazz}"
|
||||
>
|
||||
|
||||
@@ -43,11 +43,7 @@
|
||||
|
||||
<svelte:window {onscroll} />
|
||||
|
||||
<div
|
||||
{...rest}
|
||||
class="shell bg-slate-50 dark:bg-zinc-950 {clazz}"
|
||||
style={theme.vars}
|
||||
>
|
||||
<div {...rest} class="shell bg-slate-50 dark:bg-zinc-950 {clazz}">
|
||||
{@render children?.()}
|
||||
<div
|
||||
class="fixed bottom-0 {dockVisible ? '' : 'max-lg:-bottom-24'} lg:top-0
|
||||
@@ -69,16 +65,16 @@
|
||||
>
|
||||
{@render sidebar?.({
|
||||
class: `hidden md:flex sticky top-0 left-0 h-max bg-slate-50 dark:bg-zinc-950
|
||||
z-40 lg:!pt-20`,
|
||||
z-40 lg:pt-20!`,
|
||||
style: 'grid-area: sidebar; width: 100% !important;',
|
||||
})}
|
||||
{@render main?.({
|
||||
class: `w-full bg-slate-25 dark:bg-zinc-925 justify-self-center shadow-sm z-0 main !pb-22 lg:!pb-0 lg:!pt-22`,
|
||||
class: `w-full bg-slate-25 dark:bg-zinc-925 justify-self-center shadow-xs z-0 main pb-22! lg:pb-0! lg:pt-22!`,
|
||||
style: 'grid-area: main',
|
||||
})}
|
||||
{@render suffix?.({
|
||||
class: `max-xl:hidden w-full sticky top-0 left-0 max-h-screen bg-slate-50 dark:bg-zinc-950
|
||||
z-40 lg:!pt-20`,
|
||||
z-40 lg:pt-20!`,
|
||||
style: 'grid-area: suffix;',
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
<a
|
||||
onclick={() => invalidateAll()}
|
||||
href={buildUrl(currentRoute, route.href)}
|
||||
class="font-medium rounded-full px-4 py-1 hover:bg-slate-200/40 hover:dark:bg-zinc-700/40
|
||||
transition-colors duration-100 relative z-0 flex-shrink-0"
|
||||
class="font-medium rounded-full px-4 py-1 hover:bg-slate-200/40 dark:hover:bg-zinc-700/40
|
||||
transition-colors duration-100 relative z-0 shrink-0"
|
||||
>
|
||||
{route.name}
|
||||
{#if isSelected(page.url, currentRoute, route.href, defaultRoute)}
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
color="none"
|
||||
{...rest}
|
||||
class={[
|
||||
'flex-shrink-0 rounded-full w-10 h-10 lg:w-max lg:h-8 lg:px-3 lg:rounded-xl',
|
||||
'shrink-0 rounded-full w-10 h-10 lg:w-max lg:h-8 lg:px-3 lg:rounded-xl',
|
||||
isSelected &&
|
||||
'bg-slate-200 dark:bg-zinc-900 text-primary-900 dark:!text-primary-100',
|
||||
'bg-slate-200 dark:bg-zinc-900 text-primary-900 dark:text-primary-100!',
|
||||
!rest.color && buttonColor.tertiary,
|
||||
!rest.color &&
|
||||
'lg:bg-white lg:dark:bg-zinc-900 border lg:border-slate-200 lg:border-b-slate-300 lg:dark:border-zinc-800 lg:dark:border-t-zinc-700/50 lg:hover:bg-slate-100 lg:hover:dark:bg-zinc-800 lg:active:bg-slate-200 lg:active:dark:bg-zinc-950',
|
||||
'lg:bg-white lg:dark:bg-zinc-900 border lg:border-slate-200 lg:border-b-slate-300 lg:dark:border-zinc-800 lg:dark:border-t-zinc-700/50 lg:hover:bg-slate-100 lg:dark:hover:bg-zinc-800 lg:active:bg-slate-200 lg:dark:active:bg-zinc-950',
|
||||
clazz,
|
||||
]}
|
||||
size="custom"
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
}}
|
||||
href="/"
|
||||
label={$t('nav.home')}
|
||||
class="ml-2 lg:ml-2 logo border-0 lg:!rounded-full lg:w-10 lg:h-10 lg:!p-0"
|
||||
class="ml-2 lg:ml-2 logo border-0 lg:rounded-full! lg:w-10! lg:h-10 lg:px-0!"
|
||||
adaptive={false}
|
||||
>
|
||||
{#snippet customIcon()}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
Select,
|
||||
Spinner,
|
||||
toast,
|
||||
Option,
|
||||
} from 'mono-svelte'
|
||||
import Avatar from '../Avatar.svelte'
|
||||
import {
|
||||
@@ -38,9 +39,6 @@
|
||||
import { site } from '$lib/lemmy.svelte'
|
||||
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
||||
import { t } from '$lib/translations'
|
||||
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
|
||||
import Option from 'mono-svelte/forms/select/Option.svelte'
|
||||
import { env } from '$env/dynamic/public'
|
||||
|
||||
let showInstance = $state(false)
|
||||
|
||||
@@ -72,7 +70,7 @@
|
||||
<button
|
||||
class="w-10 h-10 rounded-full border-slate-200 dark:border-zinc-700
|
||||
transition-all bg-slate-50 dark:bg-zinc-900 relative
|
||||
hover:bg-slate-200 hover:dark:bg-zinc-700 group {buttonClass}"
|
||||
hover:bg-slate-200 dark:hover:bg-zinc-700 group cursor-pointer {buttonClass}"
|
||||
title={$t('profile.profile')}
|
||||
>
|
||||
{#if profile.data?.user}
|
||||
@@ -111,7 +109,7 @@
|
||||
{/snippet}
|
||||
{$t('profile.inbox')}
|
||||
{#if $notifications.inbox > 0}
|
||||
<Badge color="red-subtle" class="text-xs ml-auto font-bold !py-0.5">
|
||||
<Badge color="red-subtle" class="text-xs ml-auto font-bold py-0.5!">
|
||||
{$notifications.inbox > 99 ? '∞' : $notifications.inbox}
|
||||
</Badge>
|
||||
{/if}
|
||||
@@ -136,7 +134,7 @@
|
||||
{/snippet}
|
||||
{$t('nav.menu.settings')}
|
||||
</MenuButton>
|
||||
<MenuButton class="!py-0">
|
||||
<MenuButton class="py-0!">
|
||||
{#snippet prefix()}
|
||||
<Icon
|
||||
src={theme.colorScheme == 'system'
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
alignment="left"
|
||||
color="tertiary"
|
||||
size="lg"
|
||||
class="focus:bg-slate-200 focus:dark:bg-zinc-800 block w-full {clazz}"
|
||||
class="focus:bg-slate-200 dark:focus:bg-zinc-800 block w-full {clazz}"
|
||||
data-sveltekit-preload-code="viewport"
|
||||
data-sveltekit-preload-data="tap"
|
||||
{...rest}
|
||||
|
||||
@@ -255,12 +255,12 @@
|
||||
|
||||
<TextInput
|
||||
bind:value={search}
|
||||
class="sticky rounded-none border-t-0 border-x-0 focus-within:dark:border-zinc-800"
|
||||
class="sticky rounded-none border-t-0 border-x-0 dark:focus-within:border-zinc-800"
|
||||
size="lg"
|
||||
placeholder={$t('nav.commands.prompt')}
|
||||
bind:element={input}
|
||||
/>
|
||||
<div class="h-[32rem] overflow-auto border-slate-200 dark:border-zinc-800 p-5">
|
||||
<div class="h-128 overflow-auto border-slate-200 dark:border-zinc-800 p-5">
|
||||
{#if breadcrumbs.length > 0}
|
||||
<div class="flex items-center gap-2 my-1">
|
||||
<button
|
||||
@@ -299,7 +299,7 @@
|
||||
handleSelect(action)
|
||||
}}
|
||||
class="{globalIndex == selectedIndex
|
||||
? '!bg-slate-100 dark:!bg-zinc-800 text-inherit'
|
||||
? 'bg-slate-100! dark:bg-zinc-800! text-inherit'
|
||||
: 'text-slate-600 dark:text-zinc-400'} block"
|
||||
/>
|
||||
</li>
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
<svelte:window onkeydown={handleKeydown} />
|
||||
|
||||
{#if open}
|
||||
<Modal bind:open title={null} class="!p-0 !gap-0">
|
||||
<Modal bind:open title={null} class="p-0! gap-0!">
|
||||
{#await import('./Commands.svelte')}
|
||||
<div class="h-[32rem] flex flex-col gap-2 items-center justify-center">
|
||||
<div class="h-128 flex flex-col gap-2 items-center justify-center">
|
||||
<Spinner width={32} />
|
||||
<span class="font-medium text-lg">
|
||||
{$t('nav.commands.downloading')}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
{#each items.toSorted( (a, b) => a.title.localeCompare(b.title), ) as follow (follow.id)}
|
||||
<div
|
||||
class="inline-flex w-full items-center pl-3 hover:bg-slate-100 hover:dark:bg-zinc-900
|
||||
class="inline-flex w-full items-center pl-3 hover:bg-slate-100 dark:hover:bg-zinc-900
|
||||
transition-colors rounded-lg"
|
||||
animate:flip={{ duration: 500, easing: expoOut }}
|
||||
>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
switching = false
|
||||
}}
|
||||
class="w-full font-normal {profile.data?.id == prof.id
|
||||
? '!bg-slate-100 dark:!bg-zinc-900'
|
||||
? 'bg-slate-100! dark:bg-zinc-900!'
|
||||
: ''}"
|
||||
>
|
||||
{#snippet customIcon()}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
{$t('profile.inbox')}
|
||||
{#if $notifications.inbox}
|
||||
<Badge
|
||||
class="min-w-5 h-5 !p-0 px-0.5 grid place-items-center ml-auto"
|
||||
class="min-w-5 h-5 p-0! px-0.5 grid place-items-center ml-auto"
|
||||
color="red-subtle"
|
||||
>
|
||||
{$notifications.inbox > 99 ? '∞' : $notifications.inbox}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
rounding="pill"
|
||||
{...rest}
|
||||
{href}
|
||||
class="font-normal block !origin-left border border-transparent hover:dark:bg-zinc-900 {!selected
|
||||
class="font-normal block origin-left! border border-transparent dark:hover:bg-zinc-900 {!selected
|
||||
? 'text-slate-600 dark:text-zinc-400'
|
||||
: 'bg-slate-100 dark:bg-zinc-925'} {clazz}"
|
||||
>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" module>
|
||||
const wrapClass = {
|
||||
wrap: '',
|
||||
'no-wrap': 'overflow-hidden overflow-ellipsis whitespace-nowrap',
|
||||
'no-wrap': 'overflow-hidden text-ellipsis whitespace-nowrap',
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
"titleTags": {
|
||||
"rules": {
|
||||
"title": "Правила",
|
||||
"blur": "Замъгляване",
|
||||
"blur-sm": "Замъгляване",
|
||||
"show": "Показване",
|
||||
"hide": "Скриване"
|
||||
},
|
||||
|
||||
@@ -802,7 +802,7 @@
|
||||
"description": "Take text in [brackets] and turn it into tags that you can click to search for.",
|
||||
"rules": {
|
||||
"title": "Rules",
|
||||
"blur": "Blur",
|
||||
"blur-sm": "Blur",
|
||||
"hide": "Hide",
|
||||
"show": "Show"
|
||||
}
|
||||
@@ -856,7 +856,7 @@
|
||||
"removed": "Removed by moderator"
|
||||
},
|
||||
"nsfwBlur": {
|
||||
"title": "NSFW blur",
|
||||
"title": "NSFW blur-sm",
|
||||
"description": "Blur images and remove post bodies of NSFW posts."
|
||||
},
|
||||
"instances": {
|
||||
|
||||
@@ -716,7 +716,7 @@
|
||||
"title": "Analizar las etiquetas en los títulos",
|
||||
"rules": {
|
||||
"title": "Reglas",
|
||||
"blur": "Desenfocar",
|
||||
"blur-sm": "Desenfocar",
|
||||
"hide": "Ocultar",
|
||||
"show": "Mostrar"
|
||||
},
|
||||
|
||||
@@ -740,7 +740,7 @@
|
||||
"description": "Muuta [hakasulkeissa] olevat tekstinpätkät tageiksi, joiden avulla voi hakea sisältöä.",
|
||||
"title": "Erottele tagit otsikoista",
|
||||
"rules": {
|
||||
"blur": "Sumenna",
|
||||
"blur-sm": "Sumenna",
|
||||
"hide": "Piilota",
|
||||
"show": "Näytä",
|
||||
"title": "Valinnat"
|
||||
|
||||
@@ -518,7 +518,7 @@
|
||||
"description": "Le texte entre [crochets] est transformé en balises sur lesquelles vous pouvez cliquer pour effectuer une recherche.",
|
||||
"title": "Analyse des tags dans le titre",
|
||||
"rules": {
|
||||
"blur": "Rendre flou",
|
||||
"blur-sm": "Rendre flou",
|
||||
"hide": "Masquer",
|
||||
"show": "Afficher",
|
||||
"title": "Les règles"
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
"description": "題名内の[カッコ欄]をタグに変え、クリックして類似するタグを探すことができます。",
|
||||
"rules": {
|
||||
"title": "ルール",
|
||||
"blur": "モザイク",
|
||||
"blur-sm": "モザイク",
|
||||
"hide": "隠す",
|
||||
"show": "表示"
|
||||
}
|
||||
|
||||
@@ -510,7 +510,7 @@
|
||||
"description": "Neem tekst in [haakjes] en maak er tags van waarop je kunt klikken om naar te zoeken.",
|
||||
"rules": {
|
||||
"title": "Regels",
|
||||
"blur": "Vervagen",
|
||||
"blur-sm": "Vervagen",
|
||||
"hide": "Verbergen",
|
||||
"show": "Toon"
|
||||
}
|
||||
|
||||
@@ -694,7 +694,7 @@
|
||||
"description": "Zamień tekst w [nawiasach] na tagi, które można kliknąć, aby wyszukać.",
|
||||
"rules": {
|
||||
"title": "Zasady",
|
||||
"blur": "Rozmycie",
|
||||
"blur-sm": "Rozmycie",
|
||||
"hide": "Ukryj",
|
||||
"show": "Pokaż"
|
||||
}
|
||||
|
||||
@@ -711,7 +711,7 @@
|
||||
"description": "Processa o texto entre [parêntesis retos] e transforma-o em etiquetas nas quais podes carregar para pesquisar por mais.",
|
||||
"rules": {
|
||||
"title": "Regras",
|
||||
"blur": "Desfocar",
|
||||
"blur-sm": "Desfocar",
|
||||
"hide": "Esconder",
|
||||
"show": "Mostrar"
|
||||
}
|
||||
|
||||
@@ -713,7 +713,7 @@
|
||||
"titleTags": {
|
||||
"rules": {
|
||||
"title": "Правила",
|
||||
"blur": "Размывать",
|
||||
"blur-sm": "Размывать",
|
||||
"hide": "Скрывать",
|
||||
"show": "Показывать"
|
||||
},
|
||||
|
||||
@@ -770,7 +770,7 @@
|
||||
"description": "Metni [parantez] içine alın ve aramak için tıklayabileceğiniz etiketlere dönüştürün.",
|
||||
"rules": {
|
||||
"title": "Kurallar",
|
||||
"blur": "Bulanıklık",
|
||||
"blur-sm": "Bulanıklık",
|
||||
"hide": "Sakla",
|
||||
"show": "Göstermek"
|
||||
}
|
||||
|
||||
@@ -660,7 +660,7 @@
|
||||
"description": "将[括号]中的文本转换为可以单击搜索的标签。",
|
||||
"rules": {
|
||||
"title": "规则",
|
||||
"blur": "模糊",
|
||||
"blur-sm": "模糊",
|
||||
"hide": "隐藏",
|
||||
"show": "显示"
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
url={profile.avatar}
|
||||
width={size}
|
||||
alt=""
|
||||
class={['flex-shrink-0 rounded-full', selected && 'scale-75']}
|
||||
class={['shrink-0 rounded-full', selected && 'scale-75']}
|
||||
/>
|
||||
{:else}
|
||||
<Icon
|
||||
@@ -38,7 +38,7 @@
|
||||
mini={selected}
|
||||
size={size?.toString()}
|
||||
title={profile.username}
|
||||
class="text-blue-500 flex-shrink-0"
|
||||
class="text-blue-500 shrink-0"
|
||||
style={guest
|
||||
? `color: gray`
|
||||
: profile.color
|
||||
|
||||
@@ -12,39 +12,39 @@
|
||||
export const buttonColor = {
|
||||
primary: `border border-transparent bg-primary-900 text-white
|
||||
dark:bg-primary-100 dark:text-black hover:brightness-125 dark:hover:brightness-90 active:brightness-90
|
||||
active:dark:brightness-75`,
|
||||
dark:active:brightness-75`,
|
||||
|
||||
secondary: `border border-slate-200 border-b-slate-300 dark:border-zinc-800 dark:border-t-zinc-700/50 bg-white dark:bg-zinc-900
|
||||
hover:bg-slate-100 hover:dark:bg-zinc-800 hover:dark:border-zinc-700 hover:dark:border-zinc-700 active:dark:bg-zinc-900 active:bg-slate-200`,
|
||||
hover:bg-slate-100 dark:hover:bg-zinc-800 dark:hover:border-zinc-700 dark:hover:border-zinc-700 dark:active:bg-zinc-900 active:bg-slate-200`,
|
||||
|
||||
tertiary:
|
||||
'border border-transparent bg-transparent hover:bg-slate-100 hover:dark:bg-zinc-700/30 dark:text-zinc-200',
|
||||
'border border-transparent bg-transparent hover:bg-slate-100 dark:hover:bg-zinc-700/30 dark:text-zinc-200',
|
||||
|
||||
danger:
|
||||
'border border-red-500 bg-red-500 hover:text-red-500 hover:bg-transparent text-white',
|
||||
'danger-subtle': 'text-red-500 hover:bg-red-500 hover:!text-inherit',
|
||||
'danger-subtle': 'text-red-500 hover:bg-red-500 hover:text-inherit!',
|
||||
|
||||
'success-subtle': 'text-green-500 hover:bg-green-500 hover:!text-inherit',
|
||||
'success-subtle': 'text-green-500 hover:bg-green-500 hover:text-inherit!',
|
||||
|
||||
'warning-subtle': 'text-yellow-500 hover:bg-yellow-500 hover:!text-inherit',
|
||||
'warning-subtle': 'text-yellow-500 hover:bg-yellow-500 hover:text-inherit!',
|
||||
|
||||
ghost: `border border-slate-200 dark:border-zinc-800 bg-transparent
|
||||
hover:bg-slate-100 hover:dark:bg-zinc-800 hover:dark:border-zinc-700 dark:text-zinc-400 hover:text-inherit
|
||||
hover:dark:text-inherit`,
|
||||
hover:bg-slate-100 dark:hover:bg-zinc-800 dark:hover:border-zinc-700 dark:text-zinc-400 hover:text-inherit
|
||||
dark:hover:text-inherit`,
|
||||
|
||||
elevated: `bg-slate-100 dark:bg-zinc-800 border border-slate-200
|
||||
dark:border-zinc-700 hover:bg-zinc-200 hover:dark:bg-zinc-700 hover:border-slate-300
|
||||
hover:dark:border-zinc-600`,
|
||||
dark:border-zinc-700 hover:bg-zinc-200 dark:hover:bg-zinc-700 hover:border-slate-300
|
||||
dark:hover:border-zinc-600`,
|
||||
|
||||
elevatedLow: `bg-slate-100 dark:bg-zinc-900 border border-slate-200
|
||||
dark:border-zinc-800 hover:bg-slate-200 hover:dark:bg-zinc-800 hover:border-slate-300
|
||||
hover:dark:border-zinc-700`,
|
||||
dark:border-zinc-800 hover:bg-slate-200 dark:hover:bg-zinc-800 hover:border-slate-300
|
||||
dark:hover:border-zinc-700`,
|
||||
|
||||
none: '',
|
||||
}
|
||||
|
||||
export const buttonShadow = {
|
||||
sm: 'shadow-sm',
|
||||
sm: 'shadow-xs',
|
||||
none: 'shadow-none',
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { backOut, expoOut } from 'svelte/easing'
|
||||
import type { ClassValue } from 'svelte/elements'
|
||||
import { slide } from 'svelte/transition'
|
||||
|
||||
interface Props {
|
||||
open?: boolean
|
||||
class?: string
|
||||
class?: ClassValue
|
||||
summary?: import('svelte').Snippet<[any]>
|
||||
extended?: import('svelte').Snippet
|
||||
children?: import('svelte').Snippet<[any]>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
type="radio"
|
||||
bind:group
|
||||
{value}
|
||||
onblur={bubble('blur')}
|
||||
onblur={bubble('blur-sm')}
|
||||
onchange={bubble('change')}
|
||||
{disabled}
|
||||
class="cursor-pointer disabled:cursor-not-allowed peer disabled:opacity-50"
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
class="font-normal cursor-pointer flex flex-row items-start gap-4 group {clazz}"
|
||||
>
|
||||
<div
|
||||
class="w-11 h-6 rounded-full relative z-[inherit] cursor-pointer flex flex-row transition-colors shadow-sm
|
||||
class="w-11 h-6 rounded-full relative z-[inherit] cursor-pointer flex flex-row transition-colors shadow-xs
|
||||
{checked
|
||||
? 'bg-primary-900 dark:bg-primary-100'
|
||||
: 'bg-slate-200 dark:bg-zinc-800'}
|
||||
p-0.5 flex-shrink-0"
|
||||
p-0.5 shrink-0"
|
||||
>
|
||||
<input
|
||||
bind:checked
|
||||
@@ -34,9 +34,9 @@
|
||||
class="peer appearance-none absolute top-0 left-0 w-full h-full cursor-pointer z-10"
|
||||
/>
|
||||
<div
|
||||
class="box-border w-5 h-full bg-white peer-checked:dark:bg-black rounded-full shadow-sm
|
||||
group-active:w-6 transition peer-checked:translate-x-5 group-active:peer-checked:translate-x-4
|
||||
rtl:peer-checked:-translate-x-5 rtl:group-active:peer-checked:-translate-x-4"
|
||||
class="box-border w-5 h-full bg-white dark:peer-checked:bg-black rounded-full shadow-xs
|
||||
group-active:w-6 transition peer-checked:translate-x-5 peer-checked:group-active:translate-x-4
|
||||
peer-checked:rtl:-translate-x-5 peer-checked:group-active:rtl:-translate-x-4"
|
||||
></div>
|
||||
</div>
|
||||
<div class="flex flex-col {labelClass}">
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
class={[
|
||||
sizeClass[size],
|
||||
borderClass,
|
||||
`focus:border-slate-800 focus:dark:border-zinc-200 bg-white dark:bg-zinc-950
|
||||
focus:outline-none focus:ring-2 ring-slate-800/50 rounded-xl dark:ring-zinc-200/50
|
||||
`focus:border-slate-800 dark:focus:border-zinc-200 bg-white dark:bg-zinc-950
|
||||
focus:outline-hidden focus:ring-2 ring-slate-800/50 rounded-xl dark:ring-zinc-200/50
|
||||
transition-all text-sm w-full disabled:bg-slate-100
|
||||
disabled:cursor-not-allowed disabled:dark:bg-zinc-900 invalid:!border-red-500
|
||||
disabled:cursor-not-allowed dark:disabled:bg-zinc-900 invalid:border-red-500!
|
||||
peer invalid:text-red-500 z-10`,
|
||||
suffix && 'rounded-b-none border-b-0',
|
||||
clazz,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
export const shadowClass = {
|
||||
sm: 'shadow-sm',
|
||||
sm: 'shadow-xs',
|
||||
none: 'shadow-none',
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
class={[
|
||||
shadowClass[shadow],
|
||||
borderClass,
|
||||
`border focus-within:border-primary-900 focus-within:dark:border-primary-100 focus-within:ring-2
|
||||
`border focus-within:border-primary-900 dark:focus-within:border-primary-100 focus-within:ring-2
|
||||
ring-slate-300 dark:ring-zinc-700
|
||||
transition-colors
|
||||
rounded-lg flex flex-row items-center text-sm`,
|
||||
@@ -112,8 +112,8 @@
|
||||
class={[
|
||||
sizeClass[size],
|
||||
`bg-white dark:bg-zinc-950
|
||||
focus:outline-none rounded-lg text-sm w-full disabled:bg-slate-100
|
||||
disabled:cursor-not-allowed disabled:dark:bg-zinc-950 invalid:!border-red-500
|
||||
focus:outline-hidden rounded-lg text-sm w-full disabled:bg-slate-100
|
||||
disabled:cursor-not-allowed dark:disabled:bg-zinc-950 invalid:border-red-500!
|
||||
peer invalid:text-red-500 z-10`,
|
||||
prefix && 'rounded-l-none',
|
||||
prefix && inlineAffixes && 'border-l-0',
|
||||
|
||||
@@ -127,8 +127,8 @@
|
||||
}}
|
||||
size="custom"
|
||||
disabled={option.disabled}
|
||||
class="!min-h-0 !py-[5px] {option.value == value
|
||||
? '!bg-slate-100 dark:!bg-zinc-800'
|
||||
class="min-h-0! py-[5px]! {option.value == value
|
||||
? 'bg-slate-100! dark:bg-zinc-800!'
|
||||
: ''}"
|
||||
>
|
||||
{#if option.icon}
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
const elevationClass = {
|
||||
flat: '',
|
||||
low: 'shadow-xs',
|
||||
medium: 'shadow-sm',
|
||||
low: 'shadow-2xs',
|
||||
medium: 'shadow-xs',
|
||||
high: 'shadow-md',
|
||||
xhigh: 'shadow-lg',
|
||||
max: 'shadow-xl',
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
const roundedClass = {
|
||||
none: 'rounded-none',
|
||||
sm: 'rounded-sm',
|
||||
sm: 'rounded-xs',
|
||||
md: 'rounded-md',
|
||||
lg: 'rounded-lg',
|
||||
xl: 'rounded-xl',
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
||||
<div
|
||||
role="dialog"
|
||||
class="overflow-hidden fixed top-0 left-0 w-screen h-screen z-[100]
|
||||
flex flex-col items-center justify-center backdrop-blur-sm
|
||||
class="overflow-hidden fixed top-0 left-0 w-screen h-screen z-100
|
||||
flex flex-col items-center justify-center backdrop-blur-xs
|
||||
bg-white/50 dark:bg-black/50 box-border p-4"
|
||||
transition:fade|global={{ duration: 100 }}
|
||||
onclick={(e) => {
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
{#if route.children}
|
||||
<Button
|
||||
class="{depth > 0 ? 'pl-6' : ''} {route.url == currentRoute
|
||||
? 'border-t-0 border-r-0 border-b-0 border-l !border-slate-900 dark:!border-zinc-50'
|
||||
: 'border-t-0 border-r-0 border-b-0 border-l !border-slate-300 dark:!border-zinc-700'} rounded-l-none {depth ==
|
||||
? 'border-t-0 border-r-0 border-b-0 border-l border-slate-900! dark:border-zinc-50!'
|
||||
: 'border-t-0 border-r-0 border-b-0 border-l border-slate-300! dark:border-zinc-700!'} rounded-l-none {depth ==
|
||||
0
|
||||
? 'mt-2'
|
||||
: ''} font-bold"
|
||||
@@ -59,8 +59,8 @@
|
||||
size="lg"
|
||||
class="{depth > 1 ? 'pl-12' : depth > 0 ? 'pl-6' : ''} {route.url ==
|
||||
currentRoute
|
||||
? 'border-t-0 border-r-0 border-b-0 border-l !border-slate-950 dark:!border-zinc-50'
|
||||
: 'border-t-0 border-r-0 border-b-0 border-l !border-slate-300 dark:!border-zinc-700'} font-normal rounded-l-none"
|
||||
? 'border-t-0 border-r-0 border-b-0 border-l border-slate-950! dark:border-zinc-50!'
|
||||
: 'border-t-0 border-r-0 border-b-0 border-l border-slate-300! dark:border-zinc-700!'} font-normal rounded-l-none"
|
||||
>
|
||||
{route.name}
|
||||
</Button>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<Material
|
||||
padding="none"
|
||||
color="uniform"
|
||||
class="flex flex-row space-x-2 items-center px-4 py-3 !rounded-3xl {clazz}"
|
||||
class="flex flex-row space-x-2 items-center px-4 py-3 rounded-3xl! {clazz}"
|
||||
>
|
||||
<Icon
|
||||
src={InformationCircle}
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
{#snippet popover()}
|
||||
<div
|
||||
class="w-full max-w-[280px] origin-top-left
|
||||
max-h-[32rem] overflow-auto list-none shadow-lg rounded-2xl"
|
||||
max-h-128 overflow-auto list-none shadow-lg rounded-2xl"
|
||||
>
|
||||
<div
|
||||
class="flex flex-col py-2 list-none bg-white/80 dark:bg-zinc-900/90 px-2 gap-px
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
class="w-full px-2 rounded-lg min-h-8 font-normal {disabled
|
||||
? 'opacity-70 pointer-events-none cursor-not-allowed'
|
||||
: ''} {color == 'tertiary'
|
||||
? 'hover:dark:bg-zinc-800/70'
|
||||
? 'dark:hover:bg-zinc-800/70'
|
||||
: ''} duration-100 {clazz}"
|
||||
{alignment}
|
||||
{href}
|
||||
@@ -50,7 +50,7 @@
|
||||
class="contents {color == 'tertiary'
|
||||
? 'text-slate-600 dark:text-zinc-400'
|
||||
: ''}
|
||||
flex-shrink-0"
|
||||
shrink-0"
|
||||
>
|
||||
{#if icon}
|
||||
<Icon src={icon} micro size="16" />
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
>
|
||||
<div>{@render children?.()}</div>
|
||||
<hr
|
||||
class="flex-shrink flex-1 border-slate-200 dark:border-zinc-800 border-opacity-70"
|
||||
class="shrink flex-1 border-slate-200 dark:border-zinc-800 border-opacity-70"
|
||||
/>
|
||||
</div>
|
||||
@@ -131,10 +131,10 @@
|
||||
{/if}
|
||||
|
||||
{#if open}
|
||||
<Portal class="z-[150]">
|
||||
<Portal class="z-150">
|
||||
<div
|
||||
transition:scale={{ duration: 300, start: 0.97, easing: expoOut }}
|
||||
class="z-[150] {popoverClass}"
|
||||
class="z-150 {popoverClass}"
|
||||
use:customFloatingContent
|
||||
use:focusTrap
|
||||
bind:this={popoverEl}
|
||||
|
||||
@@ -32,14 +32,14 @@
|
||||
}}
|
||||
>
|
||||
{#if toast.loading}
|
||||
<div class="relative m-2 ml-4 flex-shrink-0">
|
||||
<div class="relative m-2 ml-4 shrink-0">
|
||||
<Spinner width={20} />
|
||||
</div>
|
||||
{:else}
|
||||
<Icon
|
||||
size="20"
|
||||
mini
|
||||
class="relative m-2 ml-4 flex-shrink-0"
|
||||
class="relative m-2 ml-4 shrink-0"
|
||||
src={toast.type == 'info'
|
||||
? InformationCircle
|
||||
: toast.type == 'success'
|
||||
@@ -64,7 +64,7 @@
|
||||
toast.action?.()
|
||||
toasts.update((toasts) => toasts.filter((t) => t.id != toast.id))
|
||||
}}
|
||||
class="rounded-lg w-max transition-colors hover:bg-black/20 hover:dark:bg-white/20 p-2"
|
||||
class="rounded-lg w-max transition-colors hover:bg-black/20 dark:hover:bg-white/20 p-2"
|
||||
>
|
||||
<Icon src={Check} size="16" mini />
|
||||
</button>
|
||||
@@ -73,7 +73,7 @@
|
||||
onclick={() => {
|
||||
toasts.update((toasts) => toasts.filter((t) => t.id != toast.id))
|
||||
}}
|
||||
class="rounded-lg w-max transition-colors hover:bg-black/20 hover:dark:bg-white/20 p-2"
|
||||
class="rounded-lg w-max transition-colors hover:bg-black/20 dark:hover:bg-white/20 p-2"
|
||||
>
|
||||
<Icon src={XMark} size="16" mini />
|
||||
</button>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="fixed right-0 bottom-0 flex flex-col items-end justify-end z-[200] p-4
|
||||
group overflow-hidden h-screen min-w-[24rem] pointer-events-none gap-4"
|
||||
class="fixed right-0 bottom-0 flex flex-col items-end justify-end z-200 p-4
|
||||
group overflow-hidden h-screen min-w-96 pointer-events-none gap-4"
|
||||
>
|
||||
{#each $toasts as toast, index (toast.id)}
|
||||
<div
|
||||
|
||||
@@ -99,7 +99,7 @@ interface Settings {
|
||||
useRtl: boolean
|
||||
parseTags: boolean
|
||||
tagRules: {
|
||||
[key: string]: 'hide' | 'blur'
|
||||
[key: string]: 'hide' | 'blur-sm'
|
||||
}
|
||||
logoColorMonth: number | null
|
||||
}
|
||||
@@ -178,9 +178,9 @@ export const defaultSettings: Settings = {
|
||||
useRtl: false,
|
||||
parseTags: true,
|
||||
tagRules: {
|
||||
cw: 'blur',
|
||||
nsfl: 'blur',
|
||||
nsfw: 'blur',
|
||||
cw: 'blur-sm',
|
||||
nsfl: 'blur-sm',
|
||||
nsfw: 'blur-sm',
|
||||
},
|
||||
logoColorMonth: null,
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
{#if page?.error?.message}
|
||||
{@const error = getError(page?.error?.message)}
|
||||
{#if error.code}
|
||||
<code class="rounded-md dark:!bg-zinc-950 px-2 py-1 min-w-48">
|
||||
<code class="rounded-md dark:bg-zinc-950! px-2 py-1 min-w-48">
|
||||
{error.string}
|
||||
</code>
|
||||
{:else}
|
||||
|
||||
@@ -55,14 +55,14 @@
|
||||
if (browser) {
|
||||
$effect(() => {
|
||||
if (settings) {
|
||||
document.body.classList.remove(
|
||||
document.documentElement.classList.remove(
|
||||
'font-display',
|
||||
'font-inter',
|
||||
'font-sans',
|
||||
'font-system',
|
||||
'font-nunito',
|
||||
)
|
||||
document.body.classList.add(
|
||||
document.documentElement.classList.add(
|
||||
settings.font == 'inter'
|
||||
? 'font-inter'
|
||||
: settings.font == 'system'
|
||||
@@ -75,7 +75,7 @@
|
||||
})
|
||||
|
||||
$effect(() => {
|
||||
document.body.setAttribute('style', theme.vars)
|
||||
document.documentElement.setAttribute('style', theme.vars)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
</svelte:head>
|
||||
|
||||
<Button
|
||||
class="fixed -top-16 focus:top-0 left-0 m-4 z-[300] transition-all"
|
||||
class="fixed -top-16 focus:top-0 left-0 m-4 z-300 transition-all"
|
||||
href="#main"
|
||||
>
|
||||
{#snippet prefix()}
|
||||
@@ -147,14 +147,14 @@
|
||||
<div class=" {c}" style={s}>
|
||||
{#if page.data.slots?.sidebar?.component}
|
||||
{@const SvelteComponent = page.data.slots.sidebar.component}
|
||||
<SvelteComponent {...page.data.slots.sidebar.props} class="!pt-0" />
|
||||
<SvelteComponent {...page.data.slots.sidebar.props} class="pt-0!" />
|
||||
{:else if site.data}
|
||||
<SiteCard
|
||||
site={site.data.site_view}
|
||||
taglines={site.data.taglines}
|
||||
admins={site.data.admins}
|
||||
version={site.data.version}
|
||||
class="!pt-0"
|
||||
class="pt-0!"
|
||||
/>
|
||||
{:else}
|
||||
<div class="h-64 w-full grid place-items-center">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
>
|
||||
{name}
|
||||
{#if badge}
|
||||
<Badge color="gray-subtle" class="!p-0.5 !px-2">{badge}</Badge>
|
||||
<Badge color="gray-subtle" class="p-0.5! px-2!">{badge}</Badge>
|
||||
{/if}
|
||||
</a>
|
||||
<span class="text-sm">{description}</span>
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
size="square-md"
|
||||
class="hover:bg-slate-200 {application.creator_local_user
|
||||
.accepted_application === false && application.admin
|
||||
? '!text-red-500'
|
||||
? 'text-red-500!'
|
||||
: ''}"
|
||||
aria-label={$t('routes.admin.applications.deny')}
|
||||
onclick={() => review(false)}
|
||||
@@ -179,7 +179,7 @@
|
||||
size="square-md"
|
||||
class="hover:bg-slate-200 {application.creator_local_user
|
||||
.accepted_application
|
||||
? '!text-green-500'
|
||||
? 'text-green-500!'
|
||||
: ''}"
|
||||
title={$t('routes.admin.applications.approve')}
|
||||
onclick={() => review(true)}
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
{/snippet}
|
||||
</FileInput>
|
||||
<div class="flex flex-col md:flex-row gap-4">
|
||||
<div class="flex-1 w-full max-h-[42rem] h-full flex flex-col gap-2">
|
||||
<div class="flex-1 w-full max-h-168 h-full flex flex-col gap-2">
|
||||
<h2 class="font-bold text-lg">{$t('routes.admin.federation.blocked')}</h2>
|
||||
<form
|
||||
onsubmit={preventDefault(() =>
|
||||
@@ -216,7 +216,7 @@
|
||||
</form>
|
||||
<Material class="h-full overflow-auto" color="distinct">
|
||||
<ul
|
||||
class="[&>*]:py-3 dark:!divide-zinc-800 {allowInstance.instance != ''
|
||||
class="*:py-3 dark:divide-zinc-800! {allowInstance.instance != ''
|
||||
? 'opacity-50'
|
||||
: ''}"
|
||||
>
|
||||
@@ -264,7 +264,7 @@
|
||||
</ul>
|
||||
</Material>
|
||||
</div>
|
||||
<div class="md:flex-1 w-full max-h-[42rem] flex flex-col gap-2">
|
||||
<div class="md:flex-1 w-full max-h-168 flex flex-col gap-2">
|
||||
<h2 class="font-bold text-lg flex items-center space-x-1">
|
||||
<span>{$t('routes.admin.federation.allowed')}</span>
|
||||
{#if allowInstance.instance || !(data.federated_instances.federated_instances.allowed?.length == 0)}
|
||||
@@ -303,7 +303,7 @@
|
||||
</Button>
|
||||
</form>
|
||||
<Material class="h-full overflow-auto" color="distinct">
|
||||
<ul class="[&>*]:py-3 dark:!divide-zinc-800">
|
||||
<ul class="*:py-3 dark:divide-zinc-800!">
|
||||
{#if data.federated_instances.federated_instances.allowed.length > 0}
|
||||
{#each data.federated_instances.federated_instances.allowed.sort( (b, a) => b.domain.localeCompare(a.domain), ) as instance (instance.id)}
|
||||
<div
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
{@const missing = data.community.value.discussion_languages.filter(
|
||||
(i) => !profile.data.user?.discussion_languages.includes(i),
|
||||
)}
|
||||
<Note class="!p-1 !pl-3 flex-col md:flex-row">
|
||||
<Note class="p-1! pl-3! flex-col md:flex-row">
|
||||
<div>{$t('routes.community.languageWarning')}</div>
|
||||
<Button
|
||||
class="inline-block ml-auto"
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
loading={formData.addingModerator}
|
||||
disabled={formData.addingModerator}
|
||||
size="lg"
|
||||
class="w-max flex-shrink-0"
|
||||
class="w-max shrink-0"
|
||||
color="primary"
|
||||
submit
|
||||
>
|
||||
|
||||
@@ -69,14 +69,14 @@
|
||||
name="q"
|
||||
aria-label={$t('routes.search.query')}
|
||||
size="lg"
|
||||
class="flex-1 !rounded-full h-full"
|
||||
class="flex-1 rounded-full! h-full"
|
||||
placeholder={$t('routes.communities.search.placeholder')}
|
||||
/>
|
||||
<Button
|
||||
submit
|
||||
color="primary"
|
||||
size="custom"
|
||||
class="flex-shrink-0 h-full aspect-square"
|
||||
class="shrink-0 h-full aspect-square"
|
||||
title="Search"
|
||||
rounding="pill"
|
||||
loading={navigating.to != null}
|
||||
@@ -130,11 +130,11 @@
|
||||
{/if}
|
||||
|
||||
{#if showTop}
|
||||
<SectionTitle class="!border-0 pb-2">
|
||||
<SectionTitle class="border-0! pb-2">
|
||||
{$t('routes.search.top')}
|
||||
</SectionTitle>
|
||||
<div
|
||||
class="grid md:grid-cols-2 lg:grid-cols-3 gap-4 items-center mb-6 !border-0"
|
||||
class="grid md:grid-cols-2 lg:grid-cols-3 gap-4 items-center mb-6 border-0!"
|
||||
>
|
||||
{#each data.communities.value.slice(0, 3) as community, index (community.community.id)}
|
||||
<div
|
||||
@@ -165,7 +165,7 @@
|
||||
{/if}
|
||||
|
||||
{#if data.communities.value.slice(showTop ? 3 : 0).length > 0}
|
||||
<SectionTitle class="!border-0 pb-2">
|
||||
<SectionTitle class="border-0! pb-2">
|
||||
{$t('routes.search.other')}
|
||||
</SectionTitle>
|
||||
{/if}
|
||||
@@ -174,7 +174,7 @@
|
||||
<div class="-mx-4 sm:-mx-6 h-full">
|
||||
{#each sliced as community, index (community.community.id)}
|
||||
<div
|
||||
class="px-6 hover:bg-slate-50 hover:dark:bg-zinc-900 transition-colors @container
|
||||
class="px-6 hover:bg-slate-50 dark:hover:bg-zinc-900 transition-colors @container
|
||||
border-b border-slate-100 dark:border-zinc-900"
|
||||
in:fly|global={{
|
||||
duration: 1000,
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1"></div>
|
||||
<div class="flex gap-2 max-md:hidden flex-shrink-0">
|
||||
<div class="flex gap-2 max-md:hidden shrink-0">
|
||||
<Button
|
||||
color={item.read ? 'secondary' : 'primary'}
|
||||
{loading}
|
||||
@@ -124,7 +124,7 @@
|
||||
}}
|
||||
size="sm"
|
||||
rounding="pill"
|
||||
class="flex-shrink-0"
|
||||
class="shrink-0"
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon src={item.read ? EyeSlash : Eye} size="16" micro />
|
||||
@@ -139,7 +139,7 @@
|
||||
: `/inbox/messages/${item.item.private_message.creator_id}`}
|
||||
size="sm"
|
||||
rounding="pill"
|
||||
class="flex-shrink-0"
|
||||
class="shrink-0"
|
||||
>
|
||||
{$t('common.jump')}
|
||||
</Button>
|
||||
@@ -184,7 +184,7 @@
|
||||
community={false}
|
||||
view="cozy"
|
||||
meta={false}
|
||||
commentClass="!pt-0 pb-0"
|
||||
commentClass="pt-0! pb-0"
|
||||
class="pt-0"
|
||||
/>
|
||||
{:else}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<a
|
||||
href="/inbox/messages/{preview.user.id}"
|
||||
class="flex flex-row gap-2 py-3 -mx-4 px-4 sm:-mx-6 sm:px-6 w-full min-w-0
|
||||
hover:bg-slate-100 hover:dark:bg-zinc-900 transition-colors"
|
||||
hover:bg-slate-100 dark:hover:bg-zinc-900 transition-colors"
|
||||
in:fly|global={{
|
||||
duration: 700,
|
||||
easing: backOut,
|
||||
@@ -83,8 +83,8 @@
|
||||
<div class="flex flex-col w-full overflow-hidden">
|
||||
<div class="font-medium">{preview.user.name}</div>
|
||||
<div
|
||||
class="text-sm overflow-ellipsis whitespace-nowrap
|
||||
bg-gradient-to-r from-slate-700 via-slate-700 to-slate-700/0 dark:from-zinc-300 dark:via-zinc-300 dark:to-zinc-300/0
|
||||
class="text-sm text-ellipsis whitespace-nowrap
|
||||
bg-linear-to-r from-slate-700 via-slate-700 to-slate-700/0 dark:from-zinc-300 dark:via-zinc-300 dark:to-zinc-300/0
|
||||
text-transparent bg-clip-text"
|
||||
>
|
||||
{preview.message.content}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
rounding="2xl"
|
||||
padding="none"
|
||||
class="bg-white dark:bg-zinc-950 dark:border-t-zinc-900
|
||||
w-full overflow-auto mt-6 relative max-h-[32rem] h-full"
|
||||
w-full overflow-auto mt-6 relative max-h-128 h-full"
|
||||
>
|
||||
<div class="h-full overflow-auto" bind:this={chatWindow}>
|
||||
<ul id="chat-window" class=" h-full flex flex-col gap-1 flex-1 px-4 py-4">
|
||||
@@ -161,7 +161,7 @@
|
||||
>
|
||||
<TextInput
|
||||
bind:value={textbox.message}
|
||||
class="!rounded-xl h-full flex-1 dark:!bg-zinc-925"
|
||||
class="rounded-xl! h-full flex-1 dark:bg-zinc-925!"
|
||||
/>
|
||||
|
||||
<Button
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
{#snippet target()}
|
||||
<Button
|
||||
color="tertiary"
|
||||
class="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-all flex-shrink-0"
|
||||
class="opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-all shrink-0"
|
||||
size="square-md"
|
||||
rounding="pill"
|
||||
title={$t('post.actions.more.actions')}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Header pageHeader>Linked Instances</Header>
|
||||
{#if data}
|
||||
<div class="flex flex-col md:flex-row gap-4">
|
||||
<div class="flex-1 w-full max-h-[42rem] h-full flex flex-col gap-2">
|
||||
<div class="flex-1 w-full max-h-168 h-full flex flex-col gap-2">
|
||||
<h2 class="font-bold text-xl flex flex-row items-center gap-1">
|
||||
Linked
|
||||
<Popover openOnHover>
|
||||
@@ -27,7 +27,7 @@
|
||||
</Popover>
|
||||
</h2>
|
||||
<Material
|
||||
class="h-full overflow-auto divide-y [&>*]:py-3 divide-slate-200 dark:divide-zinc-800"
|
||||
class="h-full overflow-auto divide-y *:py-3 divide-slate-200 dark:divide-zinc-800"
|
||||
color="distinct"
|
||||
>
|
||||
{#if data.linked && data.linked.length > 0}
|
||||
@@ -54,7 +54,7 @@
|
||||
{/if}
|
||||
</Material>
|
||||
</div>
|
||||
<div class="flex-1 w-full max-h-[42rem] h-full flex flex-col gap-2">
|
||||
<div class="flex-1 w-full max-h-168 h-full flex flex-col gap-2">
|
||||
<h2 class="font-bold text-xl flex flex-row items-center gap-1">
|
||||
Blocked
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</Popover>
|
||||
</h2>
|
||||
<Material
|
||||
class="h-full overflow-auto divide-y [&>*]:py-3 divide-slate-200 dark:divide-zinc-800"
|
||||
class="h-full overflow-auto divide-y *:py-3 divide-slate-200 dark:divide-zinc-800"
|
||||
color="distinct"
|
||||
>
|
||||
{#if data.blocked && data.blocked.length > 0}
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
{$t('account.login')}
|
||||
</Button>
|
||||
<hr class="border-slate-200 dark:border-zinc-800" />
|
||||
<div class="flex flex-row items-center gap-2 overflow-auto *:flex-shrink-0">
|
||||
<div class="flex flex-row items-center gap-2 overflow-auto *:shrink-0">
|
||||
<Button rounding="pill" color="ghost" href="/signup">
|
||||
<Icon src={Identification} mini size="16" />
|
||||
{$t('account.signup')}
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<Button
|
||||
onclick={resolve}
|
||||
class="h-max self-end {item.resolved
|
||||
? '!text-green-600 dark:!text-green-400'
|
||||
? 'text-green-600! dark:text-green-400!'
|
||||
: ''}"
|
||||
loading={resolving}
|
||||
disabled={resolving}
|
||||
@@ -129,9 +129,9 @@
|
||||
|
||||
<Material rounding="xl" color="uniform" class="dark:bg-zinc-950">
|
||||
{#if item.type == 'comment'}
|
||||
<CommentItem community={true} comment={item.item} class="!p-0" />
|
||||
<CommentItem community={true} comment={item.item} class="p-0!" />
|
||||
{:else if item.type == 'post'}
|
||||
<Post post={item.item} class="!p-0" />
|
||||
<Post post={item.item} class="p-0!" />
|
||||
{:else if item.type == 'message'}
|
||||
<PrivateMessage
|
||||
message={{
|
||||
|
||||
Loaded 100 of 119 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user