Skip to content

Commit e0fbb03

Browse files
authored
Adding logo. Different in light and dark mode (#293)
1 parent eca775a commit e0fbb03

7 files changed

Lines changed: 69 additions & 6 deletions

File tree

www/src/lib/components/app-sidebar.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<script lang="ts">
22
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
33
import { siteConfig } from '$lib/config';
4-
import GalleryVerticalEnd from 'lucide-svelte/icons/gallery-vertical-end';
54
import type { ComponentProps } from 'svelte';
65
let { ref = $bindable(null), ...restProps }: ComponentProps<typeof Sidebar.Root> = $props();
76
import { docsNavigation } from '$lib/components/doc-navigation.svelte';
87
import { page } from '$app/state';
98
import SocialMedia from './social-media.svelte';
109
const path = $derived(page.url.pathname);
10+
const compactLogo = siteConfig.logoMark ?? siteConfig.logo;
1111
</script>
1212

1313
<Sidebar.Root bind:ref {...restProps}>
@@ -20,7 +20,11 @@
2020
<div
2121
class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground"
2222
>
23-
<GalleryVerticalEnd class="size-4" />
23+
<img
24+
src={compactLogo}
25+
alt="Foundry Local logo"
26+
class="h-5 w-5"
27+
/>
2428
</div>
2529
<div class="flex flex-col gap-0.5 leading-none">
2630
<span class="font-semibold"> {siteConfig.title} </span>

www/src/lib/components/home/hero.svelte

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,23 @@
6666

6767
<div class="relative overflow-hidden">
6868
<div class="relative mx-auto max-w-[85rem] px-4 pb-10 pt-24 sm:px-6 lg:px-8">
69+
<!-- Brand mark -->
70+
<div
71+
class="mx-auto flex max-w-2xl justify-center"
72+
use:animate={{ delay: 0, duration: 700, animation: 'fade-in' }}
73+
>
74+
<img src={siteConfig.logo} alt="Foundry Local logo" class="h-16 dark:hidden" />
75+
{#if siteConfig.logoDark}
76+
<img src={siteConfig.logoDark} alt="Foundry Local logo" class="hidden h-16 dark:block" />
77+
{:else}
78+
<img src={siteConfig.logo} alt="Foundry Local logo" class="hidden h-16 dark:block" />
79+
{/if}
80+
</div>
81+
6982
<!-- Title -->
7083
<div class="mx-auto mt-5 max-w-2xl text-center">
7184
<h1
72-
use:animate={{ delay: 0, duration: 800, animation: 'slide-up' }}
85+
use:animate={{ delay: 150, duration: 800, animation: 'slide-up' }}
7386
class="block text-4xl font-bold text-gray-800 dark:text-neutral-200 md:text-5xl lg:text-6xl"
7487
>
7588
<span class="text-primary">Foundry Local</span>
@@ -79,7 +92,7 @@
7992
<!-- Description -->
8093
<div class="mx-auto mt-5 max-w-3xl text-center">
8194
<p
82-
use:animate={{ delay: 200, duration: 800, animation: 'slide-up' }}
95+
use:animate={{ delay: 350, duration: 800, animation: 'slide-up' }}
8396
class="text-lg text-gray-600 dark:text-neutral-400"
8497
>
8598
{siteConfig.description}

www/src/lib/config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ export const siteConfig: SiteConfig = {
2626
},
2727
{ title: 'GitHub', href: 'https://github.com/microsoft/foundry-local' }
2828
],
29-
logo: '/azure.svg',
30-
logoDark: '/azure-white.svg',
29+
logo: '/logos/foundry-local-logo-color.svg',
30+
logoDark: '/logos/foundry-local-logo-fill.svg',
31+
logoMark: '/logos/foundry-local-logo-stroke.svg',
3132
favicon: '/favicon.png'
3233
};
3334

www/src/lib/types/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export interface SiteConfig {
2929
/** Path to the dark theme logo (optional) */
3030
logoDark?: string;
3131

32+
/** Optional mark or monochrome variant for compact contexts */
33+
logoMark?: string;
34+
3235
/** Path to the site favicon */
3336
favicon: string;
3437
}
Lines changed: 34 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)