fix: navbar and resposive issues
This commit is contained in:
parent
005f63aeeb
commit
f7311438a3
6 changed files with 152 additions and 81 deletions
46
app/page.tsx
46
app/page.tsx
|
|
@ -1,20 +1,14 @@
|
||||||
"use client"
|
"use client"
|
||||||
import { Metadata } from "next"
|
|
||||||
import { Button } from "components/Button/Button"
|
import { Button } from "components/Button/Button"
|
||||||
import { InfiniteSlider } from "components/Slider/Slider"
|
import { InfiniteSlider } from "components/Slider/Slider"
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
import Navbar from "components/Navbar/Navbar"
|
|
||||||
import { LP_GRID_ITEMS } from "lp-items"
|
|
||||||
import { FaArrowRight, FaFileCsv, FaNewspaper } from "react-icons/fa"
|
import { FaArrowRight, FaFileCsv, FaNewspaper } from "react-icons/fa"
|
||||||
import "../styles/custom.css"
|
import "../styles/custom.css"
|
||||||
import { MdOutlineWeb } from "react-icons/md"
|
|
||||||
import { TiTick } from "react-icons/ti"
|
import { TiTick } from "react-icons/ti"
|
||||||
import { MdOutlineAppSettingsAlt } from "react-icons/md"
|
|
||||||
import { Glow, GlowCapture } from "@codaworks/react-glow"
|
import { Glow, GlowCapture } from "@codaworks/react-glow"
|
||||||
import StarBackground from "components/StarBackground/StarBackground"
|
|
||||||
import { Textarea } from "@nextui-org/react"
|
|
||||||
import ImageFilter from "components/ImageFilter/ImageFilter"
|
import ImageFilter from "components/ImageFilter/ImageFilter"
|
||||||
import { BackgroundBeams } from "components/Ui/BackgroundBeams"
|
import { BsGlobe2, BsAndroid, BsApple, BsHeadsetVr } from "react-icons/bs"
|
||||||
|
|
||||||
export default function Web() {
|
export default function Web() {
|
||||||
const [init, setInit] = useState(false)
|
const [init, setInit] = useState(false)
|
||||||
|
|
@ -160,7 +154,7 @@ export default function Web() {
|
||||||
<div className=" glowable-text flex max-w-[100%] items-center rounded-[20px] border p-4 glow:border-glow glow:bg-glow/[.50] glow:ring-2 glow:ring-glow">
|
<div className=" glowable-text flex max-w-[100%] items-center rounded-[20px] border p-4 glow:border-glow glow:bg-glow/[.50] glow:ring-2 glow:ring-glow">
|
||||||
<div className=" text-center">
|
<div className=" text-center">
|
||||||
<div className="mr-3 inline-flex flex-shrink-0 items-center justify-center rounded-full px-5 ">
|
<div className="mr-3 inline-flex flex-shrink-0 items-center justify-center rounded-full px-5 ">
|
||||||
<MdOutlineWeb className="h-[80px] w-[80px] text-white" />
|
<BsGlobe2 className="h-[50px] w-[50px] text-white" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex h-full flex-col rounded-lg ">
|
<div className="flex h-full flex-col rounded-lg ">
|
||||||
|
|
@ -171,8 +165,7 @@ export default function Web() {
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-grow flex-col justify-between">
|
<div className="flex flex-grow flex-col justify-between">
|
||||||
<p className="text-base leading-relaxed text-gray-300">
|
<p className="text-base leading-relaxed text-gray-300">
|
||||||
We specialize in creating modern, user-friendly websites that reflect your brand and drive
|
We craft engaging and responsive websites that captivate users and drive business growth.
|
||||||
business growth.
|
|
||||||
</p>
|
</p>
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
|
|
@ -199,19 +192,19 @@ export default function Web() {
|
||||||
<div className=" glowable-text flex max-w-[100%] items-center rounded-[20px] border p-4 glow:border-glow glow:bg-glow/[.50] glow:ring-2 glow:ring-glow">
|
<div className=" glowable-text flex max-w-[100%] items-center rounded-[20px] border p-4 glow:border-glow glow:bg-glow/[.50] glow:ring-2 glow:ring-glow">
|
||||||
<div className=" text-center">
|
<div className=" text-center">
|
||||||
<div className="mr-3 inline-flex flex-shrink-0 items-center justify-center rounded-full px-5 ">
|
<div className="mr-3 inline-flex flex-shrink-0 items-center justify-center rounded-full px-5 ">
|
||||||
<MdOutlineAppSettingsAlt className="h-[80px] w-[80px] text-white" />
|
<BsApple className="h-[50px] w-[50px] text-white" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex h-full flex-col rounded-lg ">
|
<div className="flex h-full flex-col rounded-lg ">
|
||||||
<div className="mb-3 flex items-center ">
|
<div className="mb-3 flex items-center ">
|
||||||
<h2 className="mb-4 max-w-3xl text-4xl font-extrabold capitalize leading-none tracking-tight text-white md:text-4xl xl:text-3xl">
|
<h2 className="mb-4 max-w-3xl text-4xl font-extrabold capitalize leading-none tracking-tight text-white md:text-4xl xl:text-3xl">
|
||||||
IOS / Android App Development
|
IOS Application Development
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-grow flex-col justify-between">
|
<div className="flex flex-grow flex-col justify-between">
|
||||||
<p className="text-base leading-relaxed text-gray-300">
|
<p className="text-base leading-relaxed text-gray-300">
|
||||||
We specialize in creating modern, user-friendly websites that reflect your brand and drive
|
Our skilled team designs and develops intuitive iOS apps that seamlessly integrate with Apple
|
||||||
business growth.
|
devices.
|
||||||
</p>
|
</p>
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
|
|
@ -238,19 +231,18 @@ export default function Web() {
|
||||||
<div className=" glowable-text flex max-w-[100%] items-center rounded-[20px] border p-4 glow:border-glow glow:bg-glow/[.50] glow:ring-2 glow:ring-glow">
|
<div className=" glowable-text flex max-w-[100%] items-center rounded-[20px] border p-4 glow:border-glow glow:bg-glow/[.50] glow:ring-2 glow:ring-glow">
|
||||||
<div className=" text-center">
|
<div className=" text-center">
|
||||||
<div className="mr-3 inline-flex flex-shrink-0 items-center justify-center rounded-full px-5 ">
|
<div className="mr-3 inline-flex flex-shrink-0 items-center justify-center rounded-full px-5 ">
|
||||||
<MdOutlineWeb className="h-[80px] w-[80px] text-white" />
|
<BsAndroid className="h-[50px] w-[50px] text-white" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex h-full flex-col rounded-lg ">
|
<div className="flex h-full flex-col rounded-lg ">
|
||||||
<div className="mb-3 flex items-center ">
|
<div className="mb-3 flex items-center ">
|
||||||
<h2 className="mb-4 max-w-3xl text-4xl font-extrabold capitalize leading-none tracking-tight text-white md:text-4xl xl:text-3xl">
|
<h2 className="mb-4 max-w-3xl text-4xl font-extrabold capitalize leading-none tracking-tight text-white md:text-4xl xl:text-3xl">
|
||||||
Web Devlopment
|
Android Application Development
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-grow flex-col justify-between">
|
<div className="flex flex-grow flex-col justify-between">
|
||||||
<p className="text-base leading-relaxed text-gray-300">
|
<p className="text-base leading-relaxed text-gray-300">
|
||||||
We specialize in creating modern, user-friendly websites that reflect your brand and drive
|
From concept to deployment, we create robust Android apps that cater to a diverse user base.
|
||||||
business growth.
|
|
||||||
</p>
|
</p>
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
|
|
@ -277,19 +269,19 @@ export default function Web() {
|
||||||
<div className=" glowable-text flex max-w-[100%] items-center rounded-[20px] border p-4 glow:border-glow glow:bg-glow/[.50] glow:ring-2 glow:ring-glow">
|
<div className=" glowable-text flex max-w-[100%] items-center rounded-[20px] border p-4 glow:border-glow glow:bg-glow/[.50] glow:ring-2 glow:ring-glow">
|
||||||
<div className=" text-center">
|
<div className=" text-center">
|
||||||
<div className="mr-3 inline-flex flex-shrink-0 items-center justify-center rounded-full px-5 ">
|
<div className="mr-3 inline-flex flex-shrink-0 items-center justify-center rounded-full px-5 ">
|
||||||
<MdOutlineWeb className="h-[80px] w-[80px] text-white" />
|
<BsHeadsetVr className="h-[50px] w-[50px] text-white" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex h-full flex-col rounded-lg ">
|
<div className="flex h-full flex-col rounded-lg ">
|
||||||
<div className="mb-3 flex items-center ">
|
<div className="mb-3 flex items-center ">
|
||||||
<h2 className="mb-4 max-w-3xl text-4xl font-extrabold capitalize leading-none tracking-tight text-white md:text-4xl xl:text-3xl">
|
<h2 className="mb-4 max-w-3xl text-4xl font-extrabold capitalize leading-none tracking-tight text-white md:text-4xl xl:text-3xl">
|
||||||
Web Devlopment
|
Apps for AR Devices
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-grow flex-col justify-between">
|
<div className="flex flex-grow flex-col justify-between">
|
||||||
<p className="text-base leading-relaxed text-gray-300">
|
<p className="text-base leading-relaxed text-gray-300">
|
||||||
We specialize in creating modern, user-friendly websites that reflect your brand and drive
|
Immerse users in augmented reality experiences with our cutting-edge applications for MetaQuest
|
||||||
business growth.
|
and Apple Vision Pro.
|
||||||
</p>
|
</p>
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
|
|
@ -317,7 +309,7 @@ export default function Web() {
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section className="mb-32 h-[150vh] bg-[#0f172a] pl-[10%] pr-[10%] pt-40">
|
<section className="mb-10 h-[20%] bg-[#0f172a] pl-[10%] pr-[10%] pt-40">
|
||||||
<div className="mx-auto place-self-center text-center">
|
<div className="mx-auto place-self-center text-center">
|
||||||
<div className="mb-4 text-center text-4xl font-extrabold capitalize leading-none tracking-tight text-white md:text-4xl xl:text-5xl">
|
<div className="mb-4 text-center text-4xl font-extrabold capitalize leading-none tracking-tight text-white md:text-4xl xl:text-5xl">
|
||||||
<h1 className="bg-gradient-to-r from-slate-400 via-white to-slate-400 bg-clip-text text-transparent">
|
<h1 className="bg-gradient-to-r from-slate-400 via-white to-slate-400 bg-clip-text text-transparent">
|
||||||
|
|
@ -329,10 +321,12 @@ export default function Web() {
|
||||||
digital transformation across industries.”
|
digital transformation across industries.”
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<ImageFilter />
|
<div>
|
||||||
|
<ImageFilter />
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section className="bg-[#0f172a] dark:bg-gray-900 md:pt-[8%] lg:pt-[5%]">
|
<section className="bg-[#0f172a] max-md:p-4 md:pl-0 md:pr-0 lg:pl-[10%] lg:pr-[10%]">
|
||||||
<div className="mx-auto max-w-screen-md px-4 py-8 lg:py-16">
|
<div className="mx-auto max-w-screen-md px-4 py-8 lg:py-16">
|
||||||
<h2 className="mb-4 text-center text-4xl font-extrabold capitalize leading-none tracking-tight text-white md:text-4xl xl:text-5xl">
|
<h2 className="mb-4 text-center text-4xl font-extrabold capitalize leading-none tracking-tight text-white md:text-4xl xl:text-5xl">
|
||||||
Contact Us
|
Contact Us
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,28 @@ const button = cva(["inline-flex", "items-center", "rounded-xl", "text-center",
|
||||||
"border-2",
|
"border-2",
|
||||||
"border-slate-100",
|
"border-slate-100",
|
||||||
],
|
],
|
||||||
|
navSignIn: [
|
||||||
|
"bg-transparent",
|
||||||
|
"justify-center",
|
||||||
|
"text-slate-200",
|
||||||
|
"rounded-[30px]",
|
||||||
|
"hover:text-white",
|
||||||
|
"border-solid",
|
||||||
|
"border-0",
|
||||||
|
"border-slate-100",
|
||||||
|
"mr-2",
|
||||||
|
],
|
||||||
|
navSignUp: [
|
||||||
|
"justify-center",
|
||||||
|
"text-slate-100",
|
||||||
|
"hover:text-white",
|
||||||
|
"rounded-[30px]",
|
||||||
|
"border-solid",
|
||||||
|
"border-2",
|
||||||
|
"border-slate-100",
|
||||||
|
"flex",
|
||||||
|
"mx-auto",
|
||||||
|
],
|
||||||
hero1: [
|
hero1: [
|
||||||
"text-black",
|
"text-black",
|
||||||
"bg-white",
|
"bg-white",
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import { Button } from "components/Button/Button"
|
import { Button } from "components/Button/Button"
|
||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
import { Image } from "./image"
|
import { ImageCard } from "./image"
|
||||||
import { FilterableData } from "./FilterableData"
|
import { FilterableData } from "./FilterableData"
|
||||||
import { CardBody, CardContainer, CardItem } from "components/Ui/Card"
|
import { CardBody, CardContainer, CardItem } from "components/Ui/Card"
|
||||||
import { motion } from "framer-motion" // Import motion
|
import { motion } from "framer-motion" // Import motion
|
||||||
|
|
@ -33,11 +33,16 @@ const ImageFilter = () => {
|
||||||
))}
|
))}
|
||||||
{/* filtered cards display */}
|
{/* filtered cards display */}
|
||||||
</div>
|
</div>
|
||||||
<main className="grid w-full gap-x-5 gap-y-8 md:mt-8 md:grid-cols-2 lg:grid-cols-3">
|
{/* <main className="grid w-full gap-x-5 gap-y-8 md:mt-8 md:grid-cols-2 lg:grid-cols-3"> */}
|
||||||
|
<main className="grid max-w-full grid-cols-1 place-items-center gap-3 p-4 md:max-w-full md:grid-cols-3">
|
||||||
{FilterableData.map((item, index) => (
|
{FilterableData.map((item, index) => (
|
||||||
<motion.div
|
<motion.div
|
||||||
key={index}
|
key={index}
|
||||||
layout
|
layout={"position"}
|
||||||
|
initial={{ opacity: 0 }}
|
||||||
|
animate={{ opacity: 1 }}
|
||||||
|
exit={{ opacity: 0 }}
|
||||||
|
transition={{ duration: 0.5 }}
|
||||||
className={`w-full cursor-pointer rounded-lg border border-gray-600 bg-gray-800 shadow ${
|
className={`w-full cursor-pointer rounded-lg border border-gray-600 bg-gray-800 shadow ${
|
||||||
activeFilter === "all" || activeFilter === item.name
|
activeFilter === "all" || activeFilter === item.name
|
||||||
? "" /* Show card */
|
? "" /* Show card */
|
||||||
|
|
@ -46,8 +51,8 @@ const ImageFilter = () => {
|
||||||
>
|
>
|
||||||
<CardContainer>
|
<CardContainer>
|
||||||
<CardBody>
|
<CardBody>
|
||||||
<Image
|
<ImageCard
|
||||||
className="h-[400px] w-full overflow-hidden rounded-lg"
|
className="h-full w-full overflow-hidden rounded-lg"
|
||||||
image={item.src}
|
image={item.src}
|
||||||
alt={item.name}
|
alt={item.name}
|
||||||
objectCover="object-cover"
|
objectCover="object-cover"
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,9 @@ type ImageOwnProps<T extends React.ElementType> = {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ImageProps<T extends React.ElementType> = ImageOwnProps<T> & Omit<React.ComponentProps<T>, keyof ImageOwnProps<T>>
|
type ImageProps<T extends React.ElementType> = ImageOwnProps<T> & Omit<React.ComponentProps<T>, keyof ImageOwnProps<T>>
|
||||||
|
import Image from "next/image"
|
||||||
|
|
||||||
export const Image = <T extends React.ElementType = "div">({
|
export const ImageCard = <T extends React.ElementType = "div">({
|
||||||
className,
|
className,
|
||||||
image,
|
image,
|
||||||
alt,
|
alt,
|
||||||
|
|
@ -19,7 +20,7 @@ export const Image = <T extends React.ElementType = "div">({
|
||||||
const Component = as || "div"
|
const Component = as || "div"
|
||||||
return (
|
return (
|
||||||
<Component className={className} {...rest}>
|
<Component className={className} {...rest}>
|
||||||
<img src={image} alt={alt} className={`h-full w-full ${objectCover}`} />
|
<Image src={image} width={400} height={400} alt={alt} className={`h-full w-full ${objectCover}`} />
|
||||||
</Component>
|
</Component>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,99 @@
|
||||||
|
"use client"
|
||||||
interface NavbarProps {
|
interface NavbarProps {
|
||||||
logoSrc: string; // Path to your logo image
|
logoSrc: string // Path to your logo image
|
||||||
|
}
|
||||||
|
|
||||||
|
import { useState, useEffect } from "react"
|
||||||
|
import { Button } from "components/Button/Button"
|
||||||
|
import { FaArrowRight } from "react-icons/fa"
|
||||||
|
|
||||||
|
const Navbar: React.FC<NavbarProps> = ({ logoSrc }) => {
|
||||||
|
const [showBackground, setShowBackground] = useState(false)
|
||||||
|
const TOP_OFFSET = 50
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const handleScroll = () => {
|
||||||
|
if (window.scrollY >= TOP_OFFSET) {
|
||||||
|
setShowBackground(true)
|
||||||
|
} else {
|
||||||
|
setShowBackground(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener("scroll", handleScroll)
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener("scroll", handleScroll)
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
const [hovered, setHovered] = useState(false)
|
||||||
|
const imgStyle = {
|
||||||
|
transform: hovered ? "translateX(3px)" : "none",
|
||||||
|
transition: "transform .2s", // Optional: Smooth transition
|
||||||
}
|
}
|
||||||
|
|
||||||
const Navbar: React.FC<NavbarProps> = ({ logoSrc }) => {
|
return (
|
||||||
return (
|
<nav
|
||||||
<nav className="fixed top-0 left-0 w-full h-20 bg-transparent flex items-center justify-between px-4 z-50">
|
className={`${
|
||||||
<a href="/">
|
showBackground ? "backdrop-blur" : "bg-transparent"
|
||||||
<img src={logoSrc} alt="Your Logo" className="h-20" />
|
} fixed left-0 top-0 z-50 flex h-20 w-full items-center justify-between px-4 text-white`}
|
||||||
</a>
|
>
|
||||||
<ul className="hidden md:flex space-x-4 text-lg font-medium">
|
<a href="/">
|
||||||
<li>
|
<img src={logoSrc} alt="Your Logo" className="h-20 text-white" />
|
||||||
<a href="/" className="hover:text-gray-700">
|
</a>
|
||||||
Home
|
<ul className="hidden space-x-4 text-lg font-medium md:flex">
|
||||||
</a>
|
<li>
|
||||||
</li>
|
<a href="/" className="hover:text-vizoleG2">
|
||||||
<li>
|
Home
|
||||||
<a href="/services" className="hover:text-gray-700">
|
</a>
|
||||||
Services
|
</li>
|
||||||
</a>
|
<li>
|
||||||
</li>
|
<a href="/services" className="hover:text-vizoleG2">
|
||||||
<li>
|
Services
|
||||||
<a href="/portfolio" className="hover:text-gray-700">
|
</a>
|
||||||
Portfolio
|
</li>
|
||||||
</a>
|
<li>
|
||||||
</li>
|
<a href="/portfolio" className="hover:text-vizoleG2">
|
||||||
<li>
|
Portfolio
|
||||||
<a href="/about-us" className="hover:text-gray-700">
|
</a>
|
||||||
About Us
|
</li>
|
||||||
</a>
|
<li>
|
||||||
</li>
|
<a href="/about-us" className="hover:text-vizoleG2">
|
||||||
<li>
|
About Us
|
||||||
<a href="/contact-us" className="hover:text-gray-700">
|
</a>
|
||||||
Contact Us
|
</li>
|
||||||
</a>
|
<li>
|
||||||
</li>
|
<a href="/contact-us" className="hover:text-vizoleG2">
|
||||||
</ul>
|
Contact Us
|
||||||
<div className="flex md:hidden items-center">
|
</a>
|
||||||
<button className="px-4 py-2 text-white bg-blue-500 hover:bg-blue-700 rounded-md">
|
</li>
|
||||||
Sign In
|
</ul>
|
||||||
</button>
|
<div className="flex items-center">
|
||||||
<button className="px-4 py-2 ml-2 text-white bg-green-500 hover:bg-green-700 rounded-md">
|
<Button
|
||||||
Sign Up
|
href="https://vercel.com/new/git/external?repository-url=https://github.com/Blazity/next-enterprise"
|
||||||
</button>
|
intent="navSignIn"
|
||||||
</div>
|
size="hero1"
|
||||||
</nav>
|
>
|
||||||
);
|
Sign In
|
||||||
};
|
</Button>
|
||||||
|
<Button
|
||||||
export default Navbar;
|
href="https://vercel.com/new/git/external?repository-url=https://github.com/Blazity/next-enterprise"
|
||||||
|
intent="navSignUp"
|
||||||
|
size="hero1"
|
||||||
|
onMouseEnter={() => setHovered(true)}
|
||||||
|
onMouseLeave={() => setHovered(false)}
|
||||||
|
>
|
||||||
|
Sign Up
|
||||||
|
<div className="ml-2">
|
||||||
|
<span>
|
||||||
|
<FaArrowRight style={imgStyle} className="text-white" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Navbar
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 23 KiB |
Loading…
Add table
Add a link
Reference in a new issue