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: logo #13

Merged
merged 1 commit into from
Nov 14, 2024
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
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
package-lock.json
pnpm-lock.yaml
yarn.lock
src/lib/assets
13 changes: 12 additions & 1 deletion src/docs/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
export enum ThemeOption {
import type { Color, Shape, Size } from '@immich/ui';

export const shapes: Shape[] = ['rectangle', 'semi-round', 'round'];
export const colors: Color[] = ['primary', 'secondary', 'success', 'danger', 'warning', 'info'];
export const sizes: Size[] = ['tiny', 'small', 'medium', 'large', 'giant'];

export enum DisplayOption {
Both = 'both',
Light = 'light',
Dark = 'dark',
}

export enum Theme {
Light = 'light',
Dark = 'dark',
}
64 changes: 64 additions & 0 deletions src/docs/examples/LogoExamples.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<script lang="ts">
import { sizes as defaultSizes } from '$docs/constants.js';
import { Card, CardBody, CardHeader, CardTitle, Logo } from '@immich/ui';

const sizes = [...defaultSizes, 'landing'] as const;
type Props = { theme?: 'dark' | 'light' };
const { theme = 'dark' }: Props = $props();
</script>

<div class="flex flex-col gap-4">
<Card>
<CardHeader>
<CardTitle>Logo</CardTitle>
</CardHeader>
<CardBody>
<div class="m-2 flex flex-col gap-2">
{#each sizes as size}
<div class="flex gap-1 rounded-xl bg-gray-300 p-2 dark:bg-gray-600">
<Logo {size} {theme} variant="logo"></Logo>
<Logo {size} {theme} variant="logo"></Logo>
<Logo {size} {theme} variant="logo"></Logo>
</div>
{/each}
</div>
</CardBody>
</Card>
<Card>
<CardHeader>
<CardTitle>Icon</CardTitle>
</CardHeader>
<CardBody>
{#each sizes as size}
<div>
<Logo {size} {theme} variant="icon"></Logo>
</div>
{/each}
</CardBody>
</Card>
<Card>
<CardHeader>
<CardTitle>Inline</CardTitle>
</CardHeader>
<CardBody>
{#each sizes as size}
<div>
<Logo {size} {theme} variant="inline"></Logo>
</div>
{/each}
</CardBody>
</Card>

<Card>
<CardHeader>
<CardTitle>Stacked</CardTitle>
</CardHeader>
<CardBody>
{#each sizes as size}
<div>
<Logo {size} {theme} variant="stacked"></Logo>
</div>
{/each}
</CardBody>
</Card>
</div>
4 changes: 3 additions & 1 deletion src/docs/routes.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import ButtonExamples from '$docs/examples/ButtonExamples.svelte';
import CardExamples from '$docs/examples/CardExamples.svelte';
import CheckboxExamples from '$docs/examples/CheckboxExamples.svelte';
import LogoExamples from '$docs/examples/LogoExamples.svelte';
import type { Component } from 'svelte';

type Route = {
name: string;
link: string;
component: Component;
component: Component | Component<{ theme?: 'light' | 'dark' }>;
};

export const routes: Route[] = [
{ name: 'Button', link: '/examples/button', component: ButtonExamples },
{ name: 'Checkbox', link: '/examples/checkbox', component: CheckboxExamples },
{ name: 'Card', link: '/examples/card', component: CardExamples },
{ name: 'Logo', link: '/examples/logo', component: LogoExamples },
];
63 changes: 63 additions & 0 deletions src/lib/assets/immich-logo-inline-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions src/lib/assets/immich-logo-inline-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions src/lib/assets/immich-logo-stacked-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading