@luhtech/site-template 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/bin/lib/assetBank.mjs +74 -0
- package/bin/lib/ground.mjs +99 -0
- package/bin/luhtech-sync-boards.mjs +170 -0
- package/bin/luhtech-sync-icons.mjs +28 -11
- package/bin/luhtech-sync-mark-set.mjs +166 -0
- package/bin/luhtech-tokens.mjs +75 -28
- package/package.json +6 -1
- package/src/components/AssetRequestForm.astro +1 -1
- package/src/components/Block.astro +1 -1
- package/src/components/Board.astro +46 -0
- package/src/components/CtaLink.astro +1 -1
- package/src/components/Diagram.astro +2 -0
- package/src/components/Figure.astro +1 -1
- package/src/components/LeadCaptureForm.astro +5 -5
- package/src/components/Mark.astro +21 -0
- package/src/components/PaperLanding.astro +2 -2
- package/src/components/SplashHero.astro +6 -6
- package/src/components/ToolCalculator.astro +6 -6
- package/src/components/VentureCard.astro +1 -1
- package/src/components/sections/Audiences.astro +1 -1
- package/src/content/figures.ts +12 -1
- package/src/layouts/SiteLayout.astro +17 -11
- package/src/lib/boards.ts +123 -0
- package/src/lib/markSet.ts +72 -0
- package/src/lib/seoHead.ts +18 -3
package/bin/luhtech-tokens.mjs
CHANGED
|
@@ -6,53 +6,70 @@
|
|
|
6
6
|
* same real logic, generalized to take instance/output paths as CLI args
|
|
7
7
|
* instead of assuming one repo's directory layout.
|
|
8
8
|
*
|
|
9
|
+
* 0.25.0 (d-2026-12-04-lb-site-ground-and-marks OUT-1): every site stands on
|
|
10
|
+
* the brand's ground, color.dark. The same @theme block and the same role
|
|
11
|
+
* names carry the dark set -- --color-canvas is color.dark.canvas, --color-ink
|
|
12
|
+
* color.dark.ink, both accents color.dark.accent -- plus three roles for the
|
|
13
|
+
* set's other members: --color-surface, --color-muted, --color-rule. Dark
|
|
14
|
+
* only: :root carries color-scheme: dark, there is no light variant and no
|
|
15
|
+
* prefers-color-scheme branch. A brand with no color.dark names the record
|
|
16
|
+
* it stands on with --ground; with neither, the generator fails naming the
|
|
17
|
+
* brandId. Each value states its record and JSON pointer. The text pairs are
|
|
18
|
+
* held to WCAG 2.2 AA 4.5:1 here, so every site's build checks them.
|
|
19
|
+
*
|
|
9
20
|
* The instance is validated in the site repo's CI (schema-registry
|
|
10
21
|
* content-validate.yml), not here.
|
|
11
22
|
*
|
|
12
23
|
* Usage:
|
|
13
|
-
* luhtech-tokens <path-to-brand-identity.json> <output-css-path>
|
|
24
|
+
* luhtech-tokens <path-to-brand-identity.json> <output-css-path> [--ground <brand-identity.json>]
|
|
14
25
|
* luhtech-tokens content/brand/ectropy.json src/styles/tokens.generated.css
|
|
15
26
|
*/
|
|
16
|
-
import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
27
|
+
import { readFileSync, writeFileSync, mkdirSync, realpathSync } from 'node:fs';
|
|
17
28
|
import { dirname, resolve } from 'node:path';
|
|
29
|
+
import { fileURLToPath } from 'node:url';
|
|
30
|
+
import { resolveGround, contrastFailures } from './lib/ground.mjs';
|
|
18
31
|
|
|
19
|
-
|
|
20
|
-
if (!instanceArg || !outputArg) {
|
|
21
|
-
console.error('Usage: luhtech-tokens <path-to-brand-identity.json> <output-css-path>');
|
|
22
|
-
process.exit(1);
|
|
23
|
-
}
|
|
24
|
-
const instancePath = resolve(process.cwd(), instanceArg);
|
|
25
|
-
const outputPath = resolve(process.cwd(), outputArg);
|
|
26
|
-
|
|
27
|
-
function readInstance(path) {
|
|
32
|
+
function readInstance(path, what = 'brand-identity instance') {
|
|
28
33
|
let raw;
|
|
29
34
|
try {
|
|
30
35
|
raw = readFileSync(path, 'utf-8');
|
|
31
36
|
} catch {
|
|
32
|
-
throw new Error(`No
|
|
37
|
+
throw new Error(`No ${what} at ${path}.`);
|
|
33
38
|
}
|
|
34
39
|
return JSON.parse(raw);
|
|
35
40
|
}
|
|
36
41
|
|
|
37
|
-
function cssColor(colorValue) {
|
|
38
|
-
return colorValue.oklch;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
42
|
function fontStack(fontRef, fallback) {
|
|
42
43
|
return `"${fontRef.family}", ${fallback}`;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const line = (name, v) => ` ${name}: ${v.oklch}; /* ${v.hex} ${v.file}${v.pointer} */\n`;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The generated CSS. brandFile and groundFile are the paths as given, so the file names its sources as the
|
|
50
|
+
* site's own repo spells them.
|
|
51
|
+
*/
|
|
52
|
+
export function generateCss(brand, brandFile, ground, groundFile) {
|
|
53
|
+
const { identity, brandId, typography } = brand;
|
|
54
|
+
const roles = resolveGround(brand, brandFile, ground, groundFile);
|
|
55
|
+
const failures = contrastFailures(roles);
|
|
56
|
+
if (failures.length) {
|
|
57
|
+
throw new Error(`brand ${brandId} on the ground of ${roles.groundBrandId}: ${failures.join('; ')}`);
|
|
58
|
+
}
|
|
59
|
+
const groundNote = roles.groundBrandId === brandId
|
|
60
|
+
? `Ground: ${brandFile}#/color/dark (${brandId})`
|
|
61
|
+
: `Ground: ${groundFile}#/color/dark (${roles.groundBrandId}); ${brandId} carries no color.dark`;
|
|
62
|
+
return `/* GENERATED by luhtech-tokens (@luhtech/site-template) from ${brandFile} -- DO NOT HAND-EDIT.
|
|
48
63
|
* Source brand: ${brandId} (${identity.name})
|
|
64
|
+
* ${groundNote}
|
|
65
|
+
* Dark only: no light variant. Each colour names its record and JSON pointer.
|
|
49
66
|
* Regenerated on every predev/prebuild. Edit the brand-identity JSON instance instead.
|
|
50
67
|
*/
|
|
68
|
+
:root {
|
|
69
|
+
color-scheme: dark;
|
|
70
|
+
}
|
|
51
71
|
@theme {
|
|
52
|
-
|
|
53
|
-
--color-canvas: ${cssColor(color.foundation.canvas)};
|
|
54
|
-
--color-accent-primary: ${cssColor(color.accent.primary)};
|
|
55
|
-
${color.accent.secondary ? ` --color-accent-secondary: ${cssColor(color.accent.secondary)};\n` : ''}
|
|
72
|
+
${line('--color-ink', roles.ink)}${line('--color-canvas', roles.canvas)}${line('--color-accent-primary', roles.accentPrimary)}${line('--color-accent-secondary', roles.accentSecondary)}${line('--color-surface', roles.surface)}${line('--color-muted', roles.muted)}${line('--color-rule', roles.rule)}
|
|
56
73
|
--font-display: ${fontStack(typography.display, 'sans-serif')};
|
|
57
74
|
--font-body: ${fontStack(typography.body, 'sans-serif')};
|
|
58
75
|
--font-mono: ${fontStack(typography.mono, 'monospace')};
|
|
@@ -60,18 +77,48 @@ ${color.accent.secondary ? ` --color-accent-secondary: ${cssColor(color.accent.
|
|
|
60
77
|
`;
|
|
61
78
|
}
|
|
62
79
|
|
|
80
|
+
export function parseArgs(argv) {
|
|
81
|
+
const args = [...argv];
|
|
82
|
+
let ground = null;
|
|
83
|
+
const gi = args.indexOf('--ground');
|
|
84
|
+
if (gi >= 0) {
|
|
85
|
+
ground = args[gi + 1];
|
|
86
|
+
if (!ground || ground.startsWith('--')) throw new Error('--ground needs a brand-identity file');
|
|
87
|
+
args.splice(gi, 2);
|
|
88
|
+
}
|
|
89
|
+
const [instance, output] = args;
|
|
90
|
+
return { instance, output, ground };
|
|
91
|
+
}
|
|
92
|
+
|
|
63
93
|
async function main() {
|
|
94
|
+
let opts;
|
|
95
|
+
try {
|
|
96
|
+
opts = parseArgs(process.argv.slice(2));
|
|
97
|
+
} catch (err) {
|
|
98
|
+
console.error(err.message);
|
|
99
|
+
process.exit(1);
|
|
100
|
+
}
|
|
101
|
+
if (!opts.instance || !opts.output) {
|
|
102
|
+
console.error('Usage: luhtech-tokens <path-to-brand-identity.json> <output-css-path> [--ground <brand-identity.json>]');
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
const instancePath = resolve(process.cwd(), opts.instance);
|
|
106
|
+
const outputPath = resolve(process.cwd(), opts.output);
|
|
64
107
|
// The brand instance is validated in the site repo's CI against
|
|
65
108
|
// schema-registry (content-validate.yml); this public package fetches no schema.
|
|
66
109
|
const brand = readInstance(instancePath);
|
|
110
|
+
const ground = opts.ground ? readInstance(resolve(process.cwd(), opts.ground), 'ground record') : undefined;
|
|
67
111
|
|
|
68
|
-
const css = generateCss(brand);
|
|
112
|
+
const css = generateCss(brand, opts.instance, ground, opts.ground ?? undefined);
|
|
69
113
|
mkdirSync(dirname(outputPath), { recursive: true });
|
|
70
114
|
writeFileSync(outputPath, css, 'utf-8');
|
|
71
115
|
console.log(`Generated ${outputPath} from ${instancePath} (brandId: ${brand.brandId})`);
|
|
72
116
|
}
|
|
73
117
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
});
|
|
118
|
+
// Run as a CLI (including through node_modules/.bin's symlink), not on import from tests.
|
|
119
|
+
if (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
120
|
+
main().catch((err) => {
|
|
121
|
+
console.error(`luhtech-tokens failed: ${err.message}`);
|
|
122
|
+
process.exit(1);
|
|
123
|
+
});
|
|
124
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luhtech/site-template",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Shared Astro component library + content-instance contract for LuhTech venture marketing sites -- one template renders every site from content/page.schema.json + content/site.schema.json instances.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"./content": "./src/content/index.ts",
|
|
25
25
|
"./lib/paperLanding": "./src/lib/paperLanding.ts",
|
|
26
26
|
"./lib/figureLabel": "./src/lib/figureLabel.ts",
|
|
27
|
+
"./lib/venture-directory": "./src/lib/venture-directory.generated.ts",
|
|
28
|
+
"./lib/markSet": "./src/lib/markSet.ts",
|
|
29
|
+
"./lib/boards": "./src/lib/boards.ts",
|
|
27
30
|
"./layouts/SiteLayout.astro": "./src/layouts/SiteLayout.astro",
|
|
28
31
|
"./integrations/nginx-csp-headers": "./src/integrations/nginx-csp-headers.mjs",
|
|
29
32
|
"./components/*": "./src/components/*",
|
|
@@ -37,6 +40,8 @@
|
|
|
37
40
|
"luhtech-sync-animated-marks": "bin/luhtech-sync-animated-marks.mjs",
|
|
38
41
|
"luhtech-sync-venture-directory": "bin/luhtech-sync-venture-directory.mjs",
|
|
39
42
|
"luhtech-sync-icons": "bin/luhtech-sync-icons.mjs",
|
|
43
|
+
"luhtech-sync-mark-set": "bin/luhtech-sync-mark-set.mjs",
|
|
44
|
+
"luhtech-sync-boards": "bin/luhtech-sync-boards.mjs",
|
|
40
45
|
"luhtech-seo-check": "bin/luhtech-seo-check.mjs",
|
|
41
46
|
"luhtech-device-smoke": "bin/luhtech-device-smoke.mjs"
|
|
42
47
|
},
|
|
@@ -18,7 +18,7 @@ export interface Props {
|
|
|
18
18
|
}
|
|
19
19
|
const { assetRequest, leadCapture } = Astro.props;
|
|
20
20
|
const minSubmitMs = leadCapture.minSubmitMs ?? 2000;
|
|
21
|
-
const field = 'w-full px-3 py-2 rounded-md border border-
|
|
21
|
+
const field = 'w-full px-3 py-2 rounded-md border border-rule bg-surface text-ink';
|
|
22
22
|
---
|
|
23
23
|
<form
|
|
24
24
|
class="asset-request-form max-w-md space-y-4 text-left"
|
|
@@ -104,7 +104,7 @@ if (block.blockType === 'diagram') {
|
|
|
104
104
|
</figure>
|
|
105
105
|
)}
|
|
106
106
|
{block.blockType === 'bio' && (
|
|
107
|
-
<div class={`rounded-md border border-
|
|
107
|
+
<div class={`rounded-md border border-rule p-5 ${className}`}>
|
|
108
108
|
<div class="flex items-center gap-3 mb-3">
|
|
109
109
|
<span
|
|
110
110
|
class="flex items-center justify-center w-10 h-10 rounded-full bg-accent-primary/10 text-accent-primary font-display font-bold text-sm shrink-0"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A banked board, drawn on a site the way the deck's board layout draws it (0.25.0,
|
|
3
|
+
// d-2026-12-04-lb-site-ground-and-marks OUT-8).
|
|
4
|
+
//
|
|
5
|
+
// An asset-bank diagram record (bankType diagram), its bytes verified against the record's sha256 by
|
|
6
|
+
// bin/luhtech-sync-boards.mjs and re-hashed at build (src/lib/boards.ts), drawn on the ground at its own aspect
|
|
7
|
+
// -- width and height from the bytes, never stretched or cropped -- and no narrower than the width at which its
|
|
8
|
+
// smallest type meets the legibility floor of schema-registry channel-renders deck-react meta.boardLayout. Where
|
|
9
|
+
// the column is narrower the board scrolls sideways inside its figure at that size (as ConnectionGraph does on
|
|
10
|
+
// a phone). The alt comes from the page record; the board's words are data beside it, in a details element, so
|
|
11
|
+
// the words a reader of the image sees are in the page. A board with no alt, no words, a minTextScale below the
|
|
12
|
+
// floor or more words than the rule's budget fails the build. No style attribute and no script: a site's
|
|
13
|
+
// content-security policy needs nothing new.
|
|
14
|
+
import { boardAuthoringProblems, boardFor, legibleWidth, type BoardText } from '../lib/boards';
|
|
15
|
+
|
|
16
|
+
export interface Props {
|
|
17
|
+
/** The asset-bank record's assetId, synced by luhtech-sync-boards. */
|
|
18
|
+
assetId: string;
|
|
19
|
+
/** From the page record. */
|
|
20
|
+
alt: string;
|
|
21
|
+
/** The board's words, as its deck record's diagram.text carries them. */
|
|
22
|
+
text: BoardText[];
|
|
23
|
+
/** The board's smallest type over the deck body type, as its deck record's diagram.minTextScale states it. */
|
|
24
|
+
minTextScale: number;
|
|
25
|
+
/** The details element's summary. */
|
|
26
|
+
wordsLabel?: string;
|
|
27
|
+
class?: string;
|
|
28
|
+
}
|
|
29
|
+
const { assetId, alt, text, minTextScale, wordsLabel = 'The words on this board', class: className = 'my-8' } = Astro.props;
|
|
30
|
+
const board = boardFor(assetId);
|
|
31
|
+
const problems = boardAuthoringProblems(board, alt, text, minTextScale);
|
|
32
|
+
if (problems.length) throw new Error(`Board refused: ${problems.join('; ')}`);
|
|
33
|
+
const width = legibleWidth(board.rule, minTextScale);
|
|
34
|
+
const height = Math.round((width * board.height) / board.width);
|
|
35
|
+
---
|
|
36
|
+
<figure class={className} data-board={assetId} data-board-min-text-scale={minTextScale} data-board-width={width}>
|
|
37
|
+
<div class="overflow-x-auto" role="region" aria-label={alt} tabindex="0" data-board-scroll>
|
|
38
|
+
<img src={board.src} alt={alt} width={width} height={height} class="block max-w-none h-auto mx-auto" loading="lazy" decoding="async" />
|
|
39
|
+
</div>
|
|
40
|
+
<details class="mt-3 text-sm text-muted">
|
|
41
|
+
<summary class="cursor-pointer">{wordsLabel}</summary>
|
|
42
|
+
<ul class="mt-2 space-y-1">
|
|
43
|
+
{text.map((t) => <li>{typeof t === 'string' ? t : t.value}</li>)}
|
|
44
|
+
</ul>
|
|
45
|
+
</details>
|
|
46
|
+
</figure>
|
|
@@ -9,7 +9,7 @@ const { cta, variant = 'primary' } = Astro.props;
|
|
|
9
9
|
const classes =
|
|
10
10
|
variant === 'primary'
|
|
11
11
|
? 'px-5 py-2.5 rounded-md bg-accent-primary text-canvas font-medium transition-all duration-200 hover:opacity-90 hover:shadow-lg hover:-translate-y-0.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-secondary focus-visible:rounded'
|
|
12
|
-
: 'px-5 py-2.5 rounded-md border border-
|
|
12
|
+
: 'px-5 py-2.5 rounded-md border border-rule text-ink font-medium transition-all duration-200 hover:border-ink/40 hover:-translate-y-0.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-secondary focus-visible:rounded';
|
|
13
13
|
const isExternal = cta.intent === 'external' || cta.href.startsWith('https://');
|
|
14
14
|
---
|
|
15
15
|
<a href={cta.href} class={classes} target={isExternal ? '_blank' : undefined} rel={isExternal ? 'noopener noreferrer' : undefined}>
|
|
@@ -13,6 +13,8 @@ import { figureFor } from '../content/figures.js';
|
|
|
13
13
|
export interface Props {
|
|
14
14
|
// d-2026-10-16-bt-figure-kit (page 2.8.0): a diagram either draws inline (diagramType + data) or
|
|
15
15
|
// names a figure record by figureRef, drawn by @luhtech/figures in the site's brand theme.
|
|
16
|
+
// 0.25.0 (d-2026-12-04-lb-site-ground-and-marks OUT-2): that theme is built with mode 'dark' -- the brand's
|
|
17
|
+
// color.chart.surfaces.dark -- and configureFigures refuses any other, so a figure never draws a light panel.
|
|
16
18
|
diagram: { diagramId: string; diagramType?: string; caption?: string; data?: any; figureRef?: string };
|
|
17
19
|
class?: string;
|
|
18
20
|
}
|
|
@@ -23,7 +23,7 @@ import { figureLabel } from '../lib/figureLabel';
|
|
|
23
23
|
const { figure } = Astro.props;
|
|
24
24
|
const label = figureLabel(figure);
|
|
25
25
|
---
|
|
26
|
-
<div class="relative rounded-md border border-
|
|
26
|
+
<div class="relative rounded-md border border-rule bg-surface p-5 overflow-hidden" id={figure.figureId}>
|
|
27
27
|
<span class="absolute top-0 left-0 right-0 h-1 bg-accent-primary" aria-hidden="true"></span>
|
|
28
28
|
<span class="font-display text-4xl font-bold leading-none block">{figure.value}</span>
|
|
29
29
|
{label && <span class="text-sm text-ink/70 font-medium mt-2 block">{label}</span>}
|
|
@@ -27,21 +27,21 @@ const minSubmitMs = leadCapture.minSubmitMs ?? 2000;
|
|
|
27
27
|
{heading && <h2 class="font-display text-2xl font-bold mb-2">{heading}</h2>}
|
|
28
28
|
<div>
|
|
29
29
|
<label for="lc-name" class="block text-sm font-medium mb-1">Name</label>
|
|
30
|
-
<input type="text" id="lc-name" name="name" required class="w-full px-3 py-2 rounded-md border border-
|
|
30
|
+
<input type="text" id="lc-name" name="name" required class="w-full px-3 py-2 rounded-md border border-rule bg-surface text-ink" />
|
|
31
31
|
</div>
|
|
32
32
|
<div>
|
|
33
33
|
<label for="lc-email" class="block text-sm font-medium mb-1">Email</label>
|
|
34
|
-
<input type="email" id="lc-email" name="email" required class="w-full px-3 py-2 rounded-md border border-
|
|
34
|
+
<input type="email" id="lc-email" name="email" required class="w-full px-3 py-2 rounded-md border border-rule bg-surface text-ink" />
|
|
35
35
|
</div>
|
|
36
36
|
<div>
|
|
37
37
|
<label for="lc-company" class="block text-sm font-medium mb-1">{companyLabel}</label>
|
|
38
|
-
<input type="text" id="lc-company" name="company" class="w-full px-3 py-2 rounded-md border border-
|
|
38
|
+
<input type="text" id="lc-company" name="company" class="w-full px-3 py-2 rounded-md border border-rule bg-surface text-ink" />
|
|
39
39
|
</div>
|
|
40
40
|
<div>
|
|
41
41
|
<label for="lc-message" class="block text-sm font-medium mb-1">Message</label>
|
|
42
|
-
<textarea id="lc-message" name="message" required rows="4" class="w-full px-3 py-2 rounded-md border border-
|
|
42
|
+
<textarea id="lc-message" name="message" required rows="4" class="w-full px-3 py-2 rounded-md border border-rule bg-surface text-ink"></textarea>
|
|
43
43
|
</div>
|
|
44
|
-
|
|
44
|
+
{/* Honeypot -- hidden from real users via CSS, bots fill every field they see */}
|
|
45
45
|
<div class="hidden" aria-hidden="true">
|
|
46
46
|
<label for={`lc-${leadCapture.honeypotField}`}>Website</label>
|
|
47
47
|
<input type="text" id={`lc-${leadCapture.honeypotField}`} name={leadCapture.honeypotField} tabindex="-1" autocomplete="off" />
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One member of the site's mark set, by markId (0.25.0, d-2026-12-04-lb-site-ground-and-marks OUT-3).
|
|
3
|
+
//
|
|
4
|
+
// The bytes are the asset-bank record's, verified by bin/luhtech-sync-mark-set.mjs and re-hashed at build
|
|
5
|
+
// (src/lib/markSet.ts), and inlined unaltered, as VentureMark inlines an animated mark: no recolour, no
|
|
6
|
+
// redrawn stroke, the drawing's own viewBox (asset-bank usage.prohibitedUses). The wrapper sizes the drawing
|
|
7
|
+
// as a whole, at its own aspect, through its class. The sync tool refuses a mark carrying a <style>, a
|
|
8
|
+
// <script>, a style or on* attribute, so a mark adds nothing a site's content-security policy must allow.
|
|
9
|
+
// An unknown markId fails the build; it does not render nothing.
|
|
10
|
+
import { markFor } from '../lib/markSet';
|
|
11
|
+
|
|
12
|
+
export interface Props {
|
|
13
|
+
markId: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
/** The accessible name; the member's line when not given. */
|
|
16
|
+
label?: string;
|
|
17
|
+
}
|
|
18
|
+
const { markId, class: className = 'h-8 w-8', label } = Astro.props;
|
|
19
|
+
const mark = markFor(markId);
|
|
20
|
+
---
|
|
21
|
+
<span class={`inline-block [&>svg]:block [&>svg]:h-full [&>svg]:w-full ${className}`} role="img" aria-label={label ?? mark.line} data-mark={markId} set:html={mark.markup} />
|
|
@@ -49,9 +49,9 @@ const sections = paperSections(paper, slug);
|
|
|
49
49
|
const shareUrl = shareUrlFor(new URL(route, Astro.site ?? Astro.url).href);
|
|
50
50
|
const form = paper.feedbackForm;
|
|
51
51
|
const open = feedbackOpen(leadCapture) && Boolean(form);
|
|
52
|
-
const field = 'w-full px-3 py-2 rounded-md border border-
|
|
52
|
+
const field = 'w-full px-3 py-2 rounded-md border border-rule bg-surface text-ink';
|
|
53
53
|
const button = 'px-5 py-2.5 rounded-md bg-accent-primary text-canvas font-medium transition-all duration-200 hover:opacity-90 disabled:opacity-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-secondary focus-visible:rounded';
|
|
54
|
-
const secondary = 'px-4 py-2 rounded-md border border-
|
|
54
|
+
const secondary = 'px-4 py-2 rounded-md border border-rule text-ink font-medium hover:border-accent-primary';
|
|
55
55
|
---
|
|
56
56
|
<div class="paper-landing" data-asset-request-endpoint={leadCapture.assetRequestEndpoint}>
|
|
57
57
|
{sections.map((s) => <Section section={s} site={site} />)}
|
|
@@ -89,18 +89,18 @@ const rowPositions = [4, 24, 40, 62, 80, 96];
|
|
|
89
89
|
{eyebrow && (
|
|
90
90
|
<p class="font-mono text-xs sm:text-sm tracking-[0.14em] uppercase text-accent-secondary mb-3">{eyebrow}</p>
|
|
91
91
|
)}
|
|
92
|
-
<h1 class="font-display text-4xl sm:text-5xl md:text-6xl font-semibold text-
|
|
92
|
+
<h1 class="font-display text-4xl sm:text-5xl md:text-6xl font-semibold text-ink leading-[1.12]">{heading}</h1>
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
95
|
-
<p class="mt-5 text-lg text-
|
|
95
|
+
<p class="mt-5 text-lg text-ink/85 max-w-2xl">{lede}</p>
|
|
96
96
|
{ctas.length > 0 && (
|
|
97
97
|
<div class="mt-8 flex gap-4 flex-wrap">
|
|
98
98
|
{ctas.map((cta, i) => (
|
|
99
99
|
<a
|
|
100
100
|
href={cta.href}
|
|
101
101
|
class={i === 0
|
|
102
|
-
? 'px-5 py-2.5 rounded-md bg-accent-secondary text-
|
|
103
|
-
: 'px-5 py-2.5 rounded-md border border-
|
|
102
|
+
? 'px-5 py-2.5 rounded-md bg-accent-secondary text-canvas font-medium transition-all duration-200 hover:opacity-90 hover:shadow-lg hover:-translate-y-0.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-secondary focus-visible:rounded'
|
|
103
|
+
: 'px-5 py-2.5 rounded-md border border-ink/40 text-ink font-medium transition-all duration-200 hover:border-ink/70 hover:-translate-y-0.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-secondary focus-visible:rounded'}
|
|
104
104
|
>
|
|
105
105
|
{cta.label}
|
|
106
106
|
</a>
|
|
@@ -109,11 +109,11 @@ const rowPositions = [4, 24, 40, 62, 80, 96];
|
|
|
109
109
|
)}
|
|
110
110
|
</div>
|
|
111
111
|
</section>
|
|
112
|
-
|
|
112
|
+
{/* Two independent fixed layers, not nested: the overlay's own "lift up"
|
|
113
113
|
exit transform would otherwise become the containing block for the
|
|
114
114
|
wordmark's fixed-position fly-out, compounding the two motions
|
|
115
115
|
together instead of letting them animate independently toward two
|
|
116
|
-
different targets.
|
|
116
|
+
different targets. */}
|
|
117
117
|
{intro === 'wordmark' && (<>
|
|
118
118
|
<div class="splash-overlay" id={`splash-overlay-${sessionKey}`}></div>
|
|
119
119
|
<div class="splash-wordmark-wrap" id={`splash-wordmark-wrap-${sessionKey}`}>
|
|
@@ -73,7 +73,7 @@ const heroField = pres.heroOutputId ? tool.outputFields.find((f) => f.id === pre
|
|
|
73
73
|
const restFields = tool.outputFields.filter((f) => f.id !== pres.heroOutputId);
|
|
74
74
|
---
|
|
75
75
|
<div
|
|
76
|
-
class={`rounded-lg border border-
|
|
76
|
+
class={`rounded-lg border border-rule bg-ink/[0.02] p-6 sm:p-8 ${className}`}
|
|
77
77
|
data-tool={dataId}
|
|
78
78
|
data-tool-id={tool.toolId}
|
|
79
79
|
data-computation-ref={tool.computationRef}
|
|
@@ -94,7 +94,7 @@ const restFields = tool.outputFields.filter((f) => f.id !== pres.heroOutputId);
|
|
|
94
94
|
min={f.min}
|
|
95
95
|
max={f.max}
|
|
96
96
|
step={f.type === 'percent' ? '0.01' : '1'}
|
|
97
|
-
class="mt-1 w-full rounded-md border border-
|
|
97
|
+
class="mt-1 w-full rounded-md border border-rule px-3 py-2 text-sm bg-surface focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-primary"
|
|
98
98
|
/>
|
|
99
99
|
{f.helpText && <span class="block text-xs text-ink/50 mt-1">{f.helpText}</span>}
|
|
100
100
|
</label>
|
|
@@ -150,10 +150,10 @@ const restFields = tool.outputFields.filter((f) => f.id !== pres.heroOutputId);
|
|
|
150
150
|
<div class="mt-6 border-t border-ink/10 pt-6" data-tool-capture hidden>
|
|
151
151
|
<p class="text-sm font-medium mb-3">Get the full result emailed to you</p>
|
|
152
152
|
<div class="grid sm:grid-cols-2 gap-3">
|
|
153
|
-
<input type="text" data-contact="firstName" placeholder="First name" class="rounded-md border border-
|
|
154
|
-
<input type="text" data-contact="lastName" placeholder="Last name" class="rounded-md border border-
|
|
155
|
-
<input type="email" data-contact="email" placeholder="Work email" class="rounded-md border border-
|
|
156
|
-
<input type="text" data-contact="company" placeholder="Company" class="rounded-md border border-
|
|
153
|
+
<input type="text" data-contact="firstName" placeholder="First name" class="rounded-md border border-rule px-3 py-2 text-sm bg-surface" />
|
|
154
|
+
<input type="text" data-contact="lastName" placeholder="Last name" class="rounded-md border border-rule px-3 py-2 text-sm bg-surface" />
|
|
155
|
+
<input type="email" data-contact="email" placeholder="Work email" class="rounded-md border border-rule px-3 py-2 text-sm bg-surface" required />
|
|
156
|
+
<input type="text" data-contact="company" placeholder="Company" class="rounded-md border border-rule px-3 py-2 text-sm bg-surface" />
|
|
157
157
|
</div>
|
|
158
158
|
<button type="button" data-tool-submit class="mt-4 px-5 py-2.5 rounded-md bg-accent-primary text-canvas font-medium text-sm transition-all hover:opacity-90">
|
|
159
159
|
Email me the result
|
|
@@ -30,7 +30,7 @@ const relationshipAddsInfo = crossLink.relationshipLine?.trim() !== directoryEnt
|
|
|
30
30
|
---
|
|
31
31
|
<a
|
|
32
32
|
href={crossLink.href}
|
|
33
|
-
class="flex items-start gap-3 rounded-md border border-
|
|
33
|
+
class="flex items-start gap-3 rounded-md border border-rule p-4 hover:border-accent-primary transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-primary"
|
|
34
34
|
>
|
|
35
35
|
<VentureMark brandRef={crossLink.brandRef} class="h-8 w-8 shrink-0" />
|
|
36
36
|
<span class="min-w-0">
|
|
@@ -17,7 +17,7 @@ const sectionIcon = icons?.section?.[section.sectionId];
|
|
|
17
17
|
<SectionHeading eyebrow={section.eyebrow} heading={section.heading} icon={sectionIcon} class="mb-4" />
|
|
18
18
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
19
19
|
{section.blocks?.map((b: any) => (
|
|
20
|
-
<div class="rounded-md border border-
|
|
20
|
+
<div class="rounded-md border border-rule p-4">
|
|
21
21
|
{icons?.block?.[b.label] && (
|
|
22
22
|
<Icon name={icons.block[b.label]} class="w-7 h-7 text-accent-primary mb-2" />
|
|
23
23
|
)}
|
package/src/content/figures.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { join } from 'node:path';
|
|
|
11
11
|
export interface FigureConfig {
|
|
12
12
|
/** figureId -> figure record */
|
|
13
13
|
records: Record<string, any>;
|
|
14
|
-
/** a @luhtech/figures Theme, from buildTheme(brand) */
|
|
14
|
+
/** a @luhtech/figures Theme, from buildTheme(brand, families, cells, 'dark') -- dark only (0.25.0) */
|
|
15
15
|
theme: any;
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -29,7 +29,18 @@ export function loadFigures(dir: string): Record<string, any> {
|
|
|
29
29
|
return out;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* 0.25.0 (d-2026-12-04-lb-site-ground-and-marks OUT-2): every site stands on the dark ground, so Diagram.astro
|
|
34
|
+
* draws figures in the theme built with mode 'dark' -- the brand's color.chart.surfaces.dark. A theme built in
|
|
35
|
+
* any other mode is refused here, at build, rather than drawn as a light panel on the ground.
|
|
36
|
+
*/
|
|
32
37
|
export function configureFigures(c: FigureConfig): void {
|
|
38
|
+
if (c.theme?.mode !== 'dark') {
|
|
39
|
+
throw new Error(
|
|
40
|
+
`configureFigures: the figure theme for ${c.theme?.brandId ?? 'this site'} is mode ${JSON.stringify(c.theme?.mode)}; ` +
|
|
41
|
+
"build it with buildTheme(brand, families, cells, 'dark') -- the sites are dark only",
|
|
42
|
+
);
|
|
43
|
+
}
|
|
33
44
|
config = c;
|
|
34
45
|
}
|
|
35
46
|
|
|
@@ -22,6 +22,11 @@ export interface Props {
|
|
|
22
22
|
page: LoadedPage;
|
|
23
23
|
/** Optional: supplies og:site_name and theme-color. */
|
|
24
24
|
brand?: LoadedBrand;
|
|
25
|
+
/**
|
|
26
|
+
* 0.25.0: the ground record, for a brand that carries no color.dark -- the same file the site passes to
|
|
27
|
+
* luhtech-tokens --ground. Supplies theme-color; a brand with its own color.dark needs none.
|
|
28
|
+
*/
|
|
29
|
+
ground?: LoadedBrand;
|
|
25
30
|
/**
|
|
26
31
|
* Opt-in (0.23.3), for a site whose astro.config enables security.csp: registers every animated
|
|
27
32
|
* venture mark's inline <style> hash with the page's policy before the policy meta renders
|
|
@@ -30,7 +35,7 @@ export interface Props {
|
|
|
30
35
|
*/
|
|
31
36
|
cspMarkHashes?: boolean;
|
|
32
37
|
}
|
|
33
|
-
const { site, page, brand, cspMarkHashes = false } = Astro.props as Props;
|
|
38
|
+
const { site, page, brand, ground, cspMarkHashes = false } = Astro.props as Props;
|
|
34
39
|
|
|
35
40
|
if (cspMarkHashes) {
|
|
36
41
|
const csp = Astro.csp;
|
|
@@ -50,6 +55,7 @@ const head = buildSeoHead({
|
|
|
50
55
|
site: Astro.site,
|
|
51
56
|
pathname: Astro.url.pathname,
|
|
52
57
|
brand,
|
|
58
|
+
ground,
|
|
53
59
|
publicFiles,
|
|
54
60
|
// content/site 1.5.0 (d-2026-10-19-sr-site-devices): installable adds the web-app meta.
|
|
55
61
|
devices: site.devices as SiteDevices | undefined,
|
|
@@ -117,7 +123,7 @@ const linkItems = nav.filter((item) => item !== ctaItem);
|
|
|
117
123
|
<a href="#main-content" class="sr-only focus:not-sr-only focus:absolute focus:z-50 focus:top-2 focus:left-2 focus:px-4 focus:py-2 focus:bg-accent-primary focus:text-canvas focus:rounded-md">
|
|
118
124
|
Skip to content
|
|
119
125
|
</a>
|
|
120
|
-
<header class="bg-
|
|
126
|
+
<header class="bg-canvas text-ink border-b border-rule">
|
|
121
127
|
<nav class="max-w-4xl mx-auto flex items-center justify-between px-6 py-4">
|
|
122
128
|
<a href="/" class="flex items-center gap-2 font-display font-semibold tracking-tight transition-opacity hover:opacity-80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-primary focus-visible:rounded">
|
|
123
129
|
<slot name="logo" />
|
|
@@ -128,21 +134,21 @@ const linkItems = nav.filter((item) => item !== ctaItem);
|
|
|
128
134
|
<li><a href={item.href} class="hover:text-accent-primary transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-primary focus-visible:rounded">{item.label}</a></li>
|
|
129
135
|
))}
|
|
130
136
|
</ul>
|
|
131
|
-
|
|
137
|
+
{/* The sign-in CTA (when present) stays visible at every
|
|
132
138
|
width, mobile included -- it's the one thing worth never
|
|
133
139
|
hiding behind the hamburger, matching what was already
|
|
134
140
|
true (if unintentionally, since nothing collapsed at
|
|
135
|
-
all) on Ectropy's own pre-migration login.astro nav.
|
|
141
|
+
all) on Ectropy's own pre-migration login.astro nav. */}
|
|
136
142
|
{ctaItem && (
|
|
137
143
|
<a
|
|
138
144
|
href={ctaItem.href}
|
|
139
|
-
class="inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-md border border-
|
|
145
|
+
class="inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-md border border-rule hover:border-muted transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-secondary focus-visible:rounded text-sm"
|
|
140
146
|
>
|
|
141
147
|
<Icon name="lock" class="w-3.5 h-3.5" />
|
|
142
148
|
{ctaItem.label}
|
|
143
149
|
</a>
|
|
144
150
|
)}
|
|
145
|
-
|
|
151
|
+
{/* Mobile nav trigger -- below md (768px, same breakpoint
|
|
146
152
|
every other responsive class in this file/the wider
|
|
147
153
|
LuhTech dashboard already uses). The nav's own natural
|
|
148
154
|
width (a typical 7-8 item venture nav, ~585-590px)
|
|
@@ -151,14 +157,14 @@ const linkItems = nav.filter((item) => item !== ctaItem);
|
|
|
151
157
|
layout width on mobile (confirmed live via screenshot
|
|
152
158
|
on ectropy.ai, 2026-09-14) -- not a per-page bug, a
|
|
153
159
|
per-nav one, hence the fix living here once rather
|
|
154
|
-
than on every page.
|
|
160
|
+
than on every page. */}
|
|
155
161
|
<button
|
|
156
162
|
type="button"
|
|
157
163
|
id="nav-toggle"
|
|
158
164
|
aria-expanded="false"
|
|
159
165
|
aria-controls="mobile-nav-panel"
|
|
160
166
|
aria-label="Open navigation"
|
|
161
|
-
class="md:hidden flex items-center justify-center w-9 h-9 rounded-md hover:bg-
|
|
167
|
+
class="md:hidden flex items-center justify-center w-9 h-9 rounded-md hover:bg-surface focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-primary"
|
|
162
168
|
>
|
|
163
169
|
<svg id="nav-icon-open" xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="7" x2="20" y2="7"></line><line x1="4" y1="12" x2="20" y2="12"></line><line x1="4" y1="17" x2="20" y2="17"></line></svg>
|
|
164
170
|
<svg id="nav-icon-close" xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="hidden"><line x1="6" y1="6" x2="18" y2="18"></line><line x1="6" y1="18" x2="18" y2="6"></line></svg>
|
|
@@ -174,11 +180,11 @@ const linkItems = nav.filter((item) => item !== ctaItem);
|
|
|
174
180
|
<main id="main-content" class="flex-1 max-w-4xl mx-auto w-full px-6 py-16">
|
|
175
181
|
<slot />
|
|
176
182
|
</main>
|
|
177
|
-
<footer class="bg-
|
|
178
|
-
<div class="max-w-4xl mx-auto px-6 py-8 text-sm text-
|
|
183
|
+
<footer class="bg-canvas text-ink border-t border-rule">
|
|
184
|
+
<div class="max-w-4xl mx-auto px-6 py-8 text-sm text-muted flex items-center justify-between flex-wrap gap-3">
|
|
179
185
|
{!footer.parentHref && <span>{footer.legalLine}</span>}
|
|
180
186
|
{footer.parentHref && (
|
|
181
|
-
<a href={footer.parentHref} class="hover:text-
|
|
187
|
+
<a href={footer.parentHref} class="hover:text-ink transition-colors">{footer.legalLine}</a>
|
|
182
188
|
)}
|
|
183
189
|
</div>
|
|
184
190
|
</footer>
|