mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-04 04:27:47 +01:00
app/globals.css defines the identity -- editorial ink, one ochre accent --
and says so in a comment: "No generic AI gradient blue/purple." The bot
pages ignored it and ran a parallel palette, so a single viewport of
/bots/legal-expert showed a blue logo, a blue nav button and an ochre CTA
at the same time.
There were four colour sources, not two:
lib/config/colors.ts 16-colour accent sets
lib/hooks/navigationConfig its own 5-colour NAV_COLOR_CLASSES
ACCENT_HERO_CLASSES a fifth set (whose green and indigo entries
both set chatBg to 'bg-blue-50' -- it was not
even self-consistent)
raw Tailwind greys text-gray-900 / bg-white / border-gray-200
The six professional bots are Botsmann, so they now wear the brand:
BRAND_ACCENT and BRAND_HERO, plus a single NAV_COLORS scheme. 113 raw
grey/white classes became semantic tokens (text-ink, text-ink-muted,
bg-surface, bg-paper, border-edge). The page ground is bg-paper, matching
the homepage instead of flat white.
The 'B' mark in BotNavigation was literally
`bg-gradient-to-r from-blue-600 to-purple-600` -- the exact thing globals.css
forbids by name. It now renders the shared <Logo>, so it cannot drift again.
Per-bot accentColor is gone from the first-party config and its plumbing.
The per-colour sets STAY for user-created bots: custom_bots.accent_color is
a real column with a CHECK constraint and the owner picks it. That is user
data, not a design token.
Also deleted components/shared/BotPageTemplate.tsx -- nothing imported it.
Not in this change: /try, /enterprise, /bots and /knowledge still carry
blue/purple gradients (72 files match the raw palette). Same class, separate
pass, so this one stays reviewable.
verify: format, lint, typecheck, 240 tests, build -- all green. Verified
visually against a local production build.
Claude-Session: https://claude.ai/code/session_01HVwg8DKHQktxJuHeLM3xpG
Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
62 lines
2.1 KiB
TypeScript
62 lines
2.1 KiB
TypeScript
'use client';
|
|
|
|
import type { CTAContent } from '@/lib/config/bot-pages';
|
|
import { BRAND_ACCENT } from '@/lib/config/colors';
|
|
|
|
interface CTASectionProps {
|
|
content: CTAContent;
|
|
tryLink: string;
|
|
}
|
|
|
|
export function CTASection({ content, tryLink }: CTASectionProps) {
|
|
const { title, subtitle, primaryButton, secondaryButton, metrics, note } = content;
|
|
const accent = BRAND_ACCENT;
|
|
|
|
const primaryHref = primaryButton.useTryLink ? tryLink : (primaryButton.href ?? '#');
|
|
|
|
return (
|
|
<div className="max-w-4xl mx-auto">
|
|
<div className="bg-paper rounded-2xl p-8 md:p-12 text-center">
|
|
<h2 className="text-3xl font-bold text-ink mb-4">{title}</h2>
|
|
|
|
{subtitle && <p className="text-lg text-ink-muted max-w-2xl mx-auto mb-8">{subtitle}</p>}
|
|
|
|
<div className="flex flex-col sm:flex-row justify-center gap-4 mb-8">
|
|
<a
|
|
href={primaryHref}
|
|
target={primaryButton.useTryLink ? '_blank' : undefined}
|
|
rel={primaryButton.useTryLink ? 'noopener noreferrer' : undefined}
|
|
className={`px-8 py-3 rounded-lg font-medium text-white ${accent.primary} hover:opacity-90 transition-opacity`}
|
|
>
|
|
{primaryButton.text}
|
|
</a>
|
|
|
|
{secondaryButton && (
|
|
<a
|
|
href={secondaryButton.href}
|
|
className={`px-8 py-3 rounded-lg font-medium border-2 ${accent.border} ${accent.text} hover:bg-paper transition-colors`}
|
|
>
|
|
{secondaryButton.text}
|
|
</a>
|
|
)}
|
|
</div>
|
|
|
|
{metrics && metrics.length > 0 && (
|
|
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
|
|
{metrics.map((metric, index) => (
|
|
<div key={index} className="text-center">
|
|
<div className="text-2xl font-bold text-ink">
|
|
{metric.dynamic ? '—' : metric.value}
|
|
</div>
|
|
<div className="text-sm text-ink-muted">{metric.label}</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
)}
|
|
|
|
{note && <p className="text-sm text-ink-muted">{note}</p>}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|