Snapshot of uncommitted work: landing, bots, prod infra, partner cabinet, backoffice stage 1
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
45d7512d2b
commit
d452824c62
314 files changed
+44394
-121
No files matched your search
@@ -0,0 +1,39 @@
|
||||
import { createT, isLocale, LOCALES, type Locale } from '@barev/i18n';
|
||||
import { Logo } from '@barev/ui';
|
||||
import type { Metadata } from 'next';
|
||||
import { BotLink, LangMenu, LangSwitch } from './client';
|
||||
|
||||
/** Экспериментальные версии лендинга (/land1…3): своя каноническая ссылка и noindex, чтобы не конкурировать с главной в поиске */
|
||||
export async function variantMetadata(params: Promise<{ locale: string }>, path: string, titleKey: string): Promise<Metadata> {
|
||||
const { locale } = await params;
|
||||
if (!isLocale(locale)) return {};
|
||||
const t = createT(locale);
|
||||
return {
|
||||
title: `${t(titleKey)} — Barev Club`,
|
||||
description: t('landing.meta.description'),
|
||||
robots: { index: false, follow: true },
|
||||
alternates: { canonical: `/${locale}${path}`, languages: Object.fromEntries(LOCALES.map((l) => [l, `/${l}${path}`])) },
|
||||
};
|
||||
}
|
||||
|
||||
/** Шапка версий лендинга: логотип ведёт на главную, языки остаются на той же версии */
|
||||
export function VariantHeader({ locale, path, className, logoColor }: { locale: Locale; path: string; className?: string; logoColor?: string }) {
|
||||
const t = createT(locale);
|
||||
return (
|
||||
<header className={`vh ${className ?? ''}`}>
|
||||
<a href={`/${locale}`} aria-label="Barev Club" className="vh__logo">
|
||||
<Logo color={logoColor} />
|
||||
</a>
|
||||
<div className="vh__right">
|
||||
<div className="vh__langs">
|
||||
<LangSwitch current={locale} path={path} />
|
||||
</div>
|
||||
<LangMenu current={locale} path={path} />
|
||||
<BotLink className="bc-btn bc-btn--sm vh__cta">
|
||||
<span className="tg-long">{t('landing.openTelegram')}</span>
|
||||
<span className="tg-short">Telegram</span>
|
||||
</BotLink>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user