/
AlexandrNarbaev
/
ThePath
Обзор
Документация
Войти
/
AlexandrNarbaev
/
ThePath
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
web/src/components/module/ModuleBreadcrumb.astro
20 строк
847 B
AlexandrNarbaev
fix: all internal links use /ThePath base, language switch fixed
31 май 2026, 18:21
31 май 2026, 18:21
3225921
Код
Авторство
О чём код?
--- import { t, type Lang } from '../../i18n/ui'; const { lang, title } = Astro.props as { lang: Lang; title: string }; const base = '/ThePath'; --- <nav class="breadcrumb" aria-label="Breadcrumb"> <a href={`${base}/${lang}`}>{t('breadcrumb.home', lang)}</a> <span aria-hidden="true">›</span> <a href={`${base}/${lang}/map`}>{t('breadcrumb.map', lang)}</a> <span aria-hidden="true">›</span> <span aria-current="page">{title}</span> </nav> <style> .breadcrumb { font-size: 0.85rem; color: var(--color-text-secondary); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; } .breadcrumb a { color: var(--color-text-secondary); } .breadcrumb a:hover { color: var(--color-accent); } .breadcrumb [aria-current="page"] { color: var(--color-text-primary); font-weight: 500; } </style>