misc: Tweak design
This commit is contained in:
1 parent
ba8a18cb00
commit
9770f15ce6
7 files changed
+73
-56
No files matched your search
@@ -67,12 +67,24 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<StickyCard>
|
<StickyCard>
|
||||||
<Avatar
|
<div class="flex flex-row gap-3 items-center">
|
||||||
width={48}
|
<Avatar
|
||||||
url={community_view.community.icon ??
|
width={42}
|
||||||
`https://api.dicebear.com/6.x/initials/svg?seed=${community_view.community.name}`}
|
url={community_view.community.icon ??
|
||||||
alt={community_view.community.name}
|
`https://api.dicebear.com/6.x/initials/svg?seed=${community_view.community.name}`}
|
||||||
/>
|
alt={community_view.community.name}
|
||||||
|
/>
|
||||||
|
<div class="flex flex-col">
|
||||||
|
<h1 class="font-bold text-base">
|
||||||
|
{community_view.community.title}
|
||||||
|
</h1>
|
||||||
|
<span class="opacity-60 text-sm">
|
||||||
|
!{community_view.community.name}@{new URL(
|
||||||
|
community_view.community.actor_id
|
||||||
|
).hostname}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<span class="flex flex-row items-center gap-1 text-sm">
|
<span class="flex flex-row items-center gap-1 text-sm">
|
||||||
<Icon src={Calendar} width={16} height={16} mini />
|
<Icon src={Calendar} width={16} height={16} mini />
|
||||||
<RelativeDate date={new Date(community_view.community.published)} />
|
<RelativeDate date={new Date(community_view.community.published)} />
|
||||||
@@ -91,40 +103,30 @@
|
|||||||
<FormattedNumber number={community_view.counts.comments} />
|
<FormattedNumber number={community_view.counts.comments} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
{#if $authData}
|
||||||
<h1 class="font-bold text-lg">
|
|
||||||
{community_view.community.title}
|
|
||||||
</h1>
|
|
||||||
<span class="opacity-80 text-sm">
|
|
||||||
!{community_view.community.name}@{new URL(
|
|
||||||
community_view.community.actor_id
|
|
||||||
).hostname}
|
|
||||||
</span>
|
|
||||||
<div class="w-full mt-2 flex flex-col gap-2">
|
<div class="w-full mt-2 flex flex-col gap-2">
|
||||||
{#if $authData}
|
<Button
|
||||||
<Button
|
disabled={loading.subscribing}
|
||||||
disabled={loading.subscribing}
|
loading={loading.subscribing}
|
||||||
loading={loading.subscribing}
|
large
|
||||||
large
|
color={Color.ghost}
|
||||||
color={Color.ghost}
|
on:click={subscribe}
|
||||||
on:click={subscribe}
|
>
|
||||||
>
|
{community_view.subscribed == 'Subscribed' ||
|
||||||
{community_view.subscribed == 'Subscribed' ||
|
community_view.subscribed == 'Pending'
|
||||||
community_view.subscribed == 'Pending'
|
? 'Unsubscribe'
|
||||||
? 'Unsubscribe'
|
: 'Subscribe'}
|
||||||
: 'Subscribe'}
|
</Button>
|
||||||
</Button>
|
<Button
|
||||||
<Button
|
disabled={loading.blocking}
|
||||||
disabled={loading.blocking}
|
loading={loading.blocking}
|
||||||
loading={loading.blocking}
|
large
|
||||||
large
|
color={Color.danger}
|
||||||
color={Color.danger}
|
on:click={block}
|
||||||
on:click={block}
|
>
|
||||||
>
|
{community_view.blocked ? 'Unblock' : 'Block'}
|
||||||
{community_view.blocked ? 'Unblock' : 'Block'}
|
</Button>
|
||||||
</Button>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{/if}
|
||||||
<Markdown source={community_view.community.description} />
|
<Markdown source={community_view.community.description} />
|
||||||
</StickyCard>
|
</StickyCard>
|
||||||
@@ -18,9 +18,17 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<StickyCard>
|
<StickyCard>
|
||||||
{#if site.site.icon}
|
<div class="flex flex-row gap-3 items-center">
|
||||||
<Avatar width={64} url={site.site.icon} alt={site.site.name} />
|
{#if site.site.icon}
|
||||||
{/if}
|
<Avatar width={42} url={site.site.icon} alt={site.site.name} />
|
||||||
|
{/if}
|
||||||
|
<div class="flex flex-col">
|
||||||
|
<h1 class="font-bold text-base">{site.site.name}</h1>
|
||||||
|
<span class="text-sm opacity-60">
|
||||||
|
{new URL(site.site.actor_id).hostname}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<span class="flex flex-row items-center gap-1 text-sm">
|
<span class="flex flex-row items-center gap-1 text-sm">
|
||||||
<Icon src={Calendar} width={16} height={16} mini />
|
<Icon src={Calendar} width={16} height={16} mini />
|
||||||
<RelativeDate date={new Date(site.site.published)} />
|
<RelativeDate date={new Date(site.site.published)} />
|
||||||
@@ -43,8 +51,5 @@
|
|||||||
<FormattedNumber number={site.counts.communities} />
|
<FormattedNumber number={site.counts.communities} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<h1 class="font-bold text-lg">{site.site.name}</h1>
|
|
||||||
</div>
|
|
||||||
<Markdown source={site.site.description} />
|
<Markdown source={site.site.description} />
|
||||||
</StickyCard>
|
</StickyCard>
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="bg-white shadow-md border border-slate-100
|
class="bg-white border border-slate-200
|
||||||
dark:border-zinc-800 dark:bg-zinc-900 break-words
|
dark:border-zinc-800 dark:bg-zinc-900 break-words
|
||||||
flex-col p-1 rounded-md {clazz}"
|
flex-col p-1 rounded-lg {clazz}"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<nav
|
<nav
|
||||||
class="sticky bg-slate-50/70 dark:bg-zinc-950/70 backdrop-blur-3xl top-0
|
class="sticky top-0 bg-slate-50/80 dark:bg-zinc-950/80 backdrop-blur-3xl flex
|
||||||
z-50"
|
flex-row gap-4 items-center w-full py-1 z-20 px-4"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="flex z-20 flex-row gap-4 items-center w-full h-16 max-w-5xl mx-auto px-6 my-1"
|
class="flex flex-row gap-4 items-center max-w-5xl w-full mx-auto px-4 my-1"
|
||||||
>
|
>
|
||||||
<div class="flex flex-row gap-2 items-center mr-auto">
|
<div class="flex flex-row gap-2 items-center mr-auto">
|
||||||
<a href="/" class="flex flex-row items-center gap-2">
|
<a href="/" class="flex flex-row items-center gap-2">
|
||||||
@@ -51,10 +51,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2 py-2 px-3">
|
||||||
<Link href="/communities" label="Communities">
|
<Link href="/communities" label="Communities">
|
||||||
<Icon src={GlobeAlt} width={16} />
|
<Icon src={GlobeAlt} width={16} />
|
||||||
<span class="hidden sm:inline ml-1">Communities</span>
|
<span class="hidden sm:inline ml-1">Explore</span>
|
||||||
</Link>
|
</Link>
|
||||||
<Menu let:toggleOpen>
|
<Menu let:toggleOpen>
|
||||||
<Button
|
<Button
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
label="Create"
|
label="Create"
|
||||||
on:click={toggleOpen}
|
on:click={toggleOpen}
|
||||||
>
|
>
|
||||||
<Icon src={Plus} width={16} />
|
<Icon src={Plus} width={18} mini />
|
||||||
<span class="hidden sm:inline">Create</span>
|
<span class="hidden sm:inline">Create</span>
|
||||||
</Button>
|
</Button>
|
||||||
<span class="text-xs opacity-80 text-left mx-4 my-2">Create</span>
|
<span class="text-xs opacity-80 text-left mx-4 my-2">Create</span>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<aside
|
<aside
|
||||||
class="sticky top-20 border bg-white shadow-md border-slate-100
|
class="sticky top-20 border bg-white border-slate-200
|
||||||
dark:border-zinc-800 dark:bg-zinc-900 break-words flex
|
dark:border-zinc-800 dark:bg-zinc-900 break-words flex
|
||||||
flex-col gap-4 p-8 w-[20rem] rounded-md h-max max-h-[calc(100vh-6rem)]
|
flex-col gap-4 p-6 w-[20rem] rounded-lg h-max max-h-[calc(100vh-6rem)]
|
||||||
overflow-auto"
|
overflow-auto"
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
|
|||||||
@@ -15,15 +15,21 @@
|
|||||||
$: {
|
$: {
|
||||||
if ($navigating) {
|
if ($navigating) {
|
||||||
nProgress.start()
|
nProgress.start()
|
||||||
|
if (typeof document != 'undefined') {
|
||||||
|
document.body.classList.toggle('wait', true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!$navigating) {
|
if (!$navigating) {
|
||||||
nProgress.done()
|
nProgress.done()
|
||||||
|
if (typeof document != 'undefined') {
|
||||||
|
document.body.classList.toggle('wait', false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Navbar />
|
<Navbar />
|
||||||
<ToastContainer />
|
<ToastContainer />
|
||||||
<div class="mx-auto max-w-5xl p-4">
|
<div class="mx-auto max-w-5xl p-4 h-full">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
@@ -13,6 +13,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wait * {
|
||||||
|
cursor: wait !important;
|
||||||
|
}
|
||||||
|
|
||||||
#nprogress .bar {
|
#nprogress .bar {
|
||||||
@apply bg-black dark:bg-white !important;
|
@apply bg-black dark:bg-white !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user