Série: vibe coding
javascript
62 lignes
· Mis à jour 2026-04-26
Home.jsx
vibe_coding/src/pages/Home.jsx
import { Link } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import projects from '../data/projects.js';
import ProjectCard from '../components/ProjectCard.jsx';
export default function Home() {
const { t } = useTranslation();
const featured = projects.filter((p) => p.featured).slice(0, 2);
const taglineSecondary = t('brand.taglineSecondary');
return (
<>
<section className="hero">
<div className="hero__bg" aria-hidden="true" />
<div className="hero__content">
<p className="hero__tag">Madrid · {new Date().getFullYear()}</p>
<h1 className="hero__title">{t('brand.tagline')}</h1>
<p className="hero__subtitle">{t('home.subtitle')}</p>
{taglineSecondary && <p className="hero__zh">{taglineSecondary}</p>}
<Link to="/proyectos" className="btn hero__cta">
{t('home.ctaProjects')}
</Link>
</div>
</section>
<section className="section philosophy">
<div className="container--narrow">
<span className="eyebrow">{t('home.philosophyTitle')}</span>
<div className="philosophy__lines">
<p>{t('home.philosophy.p1')}</p>
<p>{t('home.philosophy.p2')}</p>
<p>{t('home.philosophy.p3')}</p>
</div>
</div>
</section>
<section className="section">
<div className="container">
<div className="featured__head">
<div>
<span className="eyebrow">{t('nav.projects')}</span>
<h2>{t('home.featuredTitle')}</h2>
</div>
<p>{t('home.featuredSubtitle')}</p>
</div>
<div className="grid">
{featured.map((p) => (
<ProjectCard key={p.slug} project={p} />
))}
</div>
<div className="center-cta">
<Link to="/proyectos" className="btn">
{t('home.viewAll')}
</Link>
</div>
</div>
</section>
</>
);
}
Articles liés
vibe coding
javascript
Mis à jour 2026-04-26
App.jsx
App.jsx — javascript source code from the vibe coding learning materials (vibe_coding/src/App.jsx).
Lire l'article →
vibe coding
javascript
Mis à jour 2026-04-26
Footer.jsx
Footer.jsx — javascript source code from the vibe coding learning materials (vibe_coding/src/components/Footer.jsx).
Lire l'article →
vibe coding
javascript
Mis à jour 2026-04-26
LanguageSwitcher.jsx
LanguageSwitcher.jsx — javascript source code from the vibe coding learning materials (vibe_coding/src/components/LanguageSwitcher.jsx).
Lire l'article →
vibe coding
javascript
Mis à jour 2026-04-26
Navbar.jsx
Navbar.jsx — javascript source code from the vibe coding learning materials (vibe_coding/src/components/Navbar.jsx).
Lire l'article →
vibe coding
javascript
Mis à jour 2026-04-26
ProjectCard.jsx
ProjectCard.jsx — javascript source code from the vibe coding learning materials (vibe_coding/src/components/ProjectCard.jsx).
Lire l'article →
vibe coding
javascript
Mis à jour 2026-04-26
ScrollToTop.jsx
ScrollToTop.jsx — javascript source code from the vibe coding learning materials (vibe_coding/src/components/ScrollToTop.jsx).
Lire l'article →