Skip to content

Commit 386723b

Browse files
committed
Added PUBLIC_LOGO_WIDTH
1 parent 91f2ef4 commit 386723b

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ REDIS_PORT="6379"
3838
# UI Configuration
3939
PUBLIC_LOGO_URL="/logo2x-1.png"
4040
PUBLIC_DARK_LOGO_URL="/obp_logo.svg"
41+
PUBLIC_LOGO_WIDTH="100%"
4142

4243
# Links for documentation and for other reasons. No default
4344
API_EXPLORER_URL=http://localhost:5173

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ vite.config.ts.timestamp-*
2424

2525
# Local docs
2626
untracked_docs/
27+
untracked_files/

src/routes/+layout.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@
267267
268268
let darkLogoUrl = $state(env.PUBLIC_DARK_LOGO_URL || defaultDarkLogoUrl);
269269
270+
// Logo width, can be overridden by PUBLIC_LOGO_WIDTH in .env (e.g. "150px", "10rem", "100%")
271+
const logoWidth = env.PUBLIC_LOGO_WIDTH || "100%";
272+
270273
let logoUrl = $derived.by(() => {
271274
return displayMode === "dark" ? darkLogoUrl : lightLogoUrl;
272275
});
@@ -282,7 +285,7 @@
282285
>
283286
<Navigation.Header class="p-4">
284287
<a href="/" class="flex w-full items-center">
285-
<img class="block w-full" src={logoUrl} alt="Logo" />
288+
<img class="block" style="width: {logoWidth};" src={logoUrl} alt="Logo" />
286289
</a>
287290
</Navigation.Header>
288291

0 commit comments

Comments
 (0)