|
| 1 | +import Image from 'next/image'; |
| 2 | +import { motion, useAnimationControls } from "framer-motion" |
| 3 | +import { useEffect } from 'react'; |
| 4 | + |
| 5 | +const Stats = () => { |
| 6 | + const r = 80; |
| 7 | + const controls = useAnimationControls() |
| 8 | + |
| 9 | + const progress = { |
| 10 | + hidden: { pathLength: 0, opacity: 0 }, |
| 11 | + visible: { |
| 12 | + pathLength: 0.7, |
| 13 | + opacity: 1, |
| 14 | + transition: { |
| 15 | + pathLength: { type: "spring", duration: 1.5, bounce: 0 }, |
| 16 | + opacity: { duration: 0.05 } |
| 17 | + } |
| 18 | + } |
| 19 | + } |
| 20 | + |
| 21 | + useEffect(() => { |
| 22 | + controls.start("hidden") |
| 23 | + controls.start("visible") |
| 24 | + controls.stop(); |
| 25 | + }, []); |
| 26 | + |
| 27 | + const revert = async() => { |
| 28 | + await controls.start("hidden") |
| 29 | + return await controls.start("visible") |
| 30 | + } |
| 31 | + |
| 32 | + return ( |
| 33 | + <div className="w-full"> |
| 34 | + <div className="flex flex-col justify-center align-middle items-center relative grow w-full py-12"> |
| 35 | + <Image className="z-10" src="/assets/csesoc_icon.svg" alt="CSESoc Icon" width={150} height={150} /> |
| 36 | + <motion.svg |
| 37 | + className="absolute" width={200} height={200} |
| 38 | + style={{transform: "rotate(270deg)", top: "1.4rem"}} |
| 39 | + initial="hidden" |
| 40 | + animate={controls} |
| 41 | + > |
| 42 | + <motion.circle |
| 43 | + r={r} |
| 44 | + cx={100} |
| 45 | + cy={100} |
| 46 | + fill="transparent" |
| 47 | + stroke="#444F6F" |
| 48 | + strokeWidth={"0.75rem"} |
| 49 | + strokeLinecap="round" |
| 50 | + /> |
| 51 | + <motion.circle |
| 52 | + r={r} |
| 53 | + cx={100} |
| 54 | + cy={100} |
| 55 | + fill="transparent" |
| 56 | + stroke="rgb(248 250 252)" |
| 57 | + strokeWidth={"0.75rem"} |
| 58 | + strokeLinecap="round" |
| 59 | + variants={progress} |
| 60 | + /> |
| 61 | + </motion.svg> |
| 62 | + <h2 className="mt-10 text-3xl font-extrabold">CSESoc</h2> |
| 63 | + <p className="text-[#727B8C] font-medium">unsw-computer-science-engineering-society</p> |
| 64 | + <div className="mt-14 mb-2 flex gap-2 flex-1 grow w-full"> |
| 65 | + <div className="flex flex-col flex-1 gap-0 bg-slate-50 px-3 py-1 rounded-md text-right hover:cursor-pointer" |
| 66 | + onClick={() => {revert()}}> |
| 67 | + <Image className='ml-auto pb-1' src="/assets/people_icon.svg" alt="People" width={20} height={20} /> |
| 68 | + <span className="text-[#727B8C] text-6xl leading-3 py-4 pb-6">433</span> |
| 69 | + <span className="text-[#727B8C] text-sm py-1 ">total members</span> |
| 70 | + </div> |
| 71 | + <div className="group flex flex-col flex-1 gap-0 bg-[#444F6F] hover:bg-slate-50 px-3 py-1 rounded-md text-right hover:cursor-pointer transition-all hover:text-[#444F6F]" |
| 72 | + onClick={() => {revert()}}> |
| 73 | + <Image className='text-white group-hover:text-[#727B8C] ml-auto pb-1' src="/assets/people_icon.svg" alt="People" width={20} height={20} /> |
| 74 | + <span className="text-[#ffffff] text-6xl leading-3 py-4 pb-6 group-hover:text-[#727B8C]">53</span> |
| 75 | + <span className="text-[#ffffff] text-sm py-1 group-hover:text-[#727B8C]">events held</span> |
| 76 | + </div> |
| 77 | + <div className="flex flex-col flex-1 gap-0 bg-[#444F6F] px-3 py-1 rounded-md text-right hover:cursor-pointer" |
| 78 | + onClick={() => {revert()}}> |
| 79 | + <Image className='text-white ml-auto pb-1' src="/assets/people_icon.svg" alt="People" width={20} height={20} /> |
| 80 | + <span className="text-[#ffffff] text-6xl leading-3 py-4 pb-6">343</span> |
| 81 | + <span className="text-[#ffffff] text-sm py-1 ">subcom</span> |
| 82 | + </div> |
| 83 | + <div className="flex flex-col flex-1 gap-0 bg-[#444F6F] px-3 py-1 rounded-md text-right hover:cursor-pointer" |
| 84 | + onClick={() => {revert()}}> |
| 85 | + <Image className='text-white ml-auto pb-1' src="/assets/people_icon.svg" alt="People" width={20} height={20} /> |
| 86 | + <span className="text-[#ffffff] text-6xl leading-3 py-4 pb-6">343</span> |
| 87 | + <span className="text-[#ffffff] text-sm py-1 ">subcom</span> |
| 88 | + </div> |
| 89 | +{/* <div className="flex flex-1 gap-0 bg-[#444F6F] px-3 py-1 rounded-md text-right"> |
| 90 | + <span className="text-[#ffffff] text-6xl leading-3 py-4 pb-6">53</span> |
| 91 | + <div className="flex flex-col text-left"> |
| 92 | + <Image className='text-white pb-1' src="/assets/people_icon.svg" alt="People" width={20} height={20} /> |
| 93 | + <span className="text-[#ffffff] text-sm py-1 ">held</span> |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + <div className="flex gap-2 bg-slate-50 px-3 py-1 rounded-md"> |
| 97 | + <Image src="/assets/people_icon.svg" alt="People" width={20} height={20} /> |
| 98 | + <span className="text-[#727B8C]">300 subcom</span> |
| 99 | + </div> |
| 100 | + <div className="flex gap-2 bg-slate-50 px-3 py-1 rounded-md"> |
| 101 | + <Image src="/assets/people_icon.svg" alt="People" width={20} height={20} /> |
| 102 | + <span className="text-[#727B8C]">52 events held</span> |
| 103 | + </div>*/} |
| 104 | + </div> |
| 105 | +{/* <div className="flex flex-1 gap-0 bg-[#444F6F] px-3 py-1 rounded-md text-right"> |
| 106 | + <div> |
| 107 | + <Image className="z-10" src="/assets/csesoc_icon.svg" alt="CSESoc Icon" width={150} height={150} /> |
| 108 | + </div> |
| 109 | + <div className="flex flex-col"> |
| 110 | + <Image className='text-white ml-auto pb-1' src="/assets/people_icon.svg" alt="People" width={20} height={20} /> |
| 111 | + <span className="text-[#ffffff] text-6xl leading-3 py-4 pb-6">53</span> |
| 112 | + <span className="text-[#ffffff] text-sm py-1 ">events held</span> |
| 113 | + </div> |
| 114 | +
|
| 115 | + </div>*/} |
| 116 | +{/* <div className="my-4 flex gap-5"> |
| 117 | + <Image src="/assets/location_icon.svg" alt="Location" width={20} height={20} /> |
| 118 | + Sydney, Australia |
| 119 | + </div> |
| 120 | + <div className="flex gap-5"> |
| 121 | + <Image src="/assets/mail_icon.svg" alt="Mail" width={20} height={20} /> |
| 122 | + |
| 123 | + </div> |
| 124 | +
|
| 125 | + <div className="w-72 font-semibold text-xl lg:block hidden"> |
| 126 | + <p className="font-bold bg-[#3977F8] inline px-3 py-1">STATS</p> |
| 127 | + <hr className="mb-3 mt-5" /> |
| 128 | + <div className="flex justify-between"> |
| 129 | + <p>323,000</p> |
| 130 | + <p>Members</p> |
| 131 | + </div> |
| 132 | + <div className="flex justify-between"> |
| 133 | + <p>300</p> |
| 134 | + <p>Team Members</p> |
| 135 | + </div> |
| 136 | + <div className="flex justify-between"> |
| 137 | + <p>52</p> |
| 138 | + <p>Events held</p> |
| 139 | + </div> |
| 140 | + </div>*/} |
| 141 | + |
| 142 | + </div> |
| 143 | + <div className="flex flex-col pb-14"> |
| 144 | + <div className="flex flex-col"> |
| 145 | + <div className="flex text-left"> |
| 146 | + <Image className='pb-1 ml-5' src="/assets/people_icon.svg" alt="People" width={20} height={20} /> |
| 147 | + <span className="ml-3">CSESoc is the principal representative body for UNSW computing students.</span> |
| 148 | + </div> |
| 149 | + <div className="my-4 flex"> |
| 150 | + <Image className="ml-5" src="/assets/location_icon.svg" alt="Location" width={17} height={17} /> |
| 151 | + <span className="ml-4">Sydney, Australia</span> |
| 152 | + </div> |
| 153 | + <div className="flex"> |
| 154 | + <Image className="ml-5" src="/assets/mail_icon.svg" alt="Mail" width={17} height={17} /> |
| 155 | + <span className="ml-4">[email protected]</span> |
| 156 | + </div> |
| 157 | + </div> |
| 158 | + </div> |
| 159 | + |
| 160 | + <div className="flex flex-col gap-4"> |
| 161 | + <div className="flex px-6 pt-4 pb-6 bg-[#444f6f38] rounded-md w-full justify-between align-baseline"> |
| 162 | + <div className="flex flex-col"> |
| 163 | + <p className="text-3xl mt-6 justify-end" style={{paddingLeft: "0px"}}> |
| 164 | + csesoc/README<span className="text-[#7A8192]">.md</span> |
| 165 | + </p> |
| 166 | + <p className="mt-10 mb-5 max-w-lg text-[#afb3bc]"> |
| 167 | + 1   <span style={{paddingLeft: "2px"}}>CSESoc is one of the biggest and most active societies at</span><br/> |
| 168 | + 2   UNSW, catering to over 3500 CSE students spanning across<br/> |
| 169 | + 3   degrees in Computer Science, Software Engineering,<br/> |
| 170 | + 4   Bioinformatics and Computer Engineering. |
| 171 | + <br/><br/> |
| 172 | + 5   We are here to fulfil the social, personal and professional<br/> |
| 173 | + 6   needs of CSE students, and promote computing through a<br/> |
| 174 | + 7   variety of forms. |
| 175 | + </p> |
| 176 | + </div> |
| 177 | + <div> |
| 178 | + <svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" className="bi bi-markdown-fill" viewBox="0 0 16 16"> |
| 179 | + <path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm11.5 1a.5.5 0 0 0-.5.5v3.793L9.854 8.146a.5.5 0 1 0-.708.708l2 2a.5.5 0 0 0 .708 0l2-2a.5.5 0 0 0-.708-.708L12 9.293V5.5a.5.5 0 0 0-.5-.5M3.56 7.01h.056l1.428 3.239h.774l1.42-3.24h.056V11h1.073V5.001h-1.2l-1.71 3.894h-.039l-1.71-3.894H2.5V11h1.06z"/> |
| 180 | + </svg> |
| 181 | + </div> |
| 182 | + </div> |
| 183 | + <div className="flex px-6 pt-4 pb-6 bg-[#444f6f38] rounded-md w-full justify-between align-baseline"> |
| 184 | + <div className="flex flex-col"> |
| 185 | + <p className="text-3xl mt-6 justify-end" style={{paddingLeft: "0px"}}> |
| 186 | + execs-directors-subcoms<span className="text-[#7A8192]">.md</span> |
| 187 | + </p> |
| 188 | + <p className="mt-10 mb-5 max-w-lg text-[#afb3bc]"> |
| 189 | + 1   <span style={{paddingLeft: "2px"}}>100+ events (35+ careers related revents)</span><br/> |
| 190 | + 2   41 sponsors<br/> |
| 191 | + 3   480 000 discord messages<br/> |
| 192 | + 4   200+ volunteers.<br/> |
| 193 | + 5   Tiktok: 27.2k views, 2k+ likes<br/> |
| 194 | + 6   Podcast: 10k downloads, 600+ average viewers<br/> |
| 195 | + 7   500+ high school students reached. |
| 196 | + </p> |
| 197 | + </div> |
| 198 | + <div> |
| 199 | + <svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" fill="currentColor" className="bi bi-markdown-fill" viewBox="0 0 16 16"> |
| 200 | + <path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2zm11.5 1a.5.5 0 0 0-.5.5v3.793L9.854 8.146a.5.5 0 1 0-.708.708l2 2a.5.5 0 0 0 .708 0l2-2a.5.5 0 0 0-.708-.708L12 9.293V5.5a.5.5 0 0 0-.5-.5M3.56 7.01h.056l1.428 3.239h.774l1.42-3.24h.056V11h1.073V5.001h-1.2l-1.71 3.894h-.039l-1.71-3.894H2.5V11h1.06z"/> |
| 201 | + </svg> |
| 202 | + </div> |
| 203 | + </div> |
| 204 | + </div> |
| 205 | + </div> |
| 206 | + ); |
| 207 | +}; |
| 208 | + |
| 209 | +export default Stats; |
0 commit comments