mirror of
https://github.com/bitbaum/substrata.git
synced 2026-12-04 05:07:46 +01:00
* wip: company profiles — at a glance, ownership, charts, section menu
* feat(markets): company profiles — at a glance, ownership, charts, section menu
Opening ASML, GE Vernova or Sibelco now reads in one order on every
company: header with five StatTiles at a glance (bottlenecks held, hardest
binding, directory grade, listing, events) → what it holds, each row the
front page's board-row with a chartkit Meter linking to the assessment →
ownership and investors (new config/substrata-ownership.ts, 25 companies,
every holder with the document and as-of date it was read from; a share
nobody read off a document is null and reads as a lead; ShareBars for the
sourced ones) → numbers it reports (series filed under the company, as
LineCharts and sparkline rows) → what has happened (events that name it,
events on what it holds and its SEC filings on one Timeline, then the lists)
→ unread leads (three, then "All n") → what could loosen its grip → ways to
take part → hiring → others at the same step → what it connects to →
sources → discussion. The section menu is the existing SectionNav (a
strip under the top bar on a phone, a rail from 1280px), built from the
headings. Charts are @bitbaum/chartkit's; the page keeps only its placement.
Ask gets an `ownership` tool ("who owns X"), with the same rows.
Gates: test/ownership.test.ts (sources, as-of dates, sums ≤ 100, status
agrees with the listing record, the tool answers for listed / private /
unknown), module order in test/profile.test.ts, and
scripts/ux/profile-layout.mjs (`check:profile-layout`): three companies at
320/390/1440 light and dark — no sideways scroll, every target 44px, five
tiles of one shape, meters in one x, the menu lists only real sections, no
word cut mid-letter.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE
---------
Co-authored-by: Claude <noreply@anthropic.com>
124 lines
3.0 KiB
CSS
124 lines
3.0 KiB
CSS
/* "On this page" (components/portal/SectionNav.tsx). Tokens only. */
|
|
.section-nav-scope {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
[data-section],
|
|
[data-section-sub] {
|
|
/* Clear the top bar and, on narrow screens, the strip itself. */
|
|
scroll-margin-top: calc(var(--spacing-topbar) + 3.5rem);
|
|
}
|
|
|
|
/* Narrow: a strip under the top bar, scrolling sideways. */
|
|
.section-nav {
|
|
position: sticky;
|
|
top: var(--spacing-topbar);
|
|
z-index: 20;
|
|
margin: 0 -1rem 1.5rem;
|
|
padding: 0.25rem 1rem;
|
|
border-bottom: 1px solid var(--color-border-subtle);
|
|
background: color-mix(in srgb, var(--color-surface-page) 94%, transparent);
|
|
backdrop-filter: blur(8px);
|
|
}
|
|
.section-nav[hidden] {
|
|
display: none;
|
|
}
|
|
.section-nav-title {
|
|
display: none;
|
|
}
|
|
.section-nav ol {
|
|
display: flex;
|
|
gap: 0.25rem;
|
|
overflow-x: auto;
|
|
scrollbar-width: none;
|
|
}
|
|
.section-nav li.is-sub {
|
|
display: none;
|
|
}
|
|
.section-nav a {
|
|
display: flex;
|
|
align-items: center;
|
|
min-height: var(--size-target);
|
|
padding: 0 0.7rem;
|
|
border-radius: 999px;
|
|
font-size: 0.8125rem;
|
|
white-space: nowrap;
|
|
color: var(--color-fg-secondary);
|
|
}
|
|
.section-nav a:hover {
|
|
color: var(--color-fg-primary);
|
|
}
|
|
.section-nav a[aria-current],
|
|
.section-nav a[data-within] {
|
|
background: var(--color-fg-primary);
|
|
color: var(--color-surface-page);
|
|
}
|
|
|
|
/* Wide: a rail left of the content, below the top bar as the page scrolls. */
|
|
@media (min-width: 1280px) {
|
|
/* Only with a nav showing: a hidden one must not leave its column behind. */
|
|
.section-nav-scope:has(> .section-nav:not([hidden])) {
|
|
grid-template-columns: 11rem minmax(0, 1fr);
|
|
gap: 2.5rem;
|
|
}
|
|
[data-section],
|
|
[data-section-sub] {
|
|
scroll-margin-top: calc(var(--spacing-topbar) + 1rem);
|
|
}
|
|
.section-nav {
|
|
top: calc(var(--spacing-topbar) + 1.5rem);
|
|
align-self: start;
|
|
max-height: calc(100vh - var(--spacing-topbar) - 3rem);
|
|
overflow-y: auto;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
background: none;
|
|
backdrop-filter: none;
|
|
}
|
|
.section-nav-title {
|
|
display: block;
|
|
margin-bottom: 0.75rem;
|
|
font-family: var(--font-mono);
|
|
font-size: 0.7rem;
|
|
letter-spacing: var(--tracking-caps);
|
|
text-transform: uppercase;
|
|
color: var(--color-fg-tertiary);
|
|
}
|
|
.section-nav ol {
|
|
display: block;
|
|
overflow: visible;
|
|
border-left: 1px solid var(--color-border-subtle);
|
|
}
|
|
.section-nav li.is-sub {
|
|
display: block;
|
|
}
|
|
.section-nav a {
|
|
margin-left: -1px;
|
|
min-height: var(--size-target);
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0.3rem 0 0.3rem 0.85rem;
|
|
border-left: 2px solid transparent;
|
|
border-radius: 0;
|
|
white-space: normal;
|
|
font-size: 0.875rem;
|
|
}
|
|
.section-nav li.is-sub a {
|
|
min-height: 2rem;
|
|
padding-left: 1.6rem;
|
|
font-size: 0.8125rem;
|
|
color: var(--color-fg-tertiary);
|
|
}
|
|
.section-nav a[data-within] {
|
|
background: none;
|
|
color: var(--color-fg-primary);
|
|
}
|
|
.section-nav a[aria-current] {
|
|
background: none;
|
|
border-left-color: var(--color-fg-primary);
|
|
color: var(--color-fg-primary);
|
|
font-weight: 600;
|
|
}
|
|
}
|