Compare commits
4 Commits
version_24
...
version_27
| Author | SHA1 | Date | |
|---|---|---|---|
| f04ba57938 | |||
|
|
ae40e9e616 | ||
| da4cfcc1ba | |||
|
|
5141485438 |
@@ -1,5 +1,6 @@
|
|||||||
import { useState, useEffect, useRef } from "react";
|
import { useState, useEffect, useRef } from "react";
|
||||||
|
|
||||||
|
import { Plus, ArrowRight } from "lucide-react";
|
||||||
import { Plus, ArrowRight } from "lucide-react";
|
import { Plus, ArrowRight } from "lucide-react";
|
||||||
import { cls } from "@/lib/utils";
|
import { cls } from "@/lib/utils";
|
||||||
import Button from "@/components/ui/Button";
|
import Button from "@/components/ui/Button";
|
||||||
@@ -89,46 +90,46 @@ const NavbarCentered = ({ logo, navItems, ctaButton }: NavbarCenteredProps) => {
|
|||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{menuOpen && (
|
<div
|
||||||
<div
|
ref={menuRef}
|
||||||
ref={menuRef}
|
className={cls(
|
||||||
|
"md:hidden fixed z-1000 top-3 left-3 right-3 p-6 rounded-lg bg-background/80 backdrop-blur-[2px] transition-all duration-300 ease-in-out",
|
||||||
className="md:hidden fixed z-1000 top-3 left-3 right-3 p-6 rounded-lg bg-background/80 backdrop-blur-[2px]"
|
menuOpen ? "opacity-100 translate-y-0" : "opacity-0 -translate-y-4 pointer-events-none"
|
||||||
>
|
|
||||||
<div className="flex items-center justify-between mb-6">
|
|
||||||
<p className="text-xl text-foreground">Menu</p>
|
|
||||||
<button
|
|
||||||
className="flex items-center justify-center shrink-0 size-9 rounded cursor-pointer primary-button"
|
|
||||||
onClick={() => setMenuOpen(false)}
|
|
||||||
aria-label="Close menu"
|
|
||||||
>
|
|
||||||
<Plus className="w-1/2 h-1/2 text-primary-cta-text rotate-45" strokeWidth={1.5} />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex flex-col gap-4">
|
|
||||||
{navItems.map((item, index) => (
|
|
||||||
<div key={item.name}>
|
|
||||||
<a
|
|
||||||
href={item.href}
|
|
||||||
onClick={(e) => handleNavClick(e, item.href, () => setMenuOpen(false))}
|
|
||||||
className="flex items-center justify-between py-2 text-base font-medium text-foreground"
|
|
||||||
>
|
|
||||||
{item.name}
|
|
||||||
<ArrowRight className="size-4 text-foreground" strokeWidth={1.5} />
|
|
||||||
</a>
|
|
||||||
{index < navItems.length - 1 && (
|
|
||||||
<div className="h-px bg-linear-to-r from-transparent via-foreground/20 to-transparent" />
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="mt-6">
|
|
||||||
<Button text={ctaButton.text} href={ctaButton.href} variant="primary" animate={false} className="w-full" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
>
|
||||||
|
<div className="flex items-center justify-between mb-6">
|
||||||
|
<p className="text-xl text-foreground">Menu</p>
|
||||||
|
<button
|
||||||
|
className="flex items-center justify-center shrink-0 size-9 rounded cursor-pointer primary-button"
|
||||||
|
onClick={() => setMenuOpen(false)}
|
||||||
|
aria-label="Close menu"
|
||||||
|
>
|
||||||
|
<Plus className="w-1/2 h-1/2 text-primary-cta-text rotate-45" strokeWidth={1.5} />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-col gap-4">
|
||||||
|
{navItems.map((item, index) => (
|
||||||
|
<div key={item.name}>
|
||||||
|
<a
|
||||||
|
href={item.href}
|
||||||
|
onClick={(e) => handleNavClick(e, item.href, () => setMenuOpen(false))}
|
||||||
|
className="flex items-center justify-between py-2 text-base font-medium text-foreground"
|
||||||
|
>
|
||||||
|
{item.name}
|
||||||
|
<ArrowRight className="size-4 text-foreground" strokeWidth={1.5} />
|
||||||
|
</a>
|
||||||
|
{index < navItems.length - 1 && (
|
||||||
|
<div className="h-px bg-linear-to-r from-transparent via-foreground/20 to-transparent" />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-6">
|
||||||
|
<Button text={ctaButton.text} href={ctaButton.href} variant="primary" animate={false} className="w-full" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const NavbarFloating = ({ logo, navItems, ctaButton }: NavbarFloatingProps) => {
|
|||||||
<>
|
<>
|
||||||
{menuOpen && (
|
{menuOpen && (
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 z-500 bg-black/20 backdrop-blur-lg"
|
className="fixed inset-0 z-500 bg-black/20 backdrop-blur-md"
|
||||||
onClick={() => setMenuOpen(false)}
|
onClick={() => setMenuOpen(false)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -41,8 +41,7 @@ const NavbarFloating = ({ logo, navItems, ctaButton }: NavbarFloatingProps) => {
|
|||||||
|
|
||||||
<nav className="fixed z-1000 top-5 left-1/2 -translate-x-1/2 w-content-width">
|
<nav className="fixed z-1000 top-5 left-1/2 -translate-x-1/2 w-content-width">
|
||||||
<div className={cls(
|
<div className={cls(
|
||||||
"mx-auto w-full md:w-1/2 overflow-hidden rounded-theme-capped border border-white/10 bg-white/10 shadow-lg",
|
"mx-auto w-full md:w-1/2 overflow-hidden rounded-theme-capped border border-white/10 bg-white/10 shadow-lg backdrop-blur-lg"
|
||||||
menuOpen ? "backdrop-blur-lg" : "backdrop-blur-lg"
|
|
||||||
)}>
|
)}>
|
||||||
<div className="relative z-10 flex items-center justify-between gap-3 xl:gap-4 2xl:gap-5 p-3 xl:p-4 2xl:p-5">
|
<div className="relative z-10 flex items-center justify-between gap-3 xl:gap-4 2xl:gap-5 p-3 xl:p-4 2xl:p-5">
|
||||||
<a href="/" className="text-xl font-medium text-foreground">{logo}</a>
|
<a href="/" className="text-xl font-medium text-foreground">{logo}</a>
|
||||||
|
|||||||
@@ -5,15 +5,15 @@
|
|||||||
|
|
||||||
:root {
|
:root {
|
||||||
/* @colorThemes/lightTheme/grayNavyBlue */
|
/* @colorThemes/lightTheme/grayNavyBlue */
|
||||||
--background: #fafffb;
|
--background: #0a0a0a;
|
||||||
--card: #ffffff;
|
--card: #1a1a1a;
|
||||||
--foreground: #001a0a;
|
--foreground: #ffffff;
|
||||||
--primary-cta: #0a705f;
|
--primary-cta: #1f7cff;
|
||||||
--primary-cta-text: #fafffb;
|
--primary-cta-text: #ffffff;
|
||||||
--secondary-cta: #ffffff;
|
--secondary-cta: #010101;
|
||||||
--secondary-cta-text: #001a0a;
|
--secondary-cta-text: #ffffff;
|
||||||
--accent: #a8d9be;
|
--accent: #1f7cff;
|
||||||
--background-accent: #6bbfb8;
|
--background-accent: #f96b2f;
|
||||||
|
|
||||||
/* @layout/border-radius/rounded */
|
/* @layout/border-radius/rounded */
|
||||||
--radius: 1.5rem;
|
--radius: 1.5rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user