flotilla/src/routes/home/+page.svelte

73 lines
2.3 KiB
Svelte
Raw Normal View History

2024-08-05 21:45:16 +00:00
<script lang="ts">
import {onMount} from "svelte"
import {goto} from "$app/navigation"
2024-10-09 21:19:27 +00:00
import Icon from "@lib/components/Icon.svelte"
2024-10-11 21:48:09 +00:00
import Link from "@lib/components/Link.svelte"
2024-10-09 21:19:27 +00:00
import Button from "@lib/components/Button.svelte"
2024-08-08 21:02:46 +00:00
import CardButton from "@lib/components/CardButton.svelte"
2024-10-11 21:48:09 +00:00
import SpaceAdd from "@app/components/SpaceAdd.svelte"
2024-08-16 17:50:38 +00:00
import {pushModal} from "@app/modal"
import {makeSpacePath} from "@app/routes"
import {PLATFORM_NAME, PLATFORM_RELAY} from "@app/state"
2024-08-14 00:58:26 +00:00
2024-10-11 21:48:09 +00:00
const addSpace = () => pushModal(SpaceAdd)
2024-08-15 19:08:07 +00:00
onMount(() => {
if (PLATFORM_RELAY) {
goto(makeSpacePath(PLATFORM_RELAY))
}
})
2024-08-05 21:45:16 +00:00
</script>
{#if !PLATFORM_RELAY}
2025-03-04 18:47:58 +00:00
<div class="hero min-h-screen overflow-auto pb-8">
<div class="hero-content">
<div class="column content gap-4">
<h1 class="text-center text-5xl">Welcome to</h1>
<h1 class="mb-4 text-center text-5xl font-bold uppercase">{PLATFORM_NAME}</h1>
2024-10-24 17:11:01 +00:00
<div class="col-3">
<Button onclick={addSpace}>
<CardButton>
2025-02-04 00:37:14 +00:00
{#snippet icon()}
<div><Icon icon="add-circle" size={7} /></div>
{/snippet}
{#snippet title()}
<div>Add a space</div>
{/snippet}
{#snippet info()}
<div>Use an invite link, or create your own space.</div>
{/snippet}
</CardButton>
</Button>
2025-04-03 22:35:56 +00:00
<Link href="/discover">
<CardButton>
2025-02-04 00:37:14 +00:00
{#snippet icon()}
<div><Icon icon="compass" size={7} /></div>
{/snippet}
{#snippet title()}
<div>Browse the network</div>
{/snippet}
{#snippet info()}
2025-04-03 22:35:56 +00:00
<div>Find communities on the nostr network.</div>
2025-02-04 00:37:14 +00:00
{/snippet}
</CardButton>
</Link>
2025-04-03 22:35:56 +00:00
<Link href="/people">
<CardButton>
2025-02-04 00:37:14 +00:00
{#snippet icon()}
<div><Icon icon="chat-round" size={7} /></div>
{/snippet}
{#snippet title()}
<div>Start a conversation</div>
{/snippet}
{#snippet info()}
<div>Use nostr's encrypted group chats to stay in touch.</div>
{/snippet}
</CardButton>
2025-04-03 22:35:56 +00:00
</Link>
</div>
2024-08-05 21:45:16 +00:00
</div>
</div>
</div>
{/if}