feat: add and close #244

This commit is contained in:
Xylight committed 2024-02-10 12:31:00 -08:00
1 parent 3ad456fb29
commit 8edceaf54f
4 files changed
+28 -5

No files matched your search

+1 -1
View File
@@ -102,7 +102,7 @@
slot="main" slot="main"
let:style={s} let:style={s}
let:class={c} let:class={c}
class="p-3 sm:p-6 min-w-0 w-full flex flex-col min-h-full {c}" class="p-3 sm:p-6 min-w-0 w-full flex flex-col min-h-full relative {c}"
style={s} style={s}
class:max-w-6xl={$userSettings.newWidth} class:max-w-6xl={$userSettings.newWidth}
id="main" id="main"
+16 -4
View File
@@ -20,7 +20,7 @@
XMark, XMark,
} from 'svelte-hero-icons' } from 'svelte-hero-icons'
import Placeholder from '$lib/components/ui/Placeholder.svelte' import Placeholder from '$lib/components/ui/Placeholder.svelte'
import { profile } from '$lib/auth'; import { profile } from '$lib/auth'
export let data export let data
@@ -56,9 +56,16 @@
</div> </div>
</Modal> </Modal>
{#if data.community.community_view.community.banner}
<img
src={data.community.community_view.community.banner}
class="absolute top-0 right-0 object-cover w-full h-40 banner"
alt="Community banner"
/>
{/if}
<div class="flex flex-col md:flex-row gap-4 w-full"> <div class="flex flex-col md:flex-row gap-4 w-full">
<div class="flex flex-col gap-3 sm:gap-4 max-w-full w-full min-w-0"> <div class="flex flex-col gap-3 sm:gap-4 max-w-full w-full min-w-0">
<div class="flex flex-row gap-3 items-center"> <div class="flex flex-row gap-3 items-center z-0">
<Avatar <Avatar
width={48} width={48}
url={data.community.community_view.community.icon} url={data.community.community_view.community.icon}
@@ -87,7 +94,9 @@
</button> </button>
</div> </div>
<div class="flex items-center gap-2 w-max ml-auto"> <div class="flex items-center gap-2 w-max ml-auto">
{#if $profile?.user && $profile.user.moderates.map(c => c.community.id).includes(data.community.community_view.community.id)} {#if $profile?.user && $profile.user.moderates
.map((c) => c.community.id)
.includes(data.community.community_view.community.id)}
<Button <Button
size="square-md" size="square-md"
color="secondary" color="secondary"
@@ -108,7 +117,7 @@
</Button> </Button>
</div> </div>
</div> </div>
<div class="flex flex-row gap-4 max-w-full w-full items-end"> <div class="flex flex-row gap-4 max-w-full w-full items-end z-0">
<Sort selected={data.sort} /> <Sort selected={data.sort} />
</div> </div>
{#if data.community.community_view.blocked} {#if data.community.community_view.blocked}
@@ -149,3 +158,6 @@
</Pageination> </Pageination>
</div> </div>
</div> </div>
<style>
</style>
+7
View File
@@ -145,6 +145,13 @@
</Modal> </Modal>
{/if} {/if}
{#if data.person_view.person.banner}
<img
src={data.person_view.person.banner}
class="absolute top-0 right-0 object-cover w-full h-40 banner"
alt="User banner"
/>
{/if}
<div class="flex flex-col-reverse gap-4 max-w-full w-full"> <div class="flex flex-col-reverse gap-4 max-w-full w-full">
<div class="flex flex-col gap-4 max-w-full w-full min-w-0"> <div class="flex flex-col gap-4 max-w-full w-full min-w-0">
<div class="flex flex-row gap-4 flex-wrap justify-between"> <div class="flex flex-row gap-4 flex-wrap justify-between">
+4
View File
@@ -93,3 +93,7 @@ pre {
.dark ::-webkit-scrollbar-thumb { .dark ::-webkit-scrollbar-thumb {
@apply bg-zinc-800; @apply bg-zinc-800;
} }
.banner {
mask-image: linear-gradient(to left, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}