Skip to content

Commit c45c533

Browse files
committed
feat: make logo themable
1 parent c51446b commit c45c533

File tree

5 files changed

+192
-154
lines changed

5 files changed

+192
-154
lines changed

apps/frontend/public/logo.svg

Lines changed: 86 additions & 33 deletions
Loading

apps/frontend/src/routes/__root.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { $api } from "../stores/api";
2828
import { DefaultError, useQueryClient } from "@tanstack/react-query";
2929
import { i18n } from "../stores/i18n";
3030
import { C } from "../configuration";
31+
import logo from "/logo.svg";
3132

3233
const messages = i18n("RootRoute", {
3334
title: "Home",
@@ -67,7 +68,7 @@ function Root() {
6768
<AppShell.Header>
6869
<Group justify="space-between">
6970
<Link to="/">
70-
<Brand title={C.env.title} />
71+
<Brand title={C.env.title} logoPath={logo} />
7172
</Link>
7273
{sessionStore.email && (
7374
<Group>

examples/public/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ services:
7878
THEME_COLOR: uzhGold
7979
TITLE: LEMON
8080
volumes:
81-
- logo.svg:/usr/share/nginx/logo.svg
81+
- ./logo.svg:/usr/share/nginx/html/logo.svg
8282
labels:
8383
- "com.centurylinklabs.watchtower.enable=true"
8484
- "traefik.enable=true"

libs/ui/src/components/Brand.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { Group, Stack, Title } from "@mantine/core";
2-
import React, { ComponentType } from "react";
32

43
type Props = {
54
title: string;
6-
Logo: ComponentType<React.SVGProps<SVGSVGElement> | React.ImgHTMLAttributes<HTMLImageElement>>;
5+
logoPath: string;
76
};
87

9-
export function Brand({ title, Logo }: Props) {
8+
export function Brand({ title, logoPath }: Props) {
109
return (
1110
<Group className="quassel-Brand" gap="md">
12-
<Logo className="quassel-Logo" />
11+
<img src={logoPath} className="quassel-Logo" />
1312
<Stack gap={0}>
1413
<Title order={2} c="black">
1514
{title}

0 commit comments

Comments
 (0)