|
| 1 | +//import Button |
| 2 | +import ActionButton from "../shared/ActionButton"; |
| 3 | +//import motion |
| 4 | +import { motion } from "framer-motion"; |
| 5 | +//import Icon |
| 6 | +import { |
| 7 | + HomeModernIcon, |
| 8 | + UserGroupIcon, |
| 9 | + AcademicCapIcon, |
| 10 | +} from "@heroicons/react/24/solid"; |
| 11 | +//import Image |
| 12 | +import BenefitsPageGraphic from "@/assets/BenefitsPageGraphic.png"; |
| 13 | +//import Array of Benefits |
| 14 | +import BenefitsJson from "../BenefitsJson"; |
| 15 | +//import Types |
| 16 | +import { BenefitsType } from "@/Utils/BenefitsType"; |
| 17 | +import { CurrentPage } from "@/Utils/CurrentPage"; |
| 18 | + |
| 19 | +const BenefitsDetail: Array<BenefitsType> = [ |
| 20 | + { |
| 21 | + id: 0, |
| 22 | + icon: <HomeModernIcon className="w-6 h-6" />, |
| 23 | + title: "State of the Art Facilities", |
| 24 | + description: |
| 25 | + "Neque adipiscing amet amet enim. Feugiat dolor enim fermentum in a in lectus pellentesque. Ullamcorper et.", |
| 26 | + }, |
| 27 | + { |
| 28 | + id: 1, |
| 29 | + icon: <UserGroupIcon className="w-6 h-6" />, |
| 30 | + title: "100's of Diverse Classes", |
| 31 | + description: |
| 32 | + "Eu ipsum id egestas risus tempus enim semper felis quis. Nec consectetur ac venenatis facilisi est. Eget ac turpis id.", |
| 33 | + }, |
| 34 | + { |
| 35 | + id: 2, |
| 36 | + icon: <AcademicCapIcon className="w-6 h-6" />, |
| 37 | + title: "Expert and Pro Trainers", |
| 38 | + description: |
| 39 | + "Fusce vestibulum aliquam ut cras. Nisl lectus egestas sapien nisl. Lacus at mi sit pellentesque. Congue parturient.", |
| 40 | + }, |
| 41 | +]; |
| 42 | + |
| 43 | +type Props = { |
| 44 | + setCurrentPage: (value: CurrentPage) => void; |
| 45 | +}; |
| 46 | + |
| 47 | +const container = { |
| 48 | + hidden: {}, |
| 49 | + visible: { |
| 50 | + transition: { staggerChildren: 0.2 }, |
| 51 | + }, |
| 52 | +}; |
| 53 | + |
| 54 | +function Benefits({ setCurrentPage }: Props) { |
| 55 | + return ( |
| 56 | + <motion.div |
| 57 | + id="benefits" |
| 58 | + className="w-full mt-1=5 min-h-full py-20 " |
| 59 | + onViewportEnter={() => setCurrentPage(CurrentPage.Benefits)} |
| 60 | + > |
| 61 | + <div className="w-5/6 mx-auto "> |
| 62 | + {/* Text Part */} |
| 63 | + <motion.div |
| 64 | + className="flex flex-col gap-4 md:w-3/5 mb-5" |
| 65 | + initial="hidden" |
| 66 | + whileInView="visible" |
| 67 | + viewport={{ once: true, amount: 0.5 }} |
| 68 | + transition={{ duration: 0.5 }} |
| 69 | + variants={{ |
| 70 | + hidden: { opacity: 0, x: -50 }, |
| 71 | + visible: { opacity: 1, x: 0 }, |
| 72 | + }} |
| 73 | + > |
| 74 | + <h1 className="text-3xl font-bold font-montserrat basis-3/5"> |
| 75 | + MORE THAN JUST GYM. |
| 76 | + </h1> |
| 77 | + <p className="text-sm"> |
| 78 | + We provide world class fitness equipment, trainers and classes to |
| 79 | + get you to your ultimate fitness goals with ease. We provide true |
| 80 | + care into each and every member. |
| 81 | + </p> |
| 82 | + </motion.div> |
| 83 | + {/* Boxs Part */} |
| 84 | + <motion.div |
| 85 | + className="flex flex-col md:flex-row justify-between gap-4 " |
| 86 | + initial="hidden" |
| 87 | + whileInView="visible" |
| 88 | + viewport={{ once: true, amount: 0.5 }} |
| 89 | + variants={container} |
| 90 | + > |
| 91 | + {BenefitsDetail.map((item: BenefitsType) => ( |
| 92 | + <BenefitsJson |
| 93 | + key={item.id} |
| 94 | + icon={item.icon} |
| 95 | + title={item.title} |
| 96 | + description={item.description} |
| 97 | + setCurrentPage={setCurrentPage} |
| 98 | + /> |
| 99 | + ))} |
| 100 | + </motion.div> |
| 101 | + {/* Image & Text Part */} |
| 102 | + <div className="flex flex-col md:flex-row mt-20"> |
| 103 | + <motion.figure |
| 104 | + className="flex justify-center items-center md:block" |
| 105 | + initial = "hidden" |
| 106 | + whileInView="visible" |
| 107 | + viewport={{once : true , amount : 0.5}} |
| 108 | + transition={{duration : .5}} |
| 109 | + variants={{ |
| 110 | + hidden : {opacity : 0 , x:-50}, |
| 111 | + visible : {opacity : 1 , x:0} |
| 112 | + }} |
| 113 | + > |
| 114 | + <img src={BenefitsPageGraphic} alt="BenefitsPageGraphic" /> |
| 115 | + </motion.figure> |
| 116 | + <motion.div className="basis-3/5 flex flex-col items-start justify-center gap-8 " |
| 117 | + initial = "hidden" |
| 118 | + whileInView="visible" |
| 119 | + viewport={{once : true , amount : 0.5}} |
| 120 | + transition={{duration : .5}} |
| 121 | + variants={{ |
| 122 | + hidden : {opacity : 0 , x:100}, |
| 123 | + visible : {opacity : 1 , x:0} |
| 124 | + }} |
| 125 | + > |
| 126 | + <h2 className=" relative font-montserrat text-3xl font-bold before:content-abstractwaves before:absolute before:-top-20 before:-left-10 "> |
| 127 | + MILLIONS OF HAPPY MEMBERS GETTING{" "} |
| 128 | + <span className="text-primary-500">FIT</span> |
| 129 | + </h2> |
| 130 | + <div className="flex flex-col gap-5 before:content-sparkles relative before:absolute before:-bottom-40 before:right-8 z-10 before:z-0"> |
| 131 | + <p> |
| 132 | + Nascetur aenean massa auctor tincidunt. Iaculis potenti amet |
| 133 | + egestas ultrices consectetur adipiscing ultricies enim. Pulvinar |
| 134 | + fames vitae vitae quis. Quis amet vulputate tincidunt at in |
| 135 | + nulla nec. Consequat sed facilisis dui sit egestas ultrices |
| 136 | + tellus. Ullamcorper arcu id pretium sapien proin integer nisl. |
| 137 | + Felis orci diam odio. |
| 138 | + </p> |
| 139 | + <p> |
| 140 | + Fringilla a sed at suspendisse ut enim volutpat. Rhoncus vel est |
| 141 | + tellus quam porttitor. Mauris velit euismod elementum arcu neque |
| 142 | + facilisi. Amet semper tortor facilisis metus nibh. Rhoncus sit |
| 143 | + enim mattis odio in risus nunc. |
| 144 | + </p> |
| 145 | + </div> |
| 146 | + <ActionButton |
| 147 | + target={CurrentPage.ContactUs} |
| 148 | + content="Join Now" |
| 149 | + setCurrentPage={setCurrentPage} |
| 150 | + /> |
| 151 | + </motion.div> |
| 152 | + </div> |
| 153 | + </div> |
| 154 | + </motion.div> |
| 155 | + ); |
| 156 | +} |
| 157 | + |
| 158 | +export default Benefits; |
0 commit comments