design: increase prominence of create post button

This commit is contained in:
James Xylight committed 2025-08-26 17:42:01 -07:00
1 parent 421d26790b
commit 25c879d173
14 files changed
+140 -148

No files matched your search

+29
View File
@@ -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?.()}
+5
View File
@@ -0,0 +1,5 @@
import { redirect } from '@sveltejs/kit'
export function load() {
redirect(302, '/create/post')
}
+3 -1
View File
@@ -2,4 +2,6 @@
import CommunityForm from '$lib/components/lemmy/community/CommunityForm.svelte'
</script>
<CommunityForm />
<CommunityForm>
{#snippet formtitle()}{/snippet}
</CommunityForm>
+17 -23
View File
@@ -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>
+12 -13
View File
@@ -9,19 +9,18 @@
<title>{$t('routes.moderation.title')}</title>
</svelte:head>
<Tabs
routes={[
{
href: '/moderation',
name: $t('routes.moderation.feed'),
},
{
href: '/moderation/communities',
name: $t('routes.communities.title'),
},
]}
/>
<div class="w-full space-y-4 pb-8">
<Tabs
class="overflow-auto"
routes={[
{
href: '/moderation',
name: $t('routes.moderation.feed'),
},
{
href: '/moderation/communities',
name: $t('routes.communities.title'),
},
]}
/>
{@render children?.()}
</div>
@@ -19,10 +19,10 @@
import {
ArrowPath,
ArrowTrendingDown,
ChatBubbleOvalLeft,
Clock,
Fire,
Icon,
PlusCircle,
Star,
Trophy,
} from 'svelte-hero-icons'
@@ -77,7 +77,7 @@
)}
onclick={() => (commenting = true)}
>
<Icon src={PlusCircle} size="16" micro />
<Icon src={ChatBubbleOvalLeft} size="16" micro />
{$t('routes.post.addComment')}
</Button>