Skip to content

Commit 36902fa

Browse files
committed
Change logo colour on black + remove from non home pages
1 parent 148539a commit 36902fa

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed
Lines changed: 4 additions & 4 deletions
Loading

src/components/ui/LogoDownload.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,10 @@ function LogoVariantCard({
142142
}
143143

144144
interface LogoDownloadProps {
145-
isHomePage: boolean;
146145
open: boolean;
147146
}
148147

149-
export function LogoDownload({ isHomePage, open }: LogoDownloadProps) {
148+
export function LogoDownload({ open }: LogoDownloadProps) {
150149
const [showPopover, setShowPopover] = React.useState(false);
151150
const [mounted, setMounted] = React.useState(false);
152151
const triggerRef = React.useRef<HTMLDivElement>(null);
@@ -190,9 +189,7 @@ export function LogoDownload({ isHomePage, open }: LogoDownloadProps) {
190189
<DatabaseLogo
191190
className={cx(
192191
"w-28 sm:w-32 transition-colors",
193-
isHomePage && !open
194-
? "brightness-0 invert"
195-
: "dark:brightness-0 dark:invert",
192+
!open ? "brightness-0 invert" : "dark:brightness-0 dark:invert",
196193
)}
197194
/>
198195
</button>
@@ -201,9 +198,7 @@ export function LogoDownload({ isHomePage, open }: LogoDownloadProps) {
201198
"absolute -bottom-5 left-0 text-[10px] font-medium tracking-wide transition-all duration-200 pointer-events-none whitespace-nowrap",
202199
"opacity-0 group-hover:opacity-100 translate-y-0.5 group-hover:translate-y-0",
203200
showPopover && "!opacity-0",
204-
isHomePage && !open
205-
? "text-white/60"
206-
: "text-indigo-400/60 dark:text-white/40",
201+
!open ? "text-white/60" : "text-indigo-400/60 dark:text-white/40",
207202
)}
208203
>
209204
[ Brand Assets ]
@@ -252,7 +247,7 @@ export function LogoDownload({ isHomePage, open }: LogoDownloadProps) {
252247
filenamePrefix="paradedb-logo-light"
253248
/>
254249
<LogoVariantCard
255-
label="Dark"
250+
label="White"
256251
svgPath="/brand/paradedb-logo-dark.svg"
257252
bgClass="bg-slate-950"
258253
logoWidth={639}

src/components/ui/Navbar.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Link from "next/link";
1313
import { usePathname } from "next/navigation";
1414
import React from "react";
1515
import { Button } from "../Button";
16+
import { DatabaseLogo } from "./DatabaseLogo";
1617
import { LogoDownload } from "./LogoDownload";
1718
import { ThemeToggle } from "./ThemeToggle";
1819

@@ -99,7 +100,13 @@ export function Navigation() {
99100
open ? "px-6" : "px-0",
100101
)}
101102
>
102-
<LogoDownload isHomePage={isHomePage} open={open} />
103+
{isHomePage ? (
104+
<LogoDownload open={open} />
105+
) : (
106+
<Link href="/">
107+
<DatabaseLogo className="w-28 sm:w-32 transition-colors dark:brightness-0 dark:invert" />
108+
</Link>
109+
)}
103110
<nav className="hidden md:absolute md:left-1/2 md:top-1/2 md:block md:-translate-x-1/2 md:-translate-y-1/2 md:transform">
104111
<div className="flex items-center gap-6 text-sm font-medium">
105112
<Link

0 commit comments

Comments
 (0)