Skip to content

Commit e1d7baa

Browse files
committed
Upgrade flags to svg
1 parent 650f7c1 commit e1d7baa

5 files changed

Lines changed: 124 additions & 20 deletions

File tree

website/src/components/layout/Navbar.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
.lang-toggle {
107107
display: flex;
108108
align-items: center;
109+
justify-content: center;
109110
gap: 6px;
110111
padding: 8px 12px;
111112
background: var(--bg-tertiary);
@@ -140,6 +141,7 @@
140141
.lang-option {
141142
display: flex;
142143
align-items: center;
144+
justify-content: center;
143145
gap: 10px;
144146
width: 100%;
145147
padding: 10px 12px;
@@ -161,8 +163,16 @@
161163
color: var(--color-primary);
162164
}
163165

164-
.lang-flag {
165-
font-size: 1.2rem;
166+
.lang-flag-icon {
167+
width: 20px;
168+
height: 15px;
169+
object-fit: cover;
170+
border-radius: 2px;
171+
}
172+
173+
.lang-text {
174+
font-weight: 500;
175+
font-size: 0.9rem;
166176
}
167177

168178
.theme-toggle {

website/src/components/layout/Navbar.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ export default function Navbar() {
4242

4343
const languages = useMemo(
4444
() => {
45-
const flags: Record<string, string> = {
46-
en: '🇺🇸',
47-
es: '🇪🇸',
48-
pt: '🇵🇹',
49-
zh: '🇨🇳',
50-
hi: '🇮🇳',
51-
fr: '🇫🇷',
52-
ar: '🇸🇦',
53-
ru: '🇷🇺',
54-
de: '🇩🇪',
55-
ja: '🇯🇵'
45+
const countryCodes: Record<string, string> = {
46+
en: 'us',
47+
es: 'co',
48+
pt: 'pt',
49+
zh: 'cn',
50+
hi: 'in',
51+
fr: 'fr',
52+
ar: 'sa',
53+
ru: 'ru',
54+
de: 'de',
55+
ja: 'jp'
5656
};
5757
return ['en', 'es', 'pt', 'zh', 'hi', 'fr', 'ar', 'ru', 'de', 'ja'].map(code => ({
5858
code,
59-
name: flags[code],
60-
flag: code.toUpperCase()
59+
flagUrl: `https://flagcdn.com/${countryCodes[code]}.svg`,
60+
label: code.toUpperCase()
6161
}));
6262
},
6363
[]
@@ -156,8 +156,8 @@ export default function Navbar() {
156156
className={`lang-option ${i18n.language === lang.code ? 'active' : ''}`}
157157
onClick={() => changeLanguage(lang.code)}
158158
>
159-
<span className="lang-flag">{lang.flag}</span>
160-
<span>{lang.name}</span>
159+
<span className="lang-text">{lang.label}</span>
160+
<img src={lang.flagUrl} alt={lang.label} className="lang-flag-icon" />
161161
</button>
162162
))}
163163
</div>

website/src/components/sections/HeroSection.css

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,77 @@
227227
height: 180px;
228228
}
229229
}
230+
231+
.preview-link {
232+
position: relative;
233+
color: var(--color-primary);
234+
text-decoration: none;
235+
font-weight: 500;
236+
display: inline-block;
237+
}
238+
239+
.preview-link:hover {
240+
text-decoration: underline;
241+
}
242+
243+
.preview-tooltip {
244+
position: absolute;
245+
bottom: calc(100% + 10px);
246+
left: 50%;
247+
transform: translateX(-50%) translateY(10px);
248+
background: var(--bg-card);
249+
border: 1px solid var(--border-color);
250+
padding: 12px;
251+
border-radius: 8px;
252+
width: 280px;
253+
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
254+
opacity: 0;
255+
visibility: hidden;
256+
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
257+
pointer-events: none;
258+
z-index: 100;
259+
}
260+
261+
.preview-link:hover .preview-tooltip {
262+
opacity: 1;
263+
visibility: visible;
264+
transform: translateX(-50%) translateY(0);
265+
}
266+
267+
.tooltip-content {
268+
display: flex;
269+
flex-direction: column;
270+
gap: 6px;
271+
}
272+
273+
.tooltip-title {
274+
font-weight: 600;
275+
color: var(--text-primary);
276+
font-size: 0.9rem;
277+
}
278+
279+
.tooltip-desc {
280+
font-size: 0.8rem;
281+
color: var(--text-muted);
282+
line-height: 1.4;
283+
}
284+
285+
.tooltip-url {
286+
font-size: 0.75rem;
287+
color: var(--text-muted);
288+
opacity: 0.8;
289+
}
290+
291+
/* Arrow */
292+
.preview-tooltip::after {
293+
content: '';
294+
position: absolute;
295+
bottom: -6px;
296+
left: 50%;
297+
transform: translateX(-50%) rotate(45deg);
298+
width: 12px;
299+
height: 12px;
300+
background: var(--bg-card);
301+
border-right: 1px solid var(--border-color);
302+
border-bottom: 1px solid var(--border-color);
303+
}

website/src/components/sections/HeroSection.tsx

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
1-
import { useTranslation } from 'react-i18next';
1+
import { useTranslation, Trans } from 'react-i18next';
22
import { Link } from 'react-router-dom';
33
import { Download, BookOpen, ArrowRight } from 'lucide-react';
44
import './HeroSection.css';
55

66
const LOGO_URL = 'https://cdn.jsdelivr.net/gh/tutosrive/images-projects-srm-trg@main/dev2forge/logos/bridgex-v0.1.0.webp';
77

8+
const MarkitdownPreview = (
9+
<a
10+
href="https://github.com/microsoft/markitdown"
11+
target="_blank"
12+
rel="noopener noreferrer"
13+
className="preview-link"
14+
>
15+
markitdown
16+
<span className="preview-tooltip">
17+
<span className="tooltip-content">
18+
<span className="tooltip-title">microsoft/markitdown</span>
19+
<span className="tooltip-desc">Python tool for converting various files to Markdown (e.g., for LLM use)</span>
20+
<span className="tooltip-url">github.com/microsoft/markitdown</span>
21+
</span>
22+
</span>
23+
</a>
24+
);
25+
826
export default function HeroSection() {
927
const { t } = useTranslation();
1028

@@ -26,7 +44,9 @@ export default function HeroSection() {
2644
<span className="gradient-text">{t('hero.title')}</span>
2745
</h1>
2846

29-
<p className="hero-subtitle">{t('hero.subtitle')}</p>
47+
<p className="hero-subtitle">
48+
<Trans i18nKey="hero.subtitle" components={[MarkitdownPreview]} />
49+
</p>
3050

3151
<p className="hero-description">{t('hero.description')}</p>
3252

website/src/i18n/locales/es.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"hero": {
1010
"title": "Bridgex",
11-
"subtitle": "Tu Puente hacia Markdown",
11+
"subtitle": "Tu Puente hacia <0>markitdown</0>",
1212
"description": "Una interfaz gráfica de código abierto para convertir archivos a Markdown, construida en Python con PySide6. Simplifica tu flujo de trabajo con el poder de Markitdown.",
1313
"cta": {
1414
"download": "Descargar Ahora",

0 commit comments

Comments
 (0)