feat: real Bangla/English toggle for the home page (Hero through Footer)
The BN/EN button already worked (state + persistence), but almost nothing on the page actually responded to it — Hero showed both languages stacked at once, the home service cards' Bangla name was hardcoded on regardless of language, and everything else (About, Skills, Testimonials, own-products showcase, Timeline, Nav chrome, Footer) had zero language awareness at all. Wired `lang` through to every home-page section, added ~15 new *Bn content fields to data.jsx (service kind/description/highlights, testimonials, own-products, experience, metrics), and fixed the two literal stacking bugs (Hero tagline, home service card names). Also fixed the language toggle button being hidden below 640px — mobile had no way to reach it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+22
-16
@@ -120,10 +120,26 @@ const TerminalRain = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const HERO_TXT = {
|
||||
en: {
|
||||
pill: "Accepting new projects · Q3 2026",
|
||||
viewServices: "View Services",
|
||||
getQuote: "Get a Quote",
|
||||
lastShipped: "Last shipped: 2 days ago",
|
||||
},
|
||||
bn: {
|
||||
pill: "নতুন প্রজেক্ট নেওয়া হচ্ছে · Q3 2026",
|
||||
viewServices: "সার্ভিস দেখুন",
|
||||
getQuote: "কোট নিন",
|
||||
lastShipped: "সর্বশেষ শিপড: ২ দিন আগে",
|
||||
},
|
||||
};
|
||||
|
||||
const Hero = ({ headlinePrefix, headlineSuffix, lang = "en" }) => {
|
||||
const D = PORTFOLIO_DATA;
|
||||
const prefix = headlinePrefix || "Agentic AI &";
|
||||
const suffix = headlineSuffix || "automation engineer";
|
||||
const t = HERO_TXT[lang] || HERO_TXT.en;
|
||||
|
||||
return (
|
||||
<section id="top" style={{
|
||||
@@ -158,7 +174,7 @@ const Hero = ({ headlinePrefix, headlineSuffix, lang = "en" }) => {
|
||||
boxShadow: "0 0 10px var(--good)",
|
||||
animation: "pulse-dot 2s infinite",
|
||||
}} />
|
||||
Accepting new projects · Q3 2026
|
||||
{t.pill}
|
||||
</div>
|
||||
|
||||
{/* headline */}
|
||||
@@ -189,17 +205,7 @@ const Hero = ({ headlinePrefix, headlineSuffix, lang = "en" }) => {
|
||||
lineHeight: 1.55,
|
||||
color: "var(--text-dim)",
|
||||
}}>
|
||||
{D.brand.tagline}
|
||||
</p>
|
||||
<p style={{
|
||||
marginTop: 8,
|
||||
maxWidth: 620,
|
||||
fontSize: 14,
|
||||
lineHeight: 1.6,
|
||||
color: "var(--text-faint)",
|
||||
fontFamily: "var(--font-sans)",
|
||||
}}>
|
||||
{D.brand.taglineBn}
|
||||
{lang === "bn" ? D.brand.taglineBn : D.brand.tagline}
|
||||
</p>
|
||||
|
||||
{/* CTAs */}
|
||||
@@ -219,7 +225,7 @@ const Hero = ({ headlinePrefix, headlineSuffix, lang = "en" }) => {
|
||||
onMouseEnter={e => e.currentTarget.style.transform = "translateY(-1px)"}
|
||||
onMouseLeave={e => e.currentTarget.style.transform = "none"}
|
||||
>
|
||||
View Services <Icons.Arrow size={14} />
|
||||
{t.viewServices} <Icons.Arrow size={14} />
|
||||
</a>
|
||||
<a href="#contact" style={{
|
||||
display: "inline-flex",
|
||||
@@ -234,7 +240,7 @@ const Hero = ({ headlinePrefix, headlineSuffix, lang = "en" }) => {
|
||||
borderRadius: 10,
|
||||
textDecoration: "none",
|
||||
}}>
|
||||
Get a Quote <Icons.ArrowUpRight size={14} />
|
||||
{t.getQuote} <Icons.ArrowUpRight size={14} />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -252,7 +258,7 @@ const Hero = ({ headlinePrefix, headlineSuffix, lang = "en" }) => {
|
||||
<span>·</span>
|
||||
<span>{D.brand.domain}</span>
|
||||
<span>·</span>
|
||||
<span>Last shipped: 2 days ago</span>
|
||||
<span>{t.lastShipped}</span>
|
||||
</div>
|
||||
|
||||
{/* metric strip */}
|
||||
@@ -282,7 +288,7 @@ const Hero = ({ headlinePrefix, headlineSuffix, lang = "en" }) => {
|
||||
fontFamily: "var(--font-mono)",
|
||||
textTransform: "uppercase",
|
||||
letterSpacing: "0.06em",
|
||||
}}>{m.label}</div>
|
||||
}}>{lang === "bn" ? m.labelBn : m.label}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user