@luhtech/site-template 0.10.2 → 0.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luhtech/site-template",
3
- "version": "0.10.2",
3
+ "version": "0.11.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",
@@ -33,7 +33,7 @@ import Diagram from './Diagram.astro';
33
33
  import Icon from './Icon.astro';
34
34
 
35
35
  export interface Props {
36
- block: { blockType: string; text?: string; label?: string; href?: string; diagramId?: string; src?: string; alt?: string; caption?: string };
36
+ block: { blockType: string; text?: string; label?: string; href?: string; diagramId?: string; src?: string; alt?: string; caption?: string; name?: string; title?: string };
37
37
  // This section's own diagrams[] array, only needed when block.blockType
38
38
  // is "diagram" -- the block is a position, diagrams[] stays the data.
39
39
  diagrams?: { diagramId: string; diagramType: string; caption?: string; data: any }[];
@@ -97,6 +97,23 @@ if (block.blockType === 'diagram') {
97
97
  {block.caption && <figcaption class="text-sm text-ink/60 mt-2 text-center">{block.caption}</figcaption>}
98
98
  </figure>
99
99
  )}
100
+ {block.blockType === 'bio' && (
101
+ <div class={`rounded-md border border-ink/15 p-5 ${className}`}>
102
+ <div class="flex items-center gap-3 mb-3">
103
+ <span
104
+ 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"
105
+ aria-hidden="true"
106
+ >
107
+ {(block.name ?? '').split(/\s+/).map((w) => w[0]).join('').slice(0, 2).toUpperCase()}
108
+ </span>
109
+ <div>
110
+ {block.name && <p class="font-display font-semibold leading-tight">{block.name}</p>}
111
+ {block.title && <p class="text-sm text-accent-secondary font-mono uppercase tracking-wide">{block.title}</p>}
112
+ </div>
113
+ </div>
114
+ <p class="text-sm text-ink/80 leading-relaxed">{block.text}</p>
115
+ </div>
116
+ )}
100
117
  {isExternalLink && (
101
118
  <Icon name="external-link" class="inline-block w-3.5 h-3.5 ml-1 align-text-top text-accent-primary/70" />
102
119
  )}
@@ -12,13 +12,33 @@ import type { SectionIcons } from '../Section.astro';
12
12
  export interface Props { section: any; icons?: SectionIcons }
13
13
  const { section, icons } = Astro.props;
14
14
  const sectionIcon = icons?.section?.[section.sectionId];
15
+
16
+ // Bio blocks (e.g. a Founders/Team proof section) read as an enterprise
17
+ // team grid -- side by side on desktop -- rather than stacked paragraphs.
18
+ // Contiguous runs of blockType:"bio" group into one grid; every other
19
+ // blockType renders individually, unchanged.
20
+ const blockRuns: { kind: 'bio' | 'other'; blocks: any[] }[] = [];
21
+ for (const b of section.blocks ?? []) {
22
+ const kind = b.blockType === 'bio' ? 'bio' : 'other';
23
+ const last = blockRuns[blockRuns.length - 1];
24
+ if (last && last.kind === kind) last.blocks.push(b);
25
+ else blockRuns.push({ kind, blocks: [b] });
26
+ }
15
27
  ---
16
28
  <section id={section.sectionId} class="py-8" data-reveal>
17
29
  {section.eyebrow && <p class="text-sm font-mono uppercase tracking-wide text-accent-primary mb-3">{section.eyebrow}</p>}
18
30
  {sectionIcon && <Icon name={sectionIcon} class="w-8 h-8 text-accent-primary mb-3" />}
19
31
  {section.heading && <h2 class="font-display text-2xl font-bold mb-3">{section.heading}</h2>}
20
32
  {section.subheading && <p class="text-ink/80 max-w-2xl mb-4">{section.subheading}</p>}
21
- {section.blocks?.map((b: any) => <Block block={b} class="mb-3" />)}
33
+ {blockRuns.map((run) =>
34
+ run.kind === 'bio' ? (
35
+ <div class="grid gap-4 sm:grid-cols-2 mb-3">
36
+ {run.blocks.map((b) => <Block block={b} />)}
37
+ </div>
38
+ ) : (
39
+ run.blocks.map((b) => <Block block={b} class="mb-3" />)
40
+ )
41
+ )}
22
42
  {section.claims?.length > 0 && (
23
43
  <ul class="space-y-2 mb-6">
24
44
  {section.claims.map((c: any) => <li class="leading-relaxed">{c.text}</li>)}
@@ -3,7 +3,7 @@ import Ajv from 'ajv';
3
3
  import addFormats from 'ajv-formats';
4
4
  import { fetchSchema, fetchSupportSchema } from './schemaFetch.js';
5
5
 
6
- const PAGE_PIN = '1.3.0';
6
+ const PAGE_PIN = '1.4.0';
7
7
  const CAPABILITY_CLAIM_PIN = '0.2.0';
8
8
 
9
9
  let validatorPromise: ReturnType<typeof buildValidator> | null = null;