feat: Add post uploading
This commit is contained in:
1 parent
5f674d4691
commit
1842139af9
31 files changed
+560
-225
No files matched your search
@@ -4,9 +4,9 @@
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="bg-white border border-slate-200
|
||||
class="bg-white shadow-lg border-slate-200
|
||||
dark:border-zinc-800 dark:bg-zinc-900 break-words
|
||||
flex-col gap-4 p-4 rounded-md {clazz}"
|
||||
flex-col p-1 rounded-md {clazz}"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation'
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import Link from '$lib/components/input/Link.svelte'
|
||||
import Logo from '$lib/components/ui/Logo.svelte'
|
||||
import Menu from '$lib/components/ui/menu/Menu.svelte'
|
||||
@@ -15,8 +16,11 @@
|
||||
ArrowLeftOnRectangle,
|
||||
ArrowRightOnRectangle,
|
||||
Cog6Tooth,
|
||||
GlobeAlt,
|
||||
Icon,
|
||||
Inbox,
|
||||
PencilSquare,
|
||||
Plus,
|
||||
UserCircle,
|
||||
} from 'svelte-hero-icons'
|
||||
</script>
|
||||
@@ -28,7 +32,7 @@
|
||||
<div class="flex flex-row gap-2 items-center mr-auto">
|
||||
<a href="/" class="flex flex-row items-center gap-2">
|
||||
<Logo width={40} />
|
||||
<div class="flex flex-col">
|
||||
<div class="sm:flex flex-col hidden">
|
||||
<span class="font-bold">Xylemmy</span>
|
||||
<span
|
||||
class="text-xs opacity-50
|
||||
@@ -43,10 +47,27 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<Link href="/communities">Communities</Link>
|
||||
<div class="flex flex-row gap-2">
|
||||
<Link href="/communities">
|
||||
<Icon src={GlobeAlt} width={16} />
|
||||
<span class="hidden sm:inline ml-1">Communities</span>
|
||||
</Link>
|
||||
<Menu>
|
||||
<Button color={Color.accent} slot="button">
|
||||
<Icon src={Plus} width={16} />
|
||||
<span class="hidden sm:inline">Create</span>
|
||||
</Button>
|
||||
<span class="text-xs opacity-80 text-left mx-4 my-2">Create</span>
|
||||
<MenuButton link href="/create/post">
|
||||
<Icon src={PencilSquare} mini width={16} />
|
||||
Post
|
||||
</MenuButton>
|
||||
</Menu>
|
||||
</div>
|
||||
<Menu>
|
||||
<button
|
||||
class="w-8 h-8 rounded-full ring-1 ring-slate-300 bg-slate-100 dark:bg-zinc-800"
|
||||
class="w-8 h-8 rounded-full ring-1 ring-slate-300 bg-slate-100
|
||||
dark:bg-zinc-800"
|
||||
aria-label="Profile"
|
||||
slot="button"
|
||||
>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div
|
||||
class="sticky top-4 bg-white border border-slate-200
|
||||
class="sticky top-4 bg-white shadow-lg border-slate-200
|
||||
dark:border-zinc-800 dark:bg-zinc-900 break-words hidden lg:flex
|
||||
flex-col gap-4 p-8 max-w-sm rounded-md h-max max-h-[calc(100vh-2rem)] overflow-auto"
|
||||
>
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
export let top = false
|
||||
|
||||
let element: any
|
||||
|
||||
export let preventDefault = false
|
||||
</script>
|
||||
|
||||
<svelte:body
|
||||
@@ -31,7 +33,11 @@
|
||||
class="overflow-visible z-30 {absolute
|
||||
? 'absolute'
|
||||
: 'relative'} cursor-auto {clazz}"
|
||||
on:click={() => (open = !open)}
|
||||
on:click={(e) => {
|
||||
if (preventDefault) e.preventDefault()
|
||||
|
||||
open = !open
|
||||
}}
|
||||
bind:this={element}
|
||||
>
|
||||
<slot name="button" />
|
||||
@@ -42,7 +48,7 @@
|
||||
start: 0.95,
|
||||
easing: expoOut,
|
||||
}}
|
||||
class="absolute {rtl
|
||||
class="absolute max-h-64 overflow-auto {rtl
|
||||
? 'origin-top-right right-0'
|
||||
: 'origin-top-left left-0'}
|
||||
{top ? 'bottom-[100%] origin-bottom-left' : 'top-[100%]'}
|
||||
|
||||
Reference in new issue
Block a user