resource>blog cliclj go on another tab blog
This commit is contained in:
@@ -461,7 +461,13 @@ const navigationData = {
|
||||
{ text: "Careers", icon: Briefcase, href: "/company/careers" },
|
||||
],
|
||||
resources: [
|
||||
{ text: "Blogs", icon: BookOpen, href: "/resources/blog" },
|
||||
{
|
||||
text: "Blogs",
|
||||
icon: BookOpen,
|
||||
href: "https://www.wdipl.com/blog",
|
||||
target: "_blank",
|
||||
rel: "noopener noreferrer"
|
||||
},
|
||||
{ text: "Portfolio", icon: FileText, href: "/case-studies" },
|
||||
{
|
||||
text: "Client Testimonials",
|
||||
@@ -618,8 +624,12 @@ const MegaMenu = ({
|
||||
|
||||
if (!isOpen) return null;
|
||||
|
||||
const handleNavigate = (path: string) => {
|
||||
navigate(path);
|
||||
const handleNavigate = (path: string, target?: string) => {
|
||||
if (target === "_blank") {
|
||||
window.open(path, "_blank", "noopener,noreferrer");
|
||||
} else {
|
||||
navigate(path);
|
||||
}
|
||||
onClose();
|
||||
};
|
||||
|
||||
@@ -639,7 +649,7 @@ const MegaMenu = ({
|
||||
className="font-semibold text-white text-sm cursor-pointer hover:text-[#E5195E] transition-colors"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
service.href && handleNavigate(service.href);
|
||||
handleNavigate(service.href);
|
||||
}}
|
||||
>
|
||||
{service.category}
|
||||
@@ -653,7 +663,7 @@ const MegaMenu = ({
|
||||
className="text-[#CCCCCC] hover:text-white text-sm transition-colors duration-200 block py-1 hover:translate-x-1 transform text-left w-full"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
subService.href && handleNavigate(subService.href);
|
||||
handleNavigate(subService.href);
|
||||
}}
|
||||
>
|
||||
{subService.name}
|
||||
@@ -685,7 +695,7 @@ const MegaMenu = ({
|
||||
className="font-semibold text-white text-lg cursor-pointer hover:text-[#E5195E] transition-colors"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
category.href && handleNavigate(category.href);
|
||||
handleNavigate(category.href);
|
||||
}}
|
||||
>
|
||||
{category.category}
|
||||
@@ -699,7 +709,7 @@ const MegaMenu = ({
|
||||
className="text-[#CCCCCC] hover:text-white text-sm transition-colors duration-200 block py-1 hover:translate-x-1 transform text-left w-full"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
service.href && handleNavigate(service.href);
|
||||
handleNavigate(service.href);
|
||||
}}
|
||||
>
|
||||
{service.name}
|
||||
@@ -727,7 +737,7 @@ const MegaMenu = ({
|
||||
className="flex items-center gap-4 text-[#CCCCCC] hover:text-white transition-all duration-200 p-4 rounded-lg hover:bg-white/5 group w-full text-left"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
solution.href && handleNavigate(solution.href);
|
||||
handleNavigate(solution.href);
|
||||
}}
|
||||
>
|
||||
<div className="w-8 h-8 rounded-lg bg-[#E5195E]/20 flex items-center justify-center group-hover:scale-110 transition-transform">
|
||||
@@ -765,7 +775,7 @@ const MegaMenu = ({
|
||||
className="text-[#CCCCCC] hover:text-white text-sm transition-colors duration-200 block py-1 hover:translate-x-1 transform text-left w-full"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
item.href && handleNavigate(item.href);
|
||||
handleNavigate(item.href);
|
||||
}}
|
||||
>
|
||||
{item.name}
|
||||
@@ -790,10 +800,12 @@ const MegaMenu = ({
|
||||
<a
|
||||
key={item.text}
|
||||
href={item.href}
|
||||
target={item.target || "_self"}
|
||||
rel={item.rel || ""}
|
||||
className="flex items-center gap-4 text-[#CCCCCC] hover:text-white transition-all duration-200 p-4 rounded-lg hover:bg-white/5 group w-full text-left"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
item.href && handleNavigate(item.href);
|
||||
handleNavigate(item.href, item.target);
|
||||
}}
|
||||
>
|
||||
<div className="w-8 h-8 rounded-lg bg-[#E5195E]/20 flex items-center justify-center group-hover:scale-110 transition-transform">
|
||||
@@ -969,8 +981,12 @@ export const Navigation = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleNavigation = (path: string) => {
|
||||
navigate(path);
|
||||
const handleNavigation = (path: string, target?: string) => {
|
||||
if (target === "_blank") {
|
||||
window.open(path, "_blank", "noopener,noreferrer");
|
||||
} else {
|
||||
navigate(path);
|
||||
}
|
||||
setIsMobileMenuOpen(false);
|
||||
setActiveMenu(null);
|
||||
};
|
||||
@@ -1084,6 +1100,26 @@ export const Navigation = () => {
|
||||
{item}
|
||||
</a>
|
||||
))}
|
||||
|
||||
{/* Mobile Resources Submenu */}
|
||||
<div className="pl-4 space-y-2 border-l-2 border-[#E5195E]/30">
|
||||
{navigationData.resources.map((resource) => (
|
||||
<a
|
||||
key={resource.text}
|
||||
href={resource.href}
|
||||
target={resource.target || "_self"}
|
||||
rel={resource.rel || ""}
|
||||
className="block text-[#CCCCCC] hover:text-white transition-colors py-1 text-sm text-left w-full"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
handleNavigation(resource.href, resource.target);
|
||||
}}
|
||||
>
|
||||
{resource.text} {resource.target === "_blank" && "↗"}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Button
|
||||
onClick={() => handleNavigation("/start-a-project")}
|
||||
className="w-full mt-4"
|
||||
|
||||
Reference in New Issue
Block a user