Skip to content

Commit

Permalink
sveltekit: use public_app_name
Browse files Browse the repository at this point in the history
  • Loading branch information
while1618 committed Dec 22, 2024
1 parent 42020e8 commit d5f8dd2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ services:
context: ./frontend/svelte-kit
dockerfile: Dockerfile
environment:
JWT_SECRET: ${JWT_SECRET:-secret}
PUBLIC_APP_NAME: ${APP_NAME:-BootstrapBugZ}
API_URL: ${API_URL:-http://bootstrapbugz-api:8080/v1}
JWT_SECRET: ${JWT_SECRET:-secret}
ports:
- "${EXPOSED_UI_PORT:-5174}:${UI_PORT:-5173}"
depends_on:
Expand Down
1 change: 0 additions & 1 deletion frontend/svelte-kit/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="%paraglide.lang%" dir="%paraglide.textDirection%">
<head>
<meta charset="utf-8" />
<title>BootstrapBugZ</title>
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { PUBLIC_APP_NAME } from '$env/static/public';
import { Button } from '$lib/components/ui/button';
import { Separator } from '$lib/components/ui/separator';
import * as Sheet from '$lib/components/ui/sheet';
Expand All @@ -18,15 +19,15 @@
</Sheet.Trigger>
<Sheet.Content side="left">
<Sheet.Header>
<Sheet.Title class="self-center">BootstrapBugZ</Sheet.Title>
<Sheet.Title class="self-center">{PUBLIC_APP_NAME}</Sheet.Title>
<Separator />
<div class="self-center"><LanguageSwitcher /></div>
</Sheet.Header>
</Sheet.Content>
</Sheet.Root>
</div>

<Button href="/" class="text-2xl" variant="ghost">BootstrapBugZ</Button>
<Button href="/" class="text-2xl" variant="ghost">{PUBLIC_APP_NAME}</Button>

<div class="ml-auto flex items-center gap-3">
<div class="flex gap-3 lg:hidden">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { PUBLIC_APP_NAME } from '$env/static/public';
import { Button } from '$lib/components/ui/button';
import * as DropdownMenu from '$lib/components/ui/dropdown-menu';
import { Separator } from '$lib/components/ui/separator';
Expand Down Expand Up @@ -32,7 +33,7 @@
</Sheet.Trigger>
<Sheet.Content side="left">
<Sheet.Header>
<Sheet.Title class="self-center">BootstrapBugZ</Sheet.Title>
<Sheet.Title class="self-center">{PUBLIC_APP_NAME}</Sheet.Title>
<Separator />
<Sheet.Description>
<div class="flex w-full flex-col gap-2">
Expand Down Expand Up @@ -64,7 +65,7 @@
</Sheet.Root>
</div>

<Button href="/" class="text-2xl" variant="ghost">BootstrapBugZ</Button>
<Button href="/" class="text-2xl" variant="ghost">{PUBLIC_APP_NAME}</Button>

<div class="ml-auto flex items-center gap-3">
<div class="flex gap-3 lg:hidden">
Expand Down
5 changes: 5 additions & 0 deletions frontend/svelte-kit/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { navigating } from '$app/stores';
import { PUBLIC_APP_NAME } from '$env/static/public';
import GuestNavbar from '$lib/components/navbar/guest-navbar.svelte';
import UserNavbar from '$lib/components/navbar/user-navbar.svelte';
import Loading from '$lib/components/shared/loading.svelte';
Expand All @@ -18,6 +19,10 @@
const { data, children }: Props = $props();
</script>

<svelte:head>
<title>{PUBLIC_APP_NAME}</title>
</svelte:head>

<ParaglideJS {i18n}>
{#if $navigating}
<Loading />
Expand Down

0 comments on commit d5f8dd2

Please sign in to comment.