Refactor and update navigation and constants
- Refactor code for consistency in formatting and styling. - Update `navLinks` to revise URLs and labels for improved clarity. - Adjust button text in `DesktopNav` from "Portal" to "Kontakt".
This commit is contained in:
@@ -60,8 +60,12 @@ const Nav = ({openNav}: Props) => {
|
|||||||
<div className="hidden lg:flex items-center space-x-6 transition-all duration-300 ease-in-out">
|
<div className="hidden lg:flex items-center space-x-6 transition-all duration-300 ease-in-out">
|
||||||
{navLinks.map((link) => (
|
{navLinks.map((link) => (
|
||||||
<Link href={link.url} key={link.id}>
|
<Link href={link.url} key={link.id}>
|
||||||
<p className={`nav_link ${contentSize} transition-all duration-300 ease-in-out`}
|
<p
|
||||||
style={{color: colors.primaryText}}>{link.label}</p>
|
className={`nav_link ${contentSize} transition-all duration-300 ease-in-out uppercase font-semibold`}
|
||||||
|
style={{color: colors.primaryText}}>
|
||||||
|
{link.label}
|
||||||
|
</p>
|
||||||
|
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
@@ -72,7 +76,7 @@ const Nav = ({openNav}: Props) => {
|
|||||||
<button
|
<button
|
||||||
className={`${buttonSize} text-white font-semibold bg-blue-700 hover:bg-blue-900 transition-all duration-300 ease-in-out rounded-full`}
|
className={`${buttonSize} text-white font-semibold bg-blue-700 hover:bg-blue-900 transition-all duration-300 ease-in-out rounded-full`}
|
||||||
>
|
>
|
||||||
Portal
|
Kontakt
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{/* Theme Toggle Button */}
|
{/* Theme Toggle Button */}
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ const MobileNav = ({closeNav, showNav}: Props) => {
|
|||||||
const navOpen = showNav ? "translate-y-0 opacity-100" : "-translate-y-20 opacity-0 pointer-events-none";
|
const navOpen = showNav ? "translate-y-0 opacity-100" : "-translate-y-20 opacity-0 pointer-events-none";
|
||||||
const { theme, toggleTheme } = useContext(ThemeContext);
|
const { theme, toggleTheme } = useContext(ThemeContext);
|
||||||
const colors = themeColors[theme];
|
const colors = themeColors[theme];
|
||||||
|
|
||||||
|
const cleanDarkBackground = theme === "dark" ? "#2A2A2A" : colors.primaryBg;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="lg:hidden">
|
<div className="lg:hidden">
|
||||||
{/* overlay background */}
|
{/* overlay background */}
|
||||||
@@ -27,10 +30,7 @@ const MobileNav = ({closeNav, showNav}: Props) => {
|
|||||||
{/* nav menu */}
|
{/* nav menu */}
|
||||||
<div
|
<div
|
||||||
className={`fixed top-0 left-0 w-full z-[10006] transform ${navOpen} transition-all duration-500 ease-in-out text-[var(--primary-text)] shadow-md rounded-b-2xl`}
|
className={`fixed top-0 left-0 w-full z-[10006] transform ${navOpen} transition-all duration-500 ease-in-out text-[var(--primary-text)] shadow-md rounded-b-2xl`}
|
||||||
style={{
|
style={{ backgroundColor: theme === "dark" ? "#2A2A2A" : "#ffffff", color: theme === "dark" ? "#f5f5f5" : "#1a1a1a" }}
|
||||||
backgroundColor: theme === "dark" ? "#2A2A2A" : "#ffffff",
|
|
||||||
color: theme === "dark" ? "#f5f5f5" : "#1a1a1a"
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<div className="flex flex-col items-center justify-center py-8 space-y-4 px-4 relative">
|
<div className="flex flex-col items-center justify-center py-8 space-y-4 px-4 relative">
|
||||||
{/* Close icon */}
|
{/* Close icon */}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export const navLinks = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
url: 'contact',
|
url: 'services',
|
||||||
label: 'Kontakt',
|
label: 'Leistungen',
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
Reference in New Issue
Block a user