Skip to content
Open

Test1 #160

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/deco/BackgroundGradient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ export default function BackgroundGradient({ text = "", isFixed = false, isDoted
</div>
);
}

// test 1
7 changes: 4 additions & 3 deletions src/components/navigation/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { formatSlug } from "@/lib/composables/formatSlug";
import MobileMenu from "./MobileMenu";
import NavLogo from "./NavLogo";
import { BASE_PATH } from "@/lib/composables/production";
import { isPageScollNavless } from "@/lib/constants/navlessPages";

const components: { title: string; href: string; description: string }[] = [
{
Expand Down Expand Up @@ -80,7 +81,7 @@ export default function Navbar() {

handleScroll();

if (typeof window !== "undefined" && !window.location.href.includes("playground"))
if (typeof window !== "undefined" && !isPageScollNavless(window.location.href))
window.addEventListener("scroll", handleScroll);

return () => {
Expand All @@ -102,7 +103,7 @@ export default function Navbar() {
className={`flex h-12 items-center justify-between ${
isNavVisible
? "container mx-auto"
: "mx-[6vw] max-w-[1400px] rounded-full bg-white/50 p-2 px-4 pr-5 outline outline-1 outline-slate-100 drop-shadow-sm backdrop-blur-md dark:bg-_darkBg/50 dark:outline-slate-900 2xl:mx-auto"
: "mx-[6vw] max-w-[1400px] rounded-full bg-white/50 p-2 px-4 pr-5 outline outline-2 outline-slate-100/50 drop-shadow-sm backdrop-blur-md dark:bg-_darkBg/50 dark:outline-slate-900/50 2xl:mx-auto"
}`}
>
<div className="flex">
Expand Down Expand Up @@ -196,7 +197,7 @@ export default function Navbar() {
<LanguageSwitcher />
<ThemeSwitcher />
</div>
<Separator className="-ml-2 h-8" orientation="vertical" />
<Separator className="-ml-2 h-8 bg-_darkGrayText/15 dark:bg-_lightGrayText/15" orientation="vertical" />
<div className="flex gap-x-2">
<Icon
className="hover:cursor-pointer"
Expand Down
5 changes: 5 additions & 0 deletions src/lib/constants/navlessPages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const scollNavlessPages = ["playground"];

export function isPageScollNavless(href: string): boolean {
return scollNavlessPages.some((page) => href.includes(page));
}