Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | 1x 3x 3x 3x 3x 1x 2x 3x 3x 3x 3x 3x 3x 3x 2x 2x 2x 3x 3x 1x | import Link from "next/link";
import { fetchServices } from "@/data/loaders";
import * as LucideIcons from "lucide-react";
import { ElementType } from "react";
import TechStackSlider from "@/components/custom/TechStackSlider";
import { Card, CardHeader, CardContent } from "@/components/ui/card";
import React from "react";
import { generateMetadataObject } from '@/lib/metadata';
import fetchContentType from '@/lib/strapi/fetchContentType';
import { Metadata } from "next";
import { strapiImage } from "@/lib/strapi/strapiImage";
import { ArrowUpRight, Sparkles } from "lucide-react";
type ServiceItem = {
name: string;
description: string;
icon: string;
};
type Service = {
uuid: string;
name: string;
description: string;
slug: string;
techstacklogos: { url: string }[];
service_items: ServiceItem[];
icon: string;
};
let heading: string = '', sub_heading: string = '', description: string = '';
export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> {
const BASE_URL_NEXT = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000";
const pageData = await fetchContentType('services-page', {
populate: ["seo","seo.metaImage"],
}, true)
console.log("Service Page Data:", pageData);
if (!pageData) {
return {
title: "Page Not Found | Bitmutex Technologies",
description: "The requested page does not exist. Browse more services by Bitmutex Technologies.",
robots: "noindex, nofollow",
};
}
const seo = pageData?.seo;
const metadata = generateMetadataObject(seo);
heading = pageData.heading;
sub_heading = pageData.sub_heading;
description = pageData.description;
const seotitle = seo?.metaTitle
? `${seo.metaTitle} | Bitmutex`
: `${pageData.heading || "Untitled"} | Bitmutex`;
let seodescription = seo?.metaDescription || pageData.description || "";
Iif (seodescription.length > 150) {
seodescription = seodescription.substring(0, seodescription.lastIndexOf(" ", 150)) + "...";
}
metadata.title = seotitle;
metadata.description = seodescription;
metadata.openGraph = {
...(metadata.openGraph as any),
title: seotitle,
description: seodescription,
images: seo?.metaImage
? [{ url: strapiImage(seo.metaImage.url) }]
: { url: `${BASE_URL_NEXT}/bmserv.png` },
url: `${BASE_URL_NEXT}/services`,
site_name: "Bitmutex",
locale: "en_US",
type: "website",
};
metadata.alternates = {
canonical: `${BASE_URL_NEXT}/services`,
};
return metadata;
}
const getLucideIcon = (iconName: string): ElementType => {
const pascalCaseName = iconName.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
return (LucideIcons as Record<string, unknown>)[pascalCaseName] as ElementType || LucideIcons.AlertCircle;
};
export default async function ServicesPage() {
const services: Service[] = await fetchServices();
return (
<div className="min-h-screen bg-linear-to-br from-slate-50 via-white to-blue-50 dark:from-slate-950 dark:via-slate-900 dark:to-blue-950">
{/* Animated background elements */}
<div className="absolute inset-0 overflow-hidden pointer-events-none">
<div className="absolute -top-40 -right-40 w-80 h-80 bg-linear-to-br from-blue-400/20 to-purple-600/20 rounded-full blur-3xl animate-pulse"></div>
<div className="absolute -bottom-40 -left-40 w-96 h-96 bg-linear-to-tr from-emerald-400/20 to-cyan-600/20 rounded-full blur-3xl animate-pulse delay-1000"></div>
</div>
<div className="relative container mx-auto px-6 py-20">
{/* Modern Header Section */}
<div className="text-center max-w-4xl mx-auto mb-16">
{/* Badge */}
<div className="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-linear-to-r from-blue-600/10 to-purple-600/10 border border-blue-200/50 dark:border-blue-800/50 mb-6">
<Sparkles className="w-4 h-4 text-blue-600 dark:text-blue-400" />
<span className="font-sans text-sm font-semibold text-blue-700 dark:text-blue-300 tracking-wide uppercase">
{heading || "Our Services"}
</span>
</div>
{/* Main Heading */}
<h1 className="font-heading text-3xl md:text-6xl lg:text-7xl font-bold bg-linear-to-br from-slate-900 via-slate-700 to-slate-600 dark:from-white dark:via-slate-200 dark:to-slate-400 bg-clip-text text-transparent leading-tight mb-6">
{sub_heading || "Premium Solutions"}
</h1>
{/* Description */}
<p className="font-sanstext-xl text-slate-600 dark:text-slate-400 leading-relaxed max-w-2xl mx-auto">
{description || "Discover our comprehensive suite of cutting-edge services designed to elevate your business."}
</p>
{/* Decorative line */}
<div className="w-24 h-1 bg-linear-to-r from-blue-600 to-purple-600 rounded-full mx-auto mt-8"></div>
</div>
{/* Services Grid */}
<div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-8">
{services.map((service, index) => (
<Link key={service.uuid} href={`/services/${service.slug}`} passHref>
<Card
className="group relative overflow-hidden bg-white/70 dark:bg-slate-900/70 backdrop-blur-xl border border-white/20 dark:border-slate-800/50 hover:border-blue-300/50 dark:hover:border-blue-700/50 transition-all duration-500 hover:shadow-2xl hover:shadow-blue-500/10 dark:hover:shadow-blue-400/5 hover:-translate-y-2 h-full"
style={{
animationDelay: `${index * 100}ms`
}}
>
{/* Gradient overlay on hover */}
<div className="absolute inset-0 bg-linear-to-br from-blue-600/5 to-purple-600/5 opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
{/* Glowing border effect */}
<div className="absolute inset-0 bg-linear-to-r from-blue-600/20 via-purple-600/20 to-emerald-600/20 rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-500 blur-xl -z-10"></div>
<CardHeader className="relative z-10 p-8">
<div className="flex items-start justify-between mb-4">
{/* Icon Container */}
<div className="relative">
<div className="w-16 h-16 bg-linear-to-br from-slate-100 to-slate-200 dark:from-slate-800 dark:to-slate-700 rounded-2xl flex items-center justify-center group-hover:scale-110 transition-transform duration-300 shadow-lg">
{service.icon && (
React.createElement(getLucideIcon(service.icon), {
className: "w-8 h-8 text-slate-700 dark:text-slate-300 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors duration-300",
})
)}
</div>
{/* Floating accent */}
<div className="absolute -top-1 -right-1 w-4 h-4 bg-linear-to-br from-blue-500 to-purple-600 rounded-full opacity-0 group-hover:opacity-100 transition-all duration-300 animate-pulse"></div>
</div>
{/* Arrow Icon */}
<ArrowUpRight className="w-5 h-5 text-slate-400 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-all duration-300 group-hover:translate-x-1 group-hover:-translate-y-1" />
</div>
{/* Service Title */}
<h3 className="font-heading text-2xl font-bold text-slate-900 dark:text-white mb-3 group-hover:text-blue-700 dark:group-hover:text-blue-300 transition-colors duration-300">
{service.name}
</h3>
</CardHeader>
<CardContent className="relative z-10 px-8 pb-8 flex-1 flex flex-col">
{/* Description */}
<p className="font-sans text-slate-600 dark:text-slate-400 leading-relaxed mb-6 flex-1 line-clamp-3">
{service.description}
</p>
{/* Tech Stack */}
{service.techstacklogos.length > 0 && (
<div className="mt-auto">
<div className="text-sm font-medium text-slate-500 dark:text-slate-400 mb-3 uppercase tracking-wide">
Technology Stack
</div>
<div className="relative overflow-hidden rounded-lg bg-slate-50/50 dark:bg-slate-800/50 p-3">
<TechStackSlider logos={service.techstacklogos} width={40} height={40} />
</div>
</div>
)}
{/* Bottom gradient line */}
<div className="absolute bottom-0 left-0 right-0 h-1 bg-linear-to-r from-transparent via-blue-600/50 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"></div>
</CardContent>
</Card>
</Link>
))}
</div>
{/* Call to Action Section */}
<div className="text-center mt-20 pt-16 border-t border-slate-200/50 dark:border-slate-800/50">
<Link href="/connect"> {/* <-- Add your desired path here */}
<div className="font-heading inline-flex items-center gap-2 px-6 py-3 bg-linear-to-r from-sky-500 to-blue-600 text-white font-semibold rounded-full hover:from-sky-700 hover:to-blue-700 transition-all duration-300 hover:scale-105 shadow-lg hover:shadow-xl cursor-pointer">
<span>Ready to get started?</span>
<ArrowUpRight className="w-5 h-5" />
</div>
</Link>
</div>
</div>
</div>
);
} |