mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-04 12:38:28 +01:00
The blog and the Knowledge Center each fetched their markdown from a
SEPARATE GitHub repository at request time (g-but/botsmann-blog-content,
g-but/botsmann-knowledge-content) and rendered it through next-mdx-remote
with a hand-rolled component map per surface. Two maps for one markdown
vocabulary, already drifted: the blog slugged headings with rehype-slug, the
guides with a different inline regex; the guides highlighted code, the blog
did not; each had its own Callout. The content itself lived where nobody
reviewed it, behind a GitHub handle rename that now answers only via a 301.
Both surfaces now read content/*.md from this repo and render through
bip-kit's typed-block parser and reference renderer:
- content/blog/*.md (5 posts) and content/knowledge/**/*.md (10 guides) are
vendered verbatim from the two content repos — word-level parity verified
across all 15 files, zero words lost. Post images moved to public/blog/.
- The three app/blog/<slug>/page.mdx files came along as drafts. They were
never routes: `page.mdx` only serves as a page when pageExtensions includes
mdx, and this app never configured that, so all three were dead files. They
are committed with `published: false` rather than deleted.
- lib/longform/ is the one pipeline both routes call: a fence-aware
normalizer (`# ` → `## `, `*`/`+` bullets → `-`, nested items flattened —
the guides carry 74 indented items and ~130 shell-comment `#` lines inside
fences that a naive normalizer would have corrupted), then parse → blocks +
TOC + reading time.
- setHighlighterLoader(() => import('shiki')) is registered at module scope.
This app builds `output: standalone`, where bip-kit's zero-config shiki
import is invisible to Next's file tracer — without the explicit literal,
production ships unhighlighted while dev looks right.
- The TOC is derived from the same parse that renders the page, so a TOC
anchor can no longer point at a heading id built by a different slug rule.
types/knowledge.ts loses TableOfContentsItem accordingly.
Retired: next-mdx-remote, remark-gfm, rehype-slug, rehype-autolink-headings,
gray-matter (deps), components/blog/{Server,Client}MDXContent + MDXComponents,
components/knowledge/{Callout,CodeBlock,TableOfContents}. next.config drops
the raw.githubusercontent image pattern and the GitHub hosts from CSP
connect-src, and points frame-src at the privacy video players bip-kit uses.
Article typography now flows from the token SSOT: lib/longform/longform.css
maps globals.css onto bip-kit's --bp-* contract, replacing ~40 hardcoded
Tailwind greys. The mapping covers every --bp-* colour and pins the article
light, because Botsmann has no dark theme anywhere (zero `dark:` utilities,
no theme provider, light-only chrome) — letting bip-kit's dark defaults
through would put a dark article inside a white page. When the site grows a
dark tier, this file follows it by changing values in globals.css only.
tests/__tests__/lib/longform-content.test.ts walks every content file through
the real pipeline: committed content is bip-kit's trust boundary and a
malformed chart/stats fence throws at parse time, which without a test would
surface as a 500 on the live page.
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
225 lines
6.7 KiB
CSS
225 lines
6.7 KiB
CSS
@import 'tailwindcss';
|
|
|
|
@plugin '@tailwindcss/forms';
|
|
@plugin '@tailwindcss/typography';
|
|
|
|
/*
|
|
* ============================================================================
|
|
* BOTSMANN DESIGN TOKENS — SINGLE SOURCE OF TRUTH
|
|
* ============================================================================
|
|
* Identity: serious, credible AI professionals — counsel you'd trust, not a
|
|
* toy chatbot. Editorial ink + one authoritative warm accent (notarial ochre).
|
|
* No generic "AI gradient" blue/purple. Typography (serif display) carries it.
|
|
*
|
|
* Every color/radius/shadow used in the product is defined HERE. Tailwind v4
|
|
* CSS-first config: the @theme block below maps utility names to these vars;
|
|
* components consume semantic classes only. Retheme = edit this block.
|
|
*/
|
|
:root {
|
|
/* Tier 1 — Primitive palette (raw values; never used directly by components) */
|
|
--primitive-ink-950: #1a1714; /* near-black warm ink — text & wordmark */
|
|
--primitive-ink-700: #4a423b;
|
|
--primitive-ink-500: #6f655c; /* muted body copy */
|
|
--primitive-ochre-600: #b45309; /* authoritative warm accent */
|
|
--primitive-ochre-700: #92400e; /* accent hover / pressed */
|
|
--primitive-ochre-50: #fdf6ec; /* accent tint surface */
|
|
--primitive-paper: #faf8f4; /* warm off-white page */
|
|
--primitive-surface: #ffffff;
|
|
--primitive-border: #e8e2d8; /* warm hairline */
|
|
|
|
/* Status — colour means STATUS, nothing else. Used by long-form callouts
|
|
(lib/longform/longform.css maps these onto bip-kit's --bp-* contract).
|
|
Desaturated to sit next to the ochre accent without competing with it. */
|
|
--primitive-status-positive: #15803d;
|
|
--primitive-status-positive-tint: #f2f9f4;
|
|
--primitive-status-warning: #a16207;
|
|
--primitive-status-warning-tint: #fdf8ec;
|
|
--primitive-status-negative: #b91c1c;
|
|
--primitive-status-negative-tint: #fdf3f2;
|
|
|
|
/* Back-compat for any legacy rgb() consumers */
|
|
--foreground-rgb: 26, 23, 20;
|
|
--background-rgb: 250, 248, 244;
|
|
}
|
|
|
|
/*
|
|
* Tier 2 — Semantic tokens (what things MEAN — always use these).
|
|
* `inline` so utilities resolve through the primitive vars above and the
|
|
* next/font vars (--font-inter / --font-fraunces) set on <html> in layout.tsx.
|
|
*/
|
|
@theme inline {
|
|
--color-brand: var(--primitive-ink-950); /* the Botsmann mark / authority */
|
|
--color-action: var(--primitive-ochre-600); /* primary CTAs, links, accents */
|
|
--color-action-hover: var(--primitive-ochre-700);
|
|
--color-action-tint: var(--primitive-ochre-50);
|
|
--color-paper: var(--primitive-paper); /* page background */
|
|
--color-surface: var(--primitive-surface);
|
|
--color-edge: var(--primitive-border);
|
|
--color-ink: var(--primitive-ink-950);
|
|
--color-ink-muted: var(--primitive-ink-500);
|
|
|
|
/* Radii — restrained, editorial (not bubbly) */
|
|
--radius-card: 12px;
|
|
--radius-btn: 8px;
|
|
|
|
/* Shadows — subtle, paper-like (no glassmorphism glow) */
|
|
--shadow-card: 0 1px 2px rgb(26 23 20 / 0.04), 0 1px 3px rgb(26 23 20 / 0.06);
|
|
--shadow-card-hover: 0 4px 12px rgb(26 23 20 / 0.08), 0 2px 4px rgb(26 23 20 / 0.06);
|
|
|
|
/* Bound to next/font CSS vars set in app/layout.tsx */
|
|
--font-sans: var(--font-inter), system-ui, sans-serif;
|
|
--font-serif: var(--font-fraunces), Georgia, serif;
|
|
}
|
|
|
|
body {
|
|
color: var(--primitive-ink-950);
|
|
background: var(--primitive-paper);
|
|
}
|
|
|
|
/* Smooth scrolling for anchor links */
|
|
html {
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
html {
|
|
scroll-behavior: auto;
|
|
}
|
|
}
|
|
|
|
@layer base {
|
|
/* Serif display carries the editorial identity for headings & wordmark */
|
|
h1 {
|
|
@apply font-serif text-4xl font-semibold tracking-tight text-ink;
|
|
}
|
|
h2 {
|
|
@apply font-serif text-3xl font-semibold tracking-tight text-ink;
|
|
}
|
|
h3 {
|
|
@apply text-2xl font-semibold text-ink;
|
|
}
|
|
p {
|
|
@apply text-ink-muted;
|
|
}
|
|
}
|
|
|
|
@layer components {
|
|
.btn-primary {
|
|
@apply rounded-btn bg-action px-4 py-2 text-sm md:text-base font-medium text-white hover:bg-action-hover transition-colors shadow-card hover:shadow-card-hover md:px-5 md:py-2.5 focus:outline-none focus:ring-2 focus:ring-action/40;
|
|
}
|
|
.btn-secondary {
|
|
@apply rounded-btn border border-edge px-4 py-2 text-sm md:text-base font-medium text-ink hover:bg-action-tint transition-colors shadow-card hover:shadow-card-hover md:px-5 md:py-2.5 focus:outline-none focus:ring-2 focus:ring-action/20;
|
|
}
|
|
.input-primary {
|
|
@apply w-full rounded-btn border border-edge bg-surface px-4 py-3 text-ink outline-none transition-colors focus:border-action focus:ring-2 focus:ring-action/20;
|
|
}
|
|
}
|
|
|
|
/* Mobile menu specific styles */
|
|
@supports (height: 100dvh) {
|
|
.mobile-menu-height {
|
|
height: 100dvh; /* Dynamic viewport height for modern browsers */
|
|
}
|
|
}
|
|
|
|
/* Ensure headless UI components have proper z-index */
|
|
[data-headlessui-state='open'] {
|
|
position: relative;
|
|
z-index: 50;
|
|
}
|
|
|
|
/* Ensures the panel is properly positioned */
|
|
.fixed.inset-0 {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
}
|
|
|
|
/* Mobile menu fixes */
|
|
body.overflow-hidden {
|
|
/* Prevent content jumping when scrollbar disappears */
|
|
padding-right: 15px; /* Approximate scrollbar width */
|
|
}
|
|
|
|
/* Ensure header stays in place */
|
|
header {
|
|
max-height: auto !important;
|
|
max-width: 100% !important;
|
|
}
|
|
|
|
/* Add these animation classes to your existing globals.css file */
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(-10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.animate-fadeIn {
|
|
animation: fadeIn 0.3s ease-in-out forwards;
|
|
}
|
|
|
|
/* Hide scrollbar for clean UI */
|
|
.no-scrollbar::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.no-scrollbar {
|
|
-ms-overflow-style: none; /* IE and Edge */
|
|
scrollbar-width: none; /* Firefox */
|
|
}
|
|
|
|
/* Add these to your global CSS to fix dropdown behavior */
|
|
|
|
/* Dropdown and Navigation Z-index Hierarchy */
|
|
.dropdown-menu {
|
|
z-index: 1000 !important; /* Extremely high z-index to ensure it's above everything */
|
|
position: absolute !important;
|
|
background-color: white !important;
|
|
box-shadow:
|
|
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
|
|
}
|
|
|
|
#botsmann-header {
|
|
z-index: 900 !important;
|
|
position: relative !important;
|
|
}
|
|
|
|
.bot-navigation {
|
|
z-index: 800 !important; /* Lower than Botsmann header but higher than content */
|
|
}
|
|
|
|
/* Ensure all dropdown content is clickable */
|
|
.dropdown-menu * {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Add pointer-events: none to elements that should not intercept clicks when dropdowns are open */
|
|
.dropdown-open .bot-navigation {
|
|
pointer-events: none !important;
|
|
}
|
|
|
|
/* Mobile responsiveness improvements */
|
|
@media (max-width: 640px) {
|
|
.container {
|
|
padding-left: 1rem;
|
|
padding-right: 1rem;
|
|
}
|
|
|
|
.btn-primary,
|
|
.btn-secondary {
|
|
width: 100%;
|
|
justify-content: center;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
}
|