Skip to content

Commit

Permalink
feat: update Contact Sales layout page
Browse files Browse the repository at this point in the history
  • Loading branch information
saimonkat committed Dec 24, 2024
1 parent 067f47c commit 83f8536
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 100 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
'use client';

import clsx from 'clsx';
import Image from 'next/image';
import PropTypes from 'prop-types';
import { Pagination, Autoplay } from 'swiper/modules';
import { Swiper, SwiperSlide } from 'swiper/react';

import Link from 'components/shared/link/link';

import 'swiper/css';
import 'swiper/css/pagination';
import 'swiper/css/autoplay';
import './style.css';

const CaseStudies = ({ items }) => (
<Swiper
modules={[Pagination, Autoplay]}
autoplay={{ delay: 4000, disableOnInteraction: false }}
wrapperTag="ul"
slidesPerView="auto"
spaceBetween={20}
speed={700}
pagination={{ clickable: true }}
breakpoints={{
1024: {
centeredSlides: false,
},
}}
loop
centeredSlides
>
{items.map(({ title, description, logo, link }, index) => (
<SwiperSlide className="!flex !w-[278px] sm:!w-[calc(100vw-40px)]" tag="li" key={index}>
<Link
className="group relative h-44 w-full rounded-xl border border-gray-new-10 bg-[#0A0A0C] p-5 text-left shadow-contact xl:h-[134px] xl:p-[18px] md:h-32 md:p-4"
to={link}
>
<div className="relative z-10 flex h-full flex-col justify-between">
<p className="relative text-xl font-medium leading-snug tracking-tight text-white xl:text-lg">
{title}{' '}
<span
className="font-light text-gray-new-60 lg:block"
dangerouslySetInnerHTML={{ __html: description }}
/>
</p>
<Image
className="relative h-6 w-fit xl:h-5 sm:h-[18px]"
src={logo.src}
alt={logo.alt}
width={logo.width}
height={logo.height}
priority
/>
</div>
<div
className={clsx(
'pointer-events-none absolute -inset-px rounded-[inherit] bg-[linear-gradient(67deg,rgba(82,156,160,.14)_16%,rgba(82,156,160,.7))]',
'opacity-0 transition-opacity duration-300 group-hover:opacity-100',
'before:absolute before:inset-px before:rounded-[inherit] before:bg-[radial-gradient(75%_95%_at_84%_0%,rgba(24,62,65,.8),rgba(10,18,18,.9))]'
)}
aria-hidden
/>
</Link>
</SwiperSlide>
))}
</Swiper>
);

CaseStudies.propTypes = {
items: PropTypes.arrayOf(
PropTypes.shape({
title: PropTypes.string.isRequired,
description: PropTypes.string.isRequired,
logo: PropTypes.shape({
src: PropTypes.string.isRequired,
alt: PropTypes.string.isRequired,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
}).isRequired,
link: PropTypes.string.isRequired,
})
).isRequired,
};

export default CaseStudies;
3 changes: 3 additions & 0 deletions src/components/pages/contact-sales/hero/case-studies/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import CaseStudies from './case-studies';

export default CaseStudies;
34 changes: 34 additions & 0 deletions src/components/pages/contact-sales/hero/case-studies/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.swiper {
@apply relative pb-7 lg:w-screen;

&:before,
&:after {
@apply pointer-events-none absolute inset-y-0 z-10 w-[225px] content-[''];
@apply bg-gradient-to-r from-transparent to-black-pure;
@apply xl:w-[153px] lg:w-[185px] sm:hidden;
}

&:before {
@apply left-0 hidden bg-gradient-to-l lg:block sm:hidden;
}

&:after {
@apply right-0 bg-gradient-to-r;
}
}

.swiper-pagination {
@apply !bottom-0 flex gap-3.5;
@apply lg:justify-center;

&-bullet {
@apply relative !m-0 h-[3px] w-[59px] rounded-sm bg-gray-new-10 opacity-100;
@apply transition-colors duration-300 hover:bg-gray-new-15;
@apply before:absolute before:-inset-y-2 before:inset-x-0;
@apply after:absolute after:inset-y-0 after:left-0 after:w-0 after:rounded-[inherit] after:bg-gray-new-20;

&-active {
@apply after:animate-slide-in;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const ContactForm = () => {
return (
<form
className={clsx(
'relative z-10 grid gap-y-6 rounded-xl border border-gray-new-10 bg-[#020203] p-8 shadow-contact xl:gap-y-5 xl:p-[30px] md:gap-y-6 sm:p-5',
'relative z-10 grid gap-y-6 rounded-xl border border-gray-new-10 bg-[#020203] p-8 shadow-contact xl:gap-y-5 xl:p-[30px] lg:gap-y-6 sm:p-5',
'bg-[radial-gradient(131.75%_102.44%_at_16.67%_0%,_rgba(20,24,31,.5),_rgba(20,24,31,0.30)_47.96%,_rgba(20,24,31,0))]'
)}
method="POST"
Expand Down Expand Up @@ -187,15 +187,15 @@ const ContactForm = () => {
tag="textarea"
theme="transparent"
labelClassName={labelClassName}
textareaClassName="min-h-[148px]"
textareaClassName="min-h-[170px] xl:min-h-[148px]"
errorClassName={errorClassName}
isDisabled={isDisabled}
error={errors.message?.message}
{...register('message')}
/>

<div className="relative flex items-center justify-between gap-6 xl:gap-5 lg:gap-6 sm:flex-col sm:items-start sm:gap-5">
<p className="text-light text-sm leading-tight text-gray-new-70">
<p className="text-light text-sm leading-snug text-gray-new-70 xl:tracking-tighter">
By submitting you agree to the{' '}
<Link className="text-nowrap text-white" to={LINKS.terms} theme="white-underlined">
Terms Service
Expand All @@ -211,7 +211,7 @@ const ContactForm = () => {
.
</p>
<Button
className="min-w-[182px] py-[15px] font-medium xl:min-w-[160px] lg:min-w-[180px] sm:w-full sm:py-[13px]"
className="min-w-[176px] py-[15px] font-medium 2xl:text-base xl:min-w-[138px] lg:min-w-[180px] sm:w-full sm:py-[13px]"
type="submit"
theme="primary"
size="xs"
Expand Down
145 changes: 49 additions & 96 deletions src/components/pages/contact-sales/hero/hero.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import mindvalley from 'images/pages/contact-sales/mindvalley.svg';
import retool from 'images/pages/contact-sales/retool.svg';
import wordware from 'images/pages/contact-sales/wordware.svg';

import CaseStudies from './case-studies';
import ContactForm from './contact-form';

const CERTIFICATES = [
Expand Down Expand Up @@ -82,50 +83,55 @@ const CASE_STUDIES = [

const Hero = () => (
<section className="relative z-10 grow overflow-hidden bg-black-pure pb-36 pt-[136px] xl:py-32 lg:py-28 md:pb-20 md:pt-[100px]">
<Container className="xl:px-8 md:px-5" size="1152">
<div className="flex justify-between gap-[90px] xl:gap-8 lg:mx-auto lg:max-w-xl lg:flex-col lg:gap-14 sm:gap-10">
<div className="flex max-w-[480px] flex-1 flex-col pt-8 lg:max-w-full lg:items-center lg:pt-0 lg:text-center">
<Heading
className="relative w-fit font-title text-[68px] font-medium leading-none tracking-tight text-white xl:text-[56px] lg:text-[48px] md:text-[40px]"
tag="h1"
theme="white"
>
Let&apos;s Connect
<span
className={clsx(
'pointer-events-none absolute left-0 top-0 -z-10 size-[706px] translate-x-[-45%] translate-y-[-40%]',
'bg-[radial-gradient(50%_50%_at_50%_50%,rgba(30,41,62,.55),rgba(30,41,62,0))]',
'xl:size-[596px] lg:size-[596px] sm:size-[466px]'
)}
aria-hidden
/>
</Heading>
<p className="mt-4 text-pretty text-xl tracking-tight text-gray-new-80 lg:mt-3 lg:text-lg md:text-base">
We&apos;re happy to assist you with any questions about our technology, pricing plans,
custom contract options, and&nbsp;migrations assistance.
</p>
<ul className="mt-5 flex flex-col gap-3.5 lg:mt-[18px] lg:flex-row lg:justify-center lg:gap-8 md:flex-wrap md:gap-x-4 md:gap-y-2.5">
{CERTIFICATES.map(({ title, description, icon }) => (
<li className="flex items-center gap-4 lg:gap-2" key={title}>
<Image src={icon} alt={title} width={24} height={24} priority />
<p className="flex gap-2 text-lg leading-none tracking-tight text-gray-new-80 lg:text-base">
{title} <span className="text-gray-new-40">{description}</span>
</p>
</li>
))}
</ul>
<Link
className="mt-9 text-lg font-medium leading-none tracking-tight lg:mx-auto lg:mt-8 sm:mt-7 sm:text-base"
theme="green"
to="https://calendly.com/d/ckxx-b4h-69y/neon-solutions-engineering"
rel="noopener noreferrer"
target="_blank"
withArrow
>
Book a meeting directly
</Link>
<Container className="xl:max-w-5xl lg:max-w-3xl md:px-5" size="1216">
<div className="flex justify-between lg:mx-auto lg:max-w-xl lg:flex-col lg:gap-14">
<div className="flex max-w-xl flex-1 flex-col pt-8 xl:max-w-[448px] lg:max-w-full lg:items-center lg:pt-0 lg:text-center">
<div className="flex max-w-[544px] flex-col xl:max-w-sm lg:max-w-full lg:items-center">
<Heading
className="relative w-fit font-title text-[56px] font-medium leading-none tracking-tight text-white xl:text-[48px] lg:text-[40px]"
tag="h1"
theme="white"
>
Let&apos;s Connect
<span
className={clsx(
'pointer-events-none absolute left-0 top-0 -z-10 size-[706px] translate-x-[-45%] translate-y-[-40%] rounded-full',
'bg-[radial-gradient(50%_50%_at_50%_50%,rgba(30,41,62,.65),transparent)]',
'xl:size-[596px] lg:size-[596px] sm:size-[466px]'
)}
aria-hidden
/>
</Heading>
<p className="mt-4 text-pretty text-xl leading-snug tracking-tight text-gray-new-80 xl:text-lg xl:leading-normal lg:mt-3 md:text-base">
We&apos;re happy to assist you with any questions about our technology, pricing plans,
custom contract options, and&nbsp;migrations assistance.
</p>
<ul className="mt-5 flex flex-wrap gap-x-5 gap-y-3.5 xl:gap-x-[52px] lg:mt-[18px] lg:flex-row lg:justify-center lg:gap-8 lg:gap-x-5 md:flex-wrap md:gap-x-4 md:gap-y-2.5 sm:gap-x-4 sm:gap-y-2.5">
{CERTIFICATES.map(({ title, description, icon }) => (
<li className="flex items-center gap-2.5 sm:gap-1.5" key={title}>
<Image src={icon} alt={title} width={22} height={22} priority />
<p className="flex gap-1.5 leading-none tracking-tight text-gray-new-80 lg:text-base">
{title} <span className="text-gray-new-40">{description}</span>
</p>
</li>
))}
</ul>
<Link
className="mt-7 text-lg font-medium leading-none tracking-tight sm:text-base"
theme="green"
to="https://calendly.com/d/ckxx-b4h-69y/neon-solutions-engineering"
rel="noopener noreferrer"
target="_blank"
withArrow
>
Book a meeting directly
</Link>
</div>
<div className="mt-auto lg:mt-14">
<CaseStudies items={CASE_STUDIES} />
</div>
</div>
<div className="relative w-[582px] xl:w-[544px] lg:w-full">
<div className="relative max-w-xl shrink-0 xl:max-w-[512px] lg:max-w-full">
<ContactForm />
<span
className={clsx(
Expand All @@ -137,59 +143,6 @@ const Hero = () => (
/>
</div>
</div>
<ul className="mt-[88px] grid grid-cols-4 gap-8 xl:mt-20 xl:gap-5 lg:grid-cols-2 md:mt-20 sm:mt-16 sm:grid-cols-1">
{CASE_STUDIES.map(({ title, description, logo, link }, index) => (
<li
className={clsx(
'flex',
index === 0 && 'lg:-order-1',
index === 3 && 'lg:-order-1 sm:-order-2'
)}
key={title}
>
<Link
className="group relative h-44 w-full rounded-xl border border-gray-new-10 bg-[#0A0A0C] p-5 shadow-contact xl:h-[168px] xl:p-[18px] lg:h-[134px] md:h-32 md:p-4"
to={link}
>
<div className="relative z-10 flex h-full flex-col justify-between">
<p className="relative text-xl font-medium leading-snug tracking-tight text-white xl:text-lg">
{title}{' '}
<span
className="font-light text-gray-new-60 lg:block"
dangerouslySetInnerHTML={{ __html: description }}
/>
</p>
<Image
className="relative h-6 w-fit xl:h-5 sm:h-[18px]"
src={logo.src}
alt={logo.alt}
width={logo.width}
height={logo.height}
priority
/>
</div>
{index === 3 && (
<div
className={clsx(
'pointer-events-none absolute -inset-px rounded-[inherit] bg-[radial-gradient(85%_58%_at_70%_0%,rgba(14,23,27,.9),#151E2300)]',
'transition-opacity duration-300 group-hover:opacity-0',
'before:absolute before:inset-px before:rounded-[inherit] before:bg-[#0A0A0C] before:bg-[radial-gradient(100%_132%_at_63%_-27%,#0E171BE6,#0E171B00)]'
)}
aria-hidden
/>
)}
<div
className={clsx(
'pointer-events-none absolute -inset-px rounded-[inherit] bg-[linear-gradient(67deg,rgba(82,156,160,.14)_16%,rgba(82,156,160,.7))]',
'opacity-0 transition-opacity duration-300 group-hover:opacity-100',
'before:absolute before:inset-px before:rounded-[inherit] before:bg-[radial-gradient(75%_95%_at_84%_0%,rgba(24,62,65,.8),rgba(10,18,18,.9))]'
)}
aria-hidden
/>
</Link>
</li>
))}
</ul>
</Container>
</section>
);
Expand Down
9 changes: 9 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,14 @@ module.exports = {
opacity: 0,
},
},
slideIn: {
'0%': {
width: 0,
},
'100%': {
width: '100%',
},
},
dialogShow: {
'0%': {
opacity: 0,
Expand Down Expand Up @@ -347,6 +355,7 @@ module.exports = {
'text-blink': 'text-blink 0.4s cubic-bezier(0.4, 0, 0.2, 1)',
'fade-in-overlay': 'fadeInOverlay 0.2s',
'fade-out-overlay': 'fadeOutOverlay 0.2s',
'slide-in': 'slideIn 5s cubic-bezier(0.4, 0, 0.6, 1) forwards',
'dialog-show': 'dialogShow 0.3s cubic-bezier(.16,1,.3,1)',
'dialog-hide': 'dialogHide 0.3s cubic-bezier(.16,1,.3,1)',
'logo-move': 'logoMove 1s cubic-bezier(0.4, 0, 0.6, 1) infinite alternate',
Expand Down

0 comments on commit 83f8536

Please sign in to comment.