index.jsx 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import React from 'react';
  2. import projectList from './projectCardList.json';
  3. const Project = () => {
  4. return (
  5. <div className="w-full py-12 px-10 bg-blue-900">
  6. <div className="pb-5">
  7. <div className="text-white text-5xl font-semibold font-['Inter']">주요 랜드마크 프로젝트 시공현장</div>
  8. </div>
  9. {/* cardList */}
  10. <div className="grid grid-cols-4 gap-x-8 gap-y-10 mt-10">
  11. {projectList.map((project, index) => (
  12. <div className="relative overflow-hidden rounded-lg shadow-lg group">
  13. <img
  14. src={project.imageUrl}
  15. alt={project.title}
  16. className="w-full aspect-[4/3] object-cover"
  17. />
  18. <div className="">
  19. <h3 className='absolute z-10 left-6 top-[77%] group-hover:top-[30%] transition-all duration-500 ease-in-out text-lg text-white font-semibold'>
  20. {project.title}
  21. </h3>
  22. <div className="absolute z-10 left-6 top-[85%] text-xs text-white leading-7">MORE +</div>
  23. </div>
  24. <div className="absolute inset-0 bg-gradient-to-t from-black/80 opacity-0 group-hover:opacity-100 transition-opacity duration-300 ease-in-out flex flex-col justify-center">
  25. {project.description && (
  26. <div className="absolute left-6 right-6 top-[60%] group-hover:top-[40%] transition-all duration-500 ease-in-out">
  27. <p className="text-sm text-white leading-8 whitespace-pre-line">
  28. {project.description}
  29. </p>
  30. </div>
  31. )}
  32. </div>
  33. </div>
  34. ))}
  35. </div>
  36. </div>
  37. )
  38. }
  39. export default Project;