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.
Banner component is the hero section of the Hector Portfolio home page. It introduces Iwinser Sanchez with a profile photo, job title, a short description, and three social action buttons — GitHub, LinkedIn, and a CV download. The photo loads lazily and fades in once the browser has fully decoded the image, preventing a jarring layout shift.
Source File
src/components/Banner.jsx
Layout
The component renders a full-width<section> using the sectionbanner class. Inside, a Bootstrap flex row (d-flex justify-content-around align-items-center) places the profile image on the left and the text content on the right.
Profile Image — Lazy Load & Fade-in
The profile photo is stored as a.webp asset and imported at the top of the component:
useState hook tracks whether the image has finished loading:
<img> element uses the native loading="lazy" attribute so the browser defers the network request until the image is near the viewport. Once the browser fires the onLoad event, setImageLoaded(true) is called, which:
- Adds the
loadedclass to theimage-placeholderwrapper. - Transitions the image
opacityfrom0to1over 300 ms (ease-in-out).
While the image is loading, the
image-placeholder div holds its dimensions so the surrounding layout does not shift. The loaded class can be used in Banner.css to apply additional styles (e.g. a box-shadow reveal) once the image is ready.Social Buttons
Three action buttons are rendered inside thesocial-buttons container. Each is an <a> tag styled with the social-button class:
GitHub
Opens
Classes:
Attribute:
https://github.com/iwinser117 in a new tab.Classes:
social-button github smallAttribute:
target="_blank" rel="noopener noreferrer"Opens
Classes:
Attribute:
https://www.linkedin.com/in/iwinser-aljadys-sanchez-0a62a0234/?originalSubdomain=co in a new tab.Classes:
social-button linkedin smallAttribute:
target="_blank" rel="noopener noreferrer"CV Download
Triggers a file download of
Path:
Attribute:
IwinserSanchez.pdf.Path:
../assets/IwinserSanchez.pdfAttribute:
download="CurriculumDeveloperIwinserSanchez"i18n Keys
Text content is loaded throughreact-i18next. The English values (from src/locales/en.json) are:
"Iwinser Sanchez" is hardcoded directly in the JSX as an <h4> — it is not driven by an i18n key.
CSS — @styles/Banner.css
Key CSS classes used in the component:
| Class | Purpose |
|---|---|
sectionbanner | Full-width wrapper for the hero section |
iwinserPerfil | Container that constrains and positions the profile image |
image-placeholder | Reserves space while the image loads; receives loaded class on completion |
nametitle | Styles the <h4> name heading |
social-buttons | Flex container aligning the three action buttons in a row |
social-button | Base styles for each link button (border, padding, hover effect) |
github / linkedin / cv | Colour and brand-specific overrides for each button variant |
Customisation
Replace the profile photo
Swap
src/assets/iwinserPerfil.webp with your own .webp (or any browser-supported image format). Update the import path in Banner.jsx if you change the file name:Update social links
Edit the
href values directly in Banner.jsx. The GitHub, LinkedIn, and CV links are hardcoded strings — no environment variable or config file is involved.Dependencies
| Package | Usage |
|---|---|
mdb-react-ui-kit | MDBIcon is imported but icons are rendered via Font Awesome <i> tags directly |
react-i18next | useTranslation() hook for t() |
@buttons/DarkModeProvider | useDarkMode() — imported but not currently used to alter Banner output |