design: increase prominence of create post button
This commit is contained in:
14 files changed
+140
-148
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<script lang="ts">
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
|
||||
let { children } = $props()
|
||||
</script>
|
||||
|
||||
<Header pageHeader>
|
||||
{$t('nav.create.label')}
|
||||
</Header>
|
||||
|
||||
<div class="h-3 sm:h-6"></div>
|
||||
<Tabs
|
||||
style="subpage"
|
||||
routes={[
|
||||
{
|
||||
href: '/create/post',
|
||||
name: $t('nav.create.post'),
|
||||
},
|
||||
{
|
||||
href: '/create/community',
|
||||
name: $t('nav.create.community'),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<div class="h-3 sm:h-6"></div>
|
||||
|
||||
{@render children?.()}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { redirect } from '@sveltejs/kit'
|
||||
|
||||
export function load() {
|
||||
redirect(302, '/create/post')
|
||||
}
|
||||
@@ -2,4 +2,6 @@
|
||||
import CommunityForm from '$lib/components/lemmy/community/CommunityForm.svelte'
|
||||
</script>
|
||||
|
||||
<CommunityForm />
|
||||
<CommunityForm>
|
||||
{#snippet formtitle()}{/snippet}
|
||||
</CommunityForm>
|
||||
@@ -32,26 +32,20 @@
|
||||
<title>{$t('form.post.create')}</title>
|
||||
</svelte:head>
|
||||
|
||||
<div class="w-full max-w-5xl mx-auto h-full">
|
||||
<PostForm
|
||||
passedData={data.crosspost == true
|
||||
? post
|
||||
: {
|
||||
body: '',
|
||||
community: null,
|
||||
image: null,
|
||||
loading: false,
|
||||
nsfw: false,
|
||||
title: '',
|
||||
url: undefined,
|
||||
}}
|
||||
passedCommunity={community}
|
||||
onsubmit={e => goto(`/post/${e.post.id}`)}
|
||||
>
|
||||
{#snippet formtitle()}
|
||||
<Header class="text-3xl font-bold" pageHeader>
|
||||
{$t('routes.createPost')}
|
||||
</Header>
|
||||
{/snippet}
|
||||
</PostForm>
|
||||
</div>
|
||||
<PostForm
|
||||
passedData={data.crosspost == true
|
||||
? post
|
||||
: {
|
||||
body: '',
|
||||
community: null,
|
||||
image: null,
|
||||
loading: false,
|
||||
nsfw: false,
|
||||
title: '',
|
||||
url: undefined,
|
||||
}}
|
||||
passedCommunity={community}
|
||||
onsubmit={e => goto(`/post/${e.post.id}`)}
|
||||
>
|
||||
{#snippet formtitle()}{/snippet}
|
||||
</PostForm>
|
||||
Reference in new issue
Block a user