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