Skip to content

Free & Open-Source Invoice Generator - No Sign-Up, No Ads, Instant PDF Export, 100% In-Browser, and Fully Customizable Templates.

fix(style): update header styles on marketing page

VladSez2e3ba5d67e58
diff --git a/src/app/(components)/header/index.tsx b/src/app/(components)/header/index.tsx
index 7c61601..a497abf 100644
--- a/src/app/(components)/header/index.tsx
+++ b/src/app/(components)/header/index.tsx
@@ -7,7 +7,6 @@ import { GITHUB_URL } from "@/config";
import { cn } from "@/lib/utils";
import { type Locale } from "next-intl";
import Link from "next/link";
-import { usePathname } from "next/navigation";
import { useState } from "react";
import { LanguageSwitcher } from "./language-switcher";
import { Logo } from "./logo";
@@ -36,10 +35,7 @@ export interface HeaderProps {
}
const desktopNavLinkClass =
- "rounded-md px-3 py-1.5 text-sm font-medium hover:bg-slate-100 hover:text-black active:scale-[0.97] transition-all duration-300";
-
-const activeDesktopNavLinkClass =
- "bg-slate-200/70 text-black hover:bg-slate-200/80";
+ "rounded-md text-slate-800 px-3 py-1.5 text-sm font-medium hover:bg-slate-100 hover:text-black active:scale-[0.97] transition-all duration-300";
export function Header({
locale,
@@ -48,12 +44,6 @@ export function Header({
}: HeaderProps) {
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
- const pathname = usePathname();
-
- const isChangelogActive = pathname === "/changelog";
- const isTosActive = pathname === "/tos";
- const isHomeActive = pathname === `/${locale}/about`;
-
return (
<header className="sticky top-0 z-50 w-full border-b bg-white shadow-sm">
<div className="flex items-center justify-center">
@@ -80,50 +70,19 @@ export function Header({
{translations.navLinks.github}
</Link>
{/* a href this is only reliable way to scroll to a section on route navigation*/}
- {/* <a
- href={`/${locale}/about#features`}
- className={cn(desktopNavLinkClass, "text-slate-800")}
- >
- {translations.navLinks.features}
- </a> */}
- {/* a href this is only reliable way to scroll to a section on route navigation*/}
- {/* <a
- href={`/${locale}/about#faq`}
- className={cn(desktopNavLinkClass, "text-slate-800")}
- >
- {translations.navLinks.faq}
- </a> */}
-
<a
href={`/${locale}/about`}
- className={cn(
- desktopNavLinkClass,
- isHomeActive ? activeDesktopNavLinkClass : "text-slate-800",
- )}
+ className={cn(desktopNavLinkClass)}
>
{translations.navLinks.home}
</a>
{/* eslint-disable-next-line @next/next/no-html-link-for-pages */}
- <a
- href="/changelog"
- className={cn(
- desktopNavLinkClass,
- isChangelogActive
- ? activeDesktopNavLinkClass
- : "text-slate-800",
- )}
- >
+ <a href="/changelog" className={cn(desktopNavLinkClass)}>
{translations.changelogLinkText}
</a>
{/* eslint-disable-next-line @next/next/no-html-link-for-pages */}
- <a
- href="/tos"
- className={cn(
- desktopNavLinkClass,
- isTosActive ? activeDesktopNavLinkClass : "text-slate-800",
- )}
- >
+ <a href="/tos" className={cn(desktopNavLinkClass)}>
{translations.termsOfServiceLinkText}
</a>
</nav>
diff --git a/src/app/(components)/header/mobile-menu.tsx b/src/app/(components)/header/mobile-menu.tsx
index d425efe..15ea87d 100644
--- a/src/app/(components)/header/mobile-menu.tsx
+++ b/src/app/(components)/header/mobile-menu.tsx
@@ -22,7 +22,7 @@ interface MobileMenuPanelProps extends MobileMenuSharedProps {
}
const mobileNavLinkClass =
- "flex items-center rounded-lg px-4 py-4 text-lg font-medium hover:bg-slate-100/90 hover:text-black active:scale-[0.98] transition-all duration-300 md:px-5 md:py-5";
+ "flex items-center rounded-lg px-4 py-4 text-lg font-medium hover:bg-slate-100/90 hover:text-black active:scale-[0.98] transition-all duration-300 md:px-5";
const activeMobileNavLinkClass =
"bg-slate-200/70 text-black hover:bg-slate-200/80";