TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/iwinser117/react-portafolio/llms.txt
Use this file to discover all available pages before exploring further.
Certifications component (source name: Certificados) presents Iwinser Sanchez’s professional certifications in two switchable layouts — a Material UI alternating timeline and a responsive card grid. A toggle button switches between the two views at runtime. Clicking the “Ver Certificado” button on any entry invokes a utility function that opens the corresponding diploma image in a full-screen modal overlay.
Source File
src/components/Certifications.jsx
View Modes
The component maintains aviewMode state string that controls which layout is rendered:
viewMode value | Layout | Default |
|---|---|---|
"timeline" | MUI alternating <Timeline> | ✅ Yes |
"cards" | CSS grid of <div className="card"> elements | No |
fa-table-cells-large) when in timeline mode (to suggest switching to cards) and a timeline icon (fa-timeline) when in cards mode:
MUI Components
The timeline view uses the following components imported from@mui/lab:
Timeline
Root container. Rendered with
position="alternate" so items alternate left and right.TimelineItem
Wraps each certification entry. Keyed by
cert.id.TimelineSeparator
Holds the
TimelineDot and (when not the last item) a TimelineConnector vertical line.TimelineDot
The coloured dot on the axis. Rendered with
color="primary".TimelineConnector
Vertical line between dots. Omitted for the last item:
{cert.id < certificados.length - 1 && <TimelineConnector />}TimelineContent
The text block (title, institution, button) beside each dot.
Certification Data
Thecertificados array is defined directly inside the component. Each object has four fields: id, title, institucion, and fecha.
| id | Title | Institution | Date |
|---|---|---|---|
| 0 | Diplomado en Desarrollo de Software | MisionTic2022 | 2022-01 |
| 1 | Diplomado en Desarrollo de Aplicaciones Web | MisionTic2022 | 2022-03 |
| 2 | Diplomado en Programación Básica Lenguaje Java | MisionTic2022 | 2022-05 |
| 3 | Diplomado Fundamentos de Programación en Python | MisionTic2022 | 2022-07 |
| 4 | Full Stack Developer con JavaScript | Platzi | 2022-09 |
| 5 | FrontEnd Developer con React | Platzi | 2022-11 |
| 6 | Curso práctico de React.js | Platzi | 2023-01 |
The
fecha field is rendered in the cards view but is commented out in the timeline view ({/* <p className="fecha">{cert.fecha}</p> */}). To re-enable it in the timeline, remove the comment delimiters around that line in Certifications.jsx.Timeline View — Full JSX
Cards View — Full JSX
Diploma Modal
Clicking the “Ver Certificado” button callsmostrarDiploma(cert.id), imported from src/utils/modalDiploma.js:
modalDiploma.js:
mostrarDiploma(id) uses the numeric id to look up the correct diploma image and sets it as the src of #modalImage, then makes #diplomaModal visible. The × close button hides the modal again.
CSS — @styles/Certificados.css
Styles for the certifications section live in src/styles/Certificados.css:
| Class | Purpose |
|---|---|
certificados-container | Outer wrapper for the entire component |
view-toggle-container | Positions the view-switch button |
view-toggle-btn | Styles the toggle button (icon + label) |
timeline-content | Card-like box wrapping each timeline entry’s text |
title | Bold certification title text |
institucion | Institution name with trophy icon |
fecha | Date string (visible in cards view; hidden in timeline view) |
cards-container | CSS grid or flex wrapper for the card grid layout |
card / card-content | Individual certification card box |
view-link | ”Ver Certificado” button styling |
modal | Full-screen overlay for diploma images |
modal-content | The <img> element inside the modal |
close | The × dismiss button |
Adding a New Certification
Add an entry to the array
Open
src/components/Certifications.jsx and append a new object to the certificados array. Use the next sequential integer as the id:Add the diploma image
Place the diploma image in the assets directory used by
src/utils/modalDiploma.js and register it in that utility’s lookup — consult modalDiploma.js for the exact import pattern and array/object structure it uses.Dependencies
| Package | Usage |
|---|---|
@mui/lab | Timeline, TimelineItem, TimelineSeparator, TimelineConnector, TimelineContent, TimelineDot |
src/utils/modalDiploma.js | mostrarDiploma(id) — opens diploma image in #diplomaModal |
| Font Awesome (CDN/CSS) | fa-solid fa-trophy, fa-solid fa-magnifying-glass, fa-solid fa-table-cells-large, fa-solid fa-timeline |