diff --git a/public/images/wireframe_kit.png b/public/images/wireframe_kit.png new file mode 100644 index 0000000..8993104 Binary files /dev/null and b/public/images/wireframe_kit.png differ diff --git a/src/components/ProductGrid.jsx b/src/components/ProductGrid.jsx index bf18636..2fe1783 100644 --- a/src/components/ProductGrid.jsx +++ b/src/components/ProductGrid.jsx @@ -6,11 +6,12 @@ import '../styles/variables.css'; gsap.registerPlugin(ScrollTrigger); -const products = [ - { id: 1, name: 'Portfolio V1', desc: 'Web Design', price: '2023' }, - { id: 2, name: 'Neon Dreams', desc: 'WebGL Experience', price: '2024' }, - { id: 3, name: 'Type Lab', desc: 'Typography Tool', price: '2024' }, - { id: 4, name: 'Audio Vis', desc: 'Sound Reactive', price: '2023' }, + + +const REPO_LIST = [ + 'MatissJurevics/Gene-AI', + 'MatissJurevics/movesync', + 'MatissJurevics/script-server', ]; const ProductGrid = () => { @@ -18,8 +19,63 @@ const ProductGrid = () => { const titleRef = useRef(null); const itemRefs = useRef([]); const [selectedProject, setSelectedProject] = useState(null); + const [products, setProducts] = useState([]); useEffect(() => { + const fetchRepos = async () => { + const promises = REPO_LIST.map(async (repoName, index) => { + try { + const res = await fetch(`https://api.github.com/repos/${repoName}`); + if (!res.ok) throw new Error('Fetch failed'); + const data = await res.json(); + return { + id: index + 1, + name: data.name, + desc: data.description || data.language || 'No description', + price: `★ ${data.stargazers_count}`, + language: data.language, + url: data.html_url, + raw: data + }; + } catch (e) { + console.warn(`Failed to load ${repoName}`, e); + // Fallback or skip + return { + id: index + 1, + name: repoName.split('/')[1], + desc: 'Loading Error', + price: 'NT', + url: '#' + }; + } + }); + + const results = await Promise.all(promises); + + // Add Manual Gumroad Project + const manualProject = { + id: 'wireframe', // unique string ID to avoid collision + name: 'Wireframe UI Kit', + desc: 'Web Design Resource', + price: '$29', + url: 'https://saetom.gumroad.com/l/WireframeUIKit', + image: '/images/wireframe_kit.png', + details: ` + A comprehensive Wireframe UI Kit designed to speed up your prototyping workflow. + Includes over 100+ customizable components, varying layouts, and responsive patterns. + Perfect for designers and developers looking to create high-fidelity wireframes quickly. + ` + }; + + setProducts([manualProject, ...results]); + }; + + fetchRepos(); + }, []); + + useEffect(() => { + if (!products.length) return; // Wait for data + const ctx = gsap.context(() => { // Animate Title gsap.from(titleRef.current, { @@ -52,7 +108,7 @@ const ProductGrid = () => { }, gridRef); return () => ctx.revert(); - }, []); + }, [products]); const onEnter = ({ currentTarget }) => { gsap.to(currentTarget, { backgroundColor: '#fff', scale: 0.98, duration: 0.3 }); @@ -114,7 +170,9 @@ const ProductGrid = () => { onClick={() => setSelectedProject(p)} >
- 0{p.id} + + {typeof p.id === 'number' ? `0${p.id}` : 'NEW'} +
{ }}>
- {/* Placeholder for Product Image */} + {/* Product Image or Placeholder */}
- MJ + {p.image ? ( + {p.name} + ) : ( + p.name.substring(0, 10) + )}
-

{p.name}

+

{p.name}

- {p.desc} + {p.desc} {p.price}
diff --git a/src/components/ProjectModal.jsx b/src/components/ProjectModal.jsx index 4636ed1..ff5a2ee 100644 --- a/src/components/ProjectModal.jsx +++ b/src/components/ProjectModal.jsx @@ -102,9 +102,16 @@ const ProjectModal = ({ project, onClose }) => { display: 'flex', alignItems: 'center', justifyContent: 'center', - borderRight: '1px solid #ccc' + borderRight: '1px solid #ccc', + overflow: 'hidden' }}> -

MJ

+ {project.image ? ( + {project.name} + ) : ( +

+ {project.name ? project.name.substring(0, 2).toUpperCase() : 'MJ'} +

+ )} {/* Right: Info */} @@ -118,23 +125,18 @@ const ProjectModal = ({ project, onClose }) => { }}>
- {project.price} {/* Using 'price' for Year based on previous data struct */} + {project.price}

{project.name}

- This is a detailed description of the {project.name} project. - It explores the intersection of design and technology, - focusing on user experience and visual impact. + {project.details || project.desc || "No details available."}

-

Role

-

Design, Development

-
-

Tech Stack

-

React, Three.js, GSAP

+

Type

+

{project.language || 'Design / Resource'}

@@ -152,6 +154,7 @@ const ProjectModal = ({ project, onClose }) => { }} onMouseEnter={(e) => e.target.style.background = '#ff4d00'} onMouseLeave={(e) => e.target.style.background = '#000'} + onClick={() => window.open(project.url, '_blank')} > View Live