|
| 1 | +import React, { useEffect } from 'react'; |
| 2 | + |
| 3 | +import { observeHiddenElements } from './intersectionObserver'; |
| 4 | + |
| 5 | +const Projects = () => { |
| 6 | + useEffect(() => { |
| 7 | + const hiddenElements = document.querySelectorAll('.hiddenElem'); |
| 8 | + observeHiddenElements(hiddenElements); |
| 9 | + }); |
| 10 | + |
| 11 | + const projects = { |
| 12 | + first: { |
| 13 | + title: 'Rock, Paper, Scissors Game', |
| 14 | + description: |
| 15 | + 'Enjoy a fun solo challenge with this interactive hand game!', |
| 16 | + github: 'https://github.com/kerbethecoder/rock-paper-scissors', |
| 17 | + siteUrl: 'https://game-rps.vercel.app/', |
| 18 | + frameworks: { |
| 19 | + one: 'HTML', |
| 20 | + two: 'CSS', |
| 21 | + three: 'JavaScript', |
| 22 | + }, |
| 23 | + }, |
| 24 | + second: { |
| 25 | + title: 'Mock Landing Page', |
| 26 | + description: |
| 27 | + 'To showcase and refine my front-end web development skills, I created a simulated landing page for the popular streaming platform, Netflix.', |
| 28 | + github: 'https://github.com/kerbethecoder/netflix-react', |
| 29 | + siteUrl: 'https://mock-netflix-react.vercel.app/', |
| 30 | + frameworks: { |
| 31 | + one: 'React', |
| 32 | + two: 'Tailwind CSS', |
| 33 | + }, |
| 34 | + }, |
| 35 | + third: { |
| 36 | + title: 'The NotePad.', |
| 37 | + description: |
| 38 | + 'A website serving as a repository for essential web development tools, including font pairings, color combinations, and more.', |
| 39 | + github: 'https://github.com/kerbethecoder/the-notepad', |
| 40 | + siteUrl: 'https://the-notepad-by-kerbe.vercel.app/', |
| 41 | + frameworks: { |
| 42 | + one: 'NextJS', |
| 43 | + two: 'Tailwind CSS', |
| 44 | + }, |
| 45 | + }, |
| 46 | + fourth: { |
| 47 | + title: 'DevToolBox', |
| 48 | + description: |
| 49 | + 'A website with a curated collection of essential resources and tools to inspire and assist developers with their projects.', |
| 50 | + github: 'https://github.com/kerbethecoder/devtoolbox', |
| 51 | + siteUrl: 'https://kerbethecoder.github.io/devtoolbox/', |
| 52 | + frameworks: { |
| 53 | + one: 'Vue', |
| 54 | + two: 'Tailwind CSS', |
| 55 | + }, |
| 56 | + }, |
| 57 | + fifth: { |
| 58 | + title: 'ColorPicker', |
| 59 | + description: |
| 60 | + 'A tool to help you choose the perfect colors for your website.', |
| 61 | + github: 'https://github.com/kerbethecoder/color-picker', |
| 62 | + siteUrl: 'https://kerbethecoder.github.io/color-picker/', |
| 63 | + frameworks: { |
| 64 | + one: 'HTML', |
| 65 | + two: 'CSS', |
| 66 | + three: 'JavaScript', |
| 67 | + }, |
| 68 | + }, |
| 69 | + }; |
| 70 | + |
| 71 | + return ( |
| 72 | + <section className="flexCenter mb-20 flex-col lg:mb-96"> |
| 73 | + <div className="px-5 lg:w-6/12 lg:px-0"> |
| 74 | + <h2 className="hiddenElem font-secondaryFont text-lg font-bold lg:text-2xl"> |
| 75 | + Projects |
| 76 | + </h2> |
| 77 | + <p>Some of the projects on the internet I made so far:</p> |
| 78 | + <div className="grid grid-cols-1 gap-4 p-4 md:grid-cols-2 xl:grid-cols-3"> |
| 79 | + {Object.keys(projects).map((key, index) => ( |
| 80 | + <div |
| 81 | + key={index} |
| 82 | + className="hiddenElem flex flex-col justify-between gap-3 rounded border border-secondaryBg/30 p-5 font-inter hover:-translate-y-1" |
| 83 | + > |
| 84 | + <div className="flex flex-col space-y-3"> |
| 85 | + <div className="ml-auto space-x-3"> |
| 86 | + <a |
| 87 | + href={projects[key].github} |
| 88 | + target="_blank" |
| 89 | + rel="noopener noreferrer" |
| 90 | + className="w-fit text-secondaryBg/80 transition hover:text-secondaryBg/60" |
| 91 | + > |
| 92 | + <i class="fa-brands fa-github fa-lg"></i> |
| 93 | + </a> |
| 94 | + <a |
| 95 | + href={projects[key].siteUrl} |
| 96 | + target="_blank" |
| 97 | + rel="noopener noreferrer" |
| 98 | + className="w-fit text-secondaryBg/80 duration-300 hover:text-secondaryBg/55" |
| 99 | + > |
| 100 | + <i class="fa-solid fa-arrow-up-right-from-square fa-lg"></i> |
| 101 | + </a> |
| 102 | + </div> |
| 103 | + <span className="text-xl font-bold leading-none tracking-tight"> |
| 104 | + {projects[key].title} |
| 105 | + </span> |
| 106 | + <p className="text-sm text-secondaryBg/80"> |
| 107 | + {projects[key].description} |
| 108 | + </p> |
| 109 | + </div> |
| 110 | + <div className="mt-5 space-x-2"> |
| 111 | + {Object.values(projects[key].frameworks).map( |
| 112 | + (framework, index) => ( |
| 113 | + <span |
| 114 | + className="text-xs font-bold text-secondaryBg/50" |
| 115 | + key={index} |
| 116 | + > |
| 117 | + {framework} |
| 118 | + </span> |
| 119 | + ) |
| 120 | + )} |
| 121 | + </div> |
| 122 | + </div> |
| 123 | + ))} |
| 124 | + </div> |
| 125 | + </div> |
| 126 | + </section> |
| 127 | + ); |
| 128 | +}; |
| 129 | + |
| 130 | +export default Projects; |
0 commit comments