@luhtech/site-template 0.12.0 → 0.13.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.
|
|
3
|
+
"version": "0.13.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",
|
|
@@ -70,7 +70,7 @@ if (!Component) {
|
|
|
70
70
|
}
|
|
71
71
|
---
|
|
72
72
|
{section.sectionKind === 'cta' ? (
|
|
73
|
-
<Cta section={section} leadCapture={site?.leadCapture} companyLabel={companyLabel} />
|
|
73
|
+
<Cta section={section} leadCapture={site?.leadCapture} companyLabel={companyLabel} icons={icons} />
|
|
74
74
|
) : section.sectionKind === 'article' ? (
|
|
75
75
|
<Component section={section} icons={icons} tool={tool} toolSubmitEndpoint={toolSubmitEndpoint} route={route} ventureRef={ventureRef} />
|
|
76
76
|
) : (
|
|
@@ -11,16 +11,19 @@ import Block from '../Block.astro';
|
|
|
11
11
|
import CtaLink from '../CtaLink.astro';
|
|
12
12
|
import LeadCaptureForm from '../LeadCaptureForm.astro';
|
|
13
13
|
import SectionHeading from '../SectionHeading.astro';
|
|
14
|
+
import type { SectionIcons } from '../Section.astro';
|
|
14
15
|
|
|
15
16
|
export interface Props {
|
|
16
17
|
section: any;
|
|
17
18
|
leadCapture?: { destination: string; source: string; ventureField: string; honeypotField: string; minSubmitMs?: number };
|
|
18
19
|
companyLabel?: string;
|
|
20
|
+
icons?: SectionIcons;
|
|
19
21
|
}
|
|
20
|
-
const { section, leadCapture, companyLabel } = Astro.props;
|
|
22
|
+
const { section, leadCapture, companyLabel, icons } = Astro.props;
|
|
23
|
+
const sectionIcon = icons?.section?.[section.sectionId];
|
|
21
24
|
---
|
|
22
25
|
<section id={section.sectionId} class="py-12 text-center border-t border-ink/10" data-reveal>
|
|
23
|
-
<SectionHeading eyebrow={section.eyebrow} heading={section.heading} subheading={section.subheading} center class="mb-3" />
|
|
26
|
+
<SectionHeading eyebrow={section.eyebrow} heading={section.heading} subheading={section.subheading} icon={sectionIcon} center class="mb-3" />
|
|
24
27
|
{section.blocks?.map((b: any) => <Block block={b} class="mb-4 max-w-xl mx-auto text-left" />)}
|
|
25
28
|
{leadCapture ? (
|
|
26
29
|
<div class="text-left max-w-md mx-auto">
|
|
@@ -67,12 +67,37 @@ const nav =
|
|
|
67
67
|
<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">
|
|
68
68
|
<slot name="logo" />
|
|
69
69
|
</a>
|
|
70
|
-
<ul class="flex items-center gap-6 text-sm">
|
|
70
|
+
<ul class="hidden md:flex items-center gap-6 text-sm">
|
|
71
71
|
{nav.map((item) => (
|
|
72
72
|
<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>
|
|
73
73
|
))}
|
|
74
74
|
</ul>
|
|
75
|
+
<!-- Mobile nav trigger -- below md (768px, same breakpoint every
|
|
76
|
+
other responsive class in this file/the wider LuhTech
|
|
77
|
+
dashboard already uses). The nav's own natural width (a
|
|
78
|
+
typical 7-8 item venture nav, ~585-590px) exceeds every
|
|
79
|
+
phone viewport with nothing to wrap or collapse it, which
|
|
80
|
+
forced the WHOLE PAGE to that wider layout width on mobile
|
|
81
|
+
(confirmed live via screenshot on ectropy.ai, 2026-09-14) --
|
|
82
|
+
not a per-page bug, a per-nav one, hence the fix living
|
|
83
|
+
here once rather than on every page. -->
|
|
84
|
+
<button
|
|
85
|
+
type="button"
|
|
86
|
+
id="nav-toggle"
|
|
87
|
+
aria-expanded="false"
|
|
88
|
+
aria-controls="mobile-nav-panel"
|
|
89
|
+
aria-label="Open navigation"
|
|
90
|
+
class="md:hidden flex items-center justify-center w-9 h-9 -mr-2 rounded-md hover:bg-canvas/10 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-primary"
|
|
91
|
+
>
|
|
92
|
+
<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>
|
|
93
|
+
<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>
|
|
94
|
+
</button>
|
|
75
95
|
</nav>
|
|
96
|
+
<ul id="mobile-nav-panel" class="hidden md:hidden gap-1 px-6 pb-4 text-sm">
|
|
97
|
+
{nav.map((item) => (
|
|
98
|
+
<li><a href={item.href} class="block py-2 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>
|
|
99
|
+
))}
|
|
100
|
+
</ul>
|
|
76
101
|
</header>
|
|
77
102
|
<main id="main-content" class="flex-1 max-w-4xl mx-auto w-full px-6 py-16">
|
|
78
103
|
<slot />
|
|
@@ -86,6 +111,29 @@ const nav =
|
|
|
86
111
|
</div>
|
|
87
112
|
</footer>
|
|
88
113
|
<script>
|
|
114
|
+
// Mobile nav toggle. Plain click handler + classList, no
|
|
115
|
+
// framework/island needed for something this small -- matches
|
|
116
|
+
// this file's own existing no-js/reveal scripts' own approach.
|
|
117
|
+
// Navigating away (a real page load, not an SPA route change)
|
|
118
|
+
// resets this state for free; no pathname-watching needed the
|
|
119
|
+
// way a persisted SPA sidebar would.
|
|
120
|
+
const navToggle = document.getElementById('nav-toggle');
|
|
121
|
+
const navPanel = document.getElementById('mobile-nav-panel');
|
|
122
|
+
const iconOpen = document.getElementById('nav-icon-open');
|
|
123
|
+
const iconClose = document.getElementById('nav-icon-close');
|
|
124
|
+
if (navToggle && navPanel && iconOpen && iconClose) {
|
|
125
|
+
navToggle.addEventListener('click', () => {
|
|
126
|
+
const isOpen = navToggle.getAttribute('aria-expanded') === 'true';
|
|
127
|
+
navToggle.setAttribute('aria-expanded', String(!isOpen));
|
|
128
|
+
navToggle.setAttribute('aria-label', isOpen ? 'Open navigation' : 'Close navigation');
|
|
129
|
+
navPanel.classList.toggle('hidden', isOpen);
|
|
130
|
+
navPanel.classList.toggle('flex', !isOpen);
|
|
131
|
+
navPanel.classList.toggle('flex-col', !isOpen);
|
|
132
|
+
iconOpen.classList.toggle('hidden', !isOpen);
|
|
133
|
+
iconClose.classList.toggle('hidden', isOpen);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
89
137
|
// Content already on screen at load must never depend on a scroll
|
|
90
138
|
// event or an async observer callback to become visible -- real
|
|
91
139
|
// user report (2026-09-09): the insights index's card grid sits
|