Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: homepage improvements #100

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 22 additions & 17 deletions apps/next.immich.app/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
appStoreBadge,
Button,
Heading,
HStack,
Icon,
Logo,
playStoreBadge,
Expand All @@ -24,38 +23,44 @@
<DocsHeader />
</AppShellHeader>

<PageContent class="mx-auto max-w-screen-lg">
<VStack gap={8} class="p-8 text-center">
<PageContent class="mx-auto w-full max-w-screen-lg">
<VStack gap={8} class="mt-4 lg:mt-16 text-center">
<Logo size="giant" variant="logo" class="border" />
<Heading size="title"
>Self-hosted <span class="text-primary">photo and<br /> video management</span> solution</Heading
>Self-hosted <span class="text-primary">photo and<br class="hidden lg:block" /> video management</span> solution</Heading
>
<Text
>Easily back up, organize, and manage your photos on your own server. Immich helps you<br /> browse, search and organize
your photos and videos with ease, without sacrificing your privacy.</Text
>Easily back up, organize, and manage your photos on your own server. Immich helps you<br
class="hidden lg:block"
/> browse, search and organize your photos and videos with ease, without sacrificing your privacy.</Text
>
<HStack>
<Button size="large" href="/download">Download</Button>
<Button size="large" href="https://demo.immich.app/" color="secondary">
<span>Open Demo</span>
<Icon icon={mdiOpenInNew} />
</Button>
</HStack>
<Button size="large" variant="ghost">Join our Discord</Button>

<div class="flex flex-col gap-4">
<div class="flex flex-col sm:flex-row gap-4 justify-center">
<Button size="large" href="/download">Download</Button>
<Button size="large" href="https://demo.immich.app/" color="secondary">
<span>Open Demo</span>
<Icon icon={mdiOpenInNew} />
</Button>
</div>
<div class="flex justify-center">
<Button size="large" variant="ghost">Join our Discord</Button>
</div>
</div>

<img src={screenshot} alt="Immich application" />

<hr class="border-t w-full max-w-screen-sm m-8" />
<Heading size="title">Download mobile app</Heading>
<Text>Download Immich app and start backing up your photos and videos securely to your own server</Text>
<HStack gap={0}>
<div class="flex flex-col lg:flex-row">
<Button href="" variant="ghost" class="p-0">
<img src={playStoreBadge} alt="Playstore Badge" class="h-24" />
</Button>
<Button href="" variant="ghost" class="p-0">
<img src={appStoreBadge} alt="Playstore Badge" class="h-24 p-4" />
<img src={appStoreBadge} alt="Playstore Badge" class="h-24 p-[16px]" />
</Button>
</HStack>
</div>
<img src={qrCode} alt="QRCode" class="h-36" />
</VStack>
</PageContent>
Expand Down
41 changes: 38 additions & 3 deletions src/lib/components/Header.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script lang="ts">
import { afterNavigate } from '$app/navigation';
import { page } from '$app/state';
import type { HeaderItem } from '$lib/types';
import { Button, HStack, IconButton, Logo, syncToDom, theme, Theme } from '@immich/ui';
import { mdiWeatherNight, mdiWeatherSunny } from '@mdi/js';
import { Button, CloseButton, HStack, IconButton, Logo, NavbarItem, syncToDom, theme, Theme } from '@immich/ui';
import { mdiMenu, mdiWeatherNight, mdiWeatherSunny } from '@mdi/js';
import type { Snippet } from 'svelte';

type Props = {
Expand All @@ -24,30 +25,64 @@
$effect(() => {
syncToDom();
});

let menuOpen = $state(false);
afterNavigate(() => {
menuOpen = false;
});
</script>

<nav class="flex items-center justify-between md:gap-2 p-2">
<a href="/" class="flex gap-2 text-4xl">
<Logo variant="inline" />
</a>
{@render children?.()}

<HStack gap={0}>
{#each items as item}
<Button
class="hidden md:flex"
href={item.href}
shape="round"
variant={item.variant ?? 'ghost'}
color={(item.color ?? isActive(item.href)) ? 'primary' : 'secondary'}>{item.title}</Button
>
{/each}
<IconButton
size="large"
size="giant"
shape="round"
color="primary"
variant="ghost"
class="ml-2"
icon={themeIcon}
onclick={handleToggleTheme}
/>
<span class="md:hidden">
{#if menuOpen}
<CloseButton class="md:hidden" size="giant" onclick={() => (menuOpen = false)} />
{:else}
<IconButton
size="giant"
shape="round"
color="secondary"
variant="ghost"
class="md:hidden"
icon={mdiMenu}
onclick={() => (menuOpen = true)}
/>
{/if}
</span>
</HStack>
</nav>

{#if menuOpen}
<div class="h-dvh w-dvw bg-light/80 text-dark fixed left-0">
<nav class="w-full absolute bg-light text-dark overflow-y-hidden py-4 border-t">
<div class="flex flex-col">
{#each items as item}
<NavbarItem href={item.href} title={item.title} />
{/each}
</div>
</nav>
</div>
{/if}
Loading