Skip to content

Commit 97decc2

Browse files
committed
Add dev favicons and conditional favicon logic
Introduces development favicons for ChatUI and HuggingChat, and updates layout to use these when PUBLIC_ORIGIN is not set. This helps distinguish development environments from production by displaying different favicons.
1 parent e720fd6 commit 97decc2

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

src/routes/+layout.svelte

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,18 +197,22 @@
197197
<meta property="og:description" content={publicConfig.PUBLIC_APP_DESCRIPTION} />
198198
{/if}
199199
<link rel="icon" href="{publicConfig.assetPath}/icon.svg" type="image/svg+xml" />
200-
<link
201-
rel="icon"
202-
href="{publicConfig.assetPath}/favicon.svg"
203-
type="image/svg+xml"
204-
media="(prefers-color-scheme: light)"
205-
/>
206-
<link
207-
rel="icon"
208-
href="{publicConfig.assetPath}/favicon-dark.svg"
209-
type="image/svg+xml"
210-
media="(prefers-color-scheme: dark)"
211-
/>
200+
{#if publicConfig.PUBLIC_ORIGIN}
201+
<link
202+
rel="icon"
203+
href="{publicConfig.assetPath}/favicon.svg"
204+
type="image/svg+xml"
205+
media="(prefers-color-scheme: light)"
206+
/>
207+
<link
208+
rel="icon"
209+
href="{publicConfig.assetPath}/favicon-dark.svg"
210+
type="image/svg+xml"
211+
media="(prefers-color-scheme: dark)"
212+
/>
213+
{:else}
214+
<link rel="icon" href="{publicConfig.assetPath}/favicon-dev.svg" type="image/svg+xml" />
215+
{/if}
212216
<link rel="apple-touch-icon" href="{publicConfig.assetPath}/apple-touch-icon.png" />
213217
<link rel="manifest" href="{publicConfig.assetPath}/manifest.json" />
214218

static/chatui/favicon-dev.svg

Lines changed: 3 additions & 0 deletions
Loading

static/huggingchat/favicon-dev.svg

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)