@luhtech/site-template 0.13.0 → 0.14.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.14.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",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"luhtech": {
|
|
50
50
|
"schemaPins": {
|
|
51
51
|
"content/page.schema.json": "1.3.0",
|
|
52
|
-
"content/site.schema.json": "1.
|
|
52
|
+
"content/site.schema.json": "1.1.0",
|
|
53
53
|
"content/capability-claim.schema.json": "0.2.0",
|
|
54
54
|
"content/tool.schema.json": "1.1.0",
|
|
55
55
|
"portfolio/brand-identity.schema.json": "1.2.0"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Reusable "sign in / continue to the app" card -- lifted from Ectropy's
|
|
3
|
+
// own pre-migration login.astro (2026-09-14 mobile-access pass), which
|
|
4
|
+
// had already proven the right shape live: icon circle, clear single
|
|
5
|
+
// CTA, a subtext naming the real destination host so a visitor knows
|
|
6
|
+
// exactly where clicking takes them before they click. Generalized here
|
|
7
|
+
// so any venture with a real live product (not every venture has one
|
|
8
|
+
// yet) gets the same card instead of reinventing it, matching this
|
|
9
|
+
// template's own "one component, every site" pattern for the nav fix.
|
|
10
|
+
//
|
|
11
|
+
// This card does NOT perform authentication itself -- it's a branded
|
|
12
|
+
// hand-off to wherever the venture's real app/login lives (a different
|
|
13
|
+
// origin almost always, so the actual OAuth/session exchange has to
|
|
14
|
+
// happen there regardless). Sites without a live product don't render
|
|
15
|
+
// this at all.
|
|
16
|
+
import Icon from './Icon.astro';
|
|
17
|
+
|
|
18
|
+
export interface Props {
|
|
19
|
+
logoSrc: string;
|
|
20
|
+
logoAlt: string;
|
|
21
|
+
heading?: string;
|
|
22
|
+
subheading?: string;
|
|
23
|
+
ctaLabel: string;
|
|
24
|
+
ctaHref: string;
|
|
25
|
+
ctaSubtext?: string;
|
|
26
|
+
}
|
|
27
|
+
const {
|
|
28
|
+
logoSrc,
|
|
29
|
+
logoAlt,
|
|
30
|
+
heading = 'Sign in',
|
|
31
|
+
subheading,
|
|
32
|
+
ctaLabel,
|
|
33
|
+
ctaHref,
|
|
34
|
+
ctaSubtext,
|
|
35
|
+
} = Astro.props;
|
|
36
|
+
---
|
|
37
|
+
<section class="flex flex-col items-center text-center">
|
|
38
|
+
<h1 class="font-display text-3xl font-bold mb-2">{heading}</h1>
|
|
39
|
+
{subheading && (
|
|
40
|
+
<p class="opacity-80 max-w-md mb-10" data-reveal>{subheading}</p>
|
|
41
|
+
)}
|
|
42
|
+
<a
|
|
43
|
+
href={ctaHref}
|
|
44
|
+
class="flex flex-col items-center gap-3 p-8 rounded-lg border border-accent-primary/40 bg-accent-primary/5 hover:border-accent-primary/60 transition-all duration-300 hover:shadow-lg hover:-translate-y-1 max-w-xs w-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-primary"
|
|
45
|
+
data-reveal
|
|
46
|
+
>
|
|
47
|
+
<span class="inline-flex items-center justify-center w-12 h-12 rounded-full bg-accent-primary text-canvas overflow-hidden">
|
|
48
|
+
<img src={logoSrc} alt={logoAlt} class="w-6 h-6" />
|
|
49
|
+
</span>
|
|
50
|
+
<div class="font-display text-lg font-semibold inline-flex items-center gap-1.5">
|
|
51
|
+
{ctaLabel}
|
|
52
|
+
<Icon name="external-link" class="w-3.5 h-3.5 opacity-50" />
|
|
53
|
+
</div>
|
|
54
|
+
{ctaSubtext && <p class="text-xs font-mono opacity-50">{ctaSubtext}</p>}
|
|
55
|
+
</a>
|
|
56
|
+
</section>
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
// before this component ever renders.
|
|
11
11
|
import type { LoadedPage } from '../content/loadPage.js';
|
|
12
12
|
import type { LoadedSite } from '../content/loadSite.js';
|
|
13
|
+
import Icon from '../components/Icon.astro';
|
|
13
14
|
|
|
14
15
|
export interface Props {
|
|
15
16
|
site: LoadedSite;
|
|
@@ -25,12 +26,22 @@ const footer = site.footer as { legalLine: string; parentHref?: string };
|
|
|
25
26
|
// remembering to, and skips it if the instance already carries it (fixes
|
|
26
27
|
// the Replique regression where this link was missing entirely).
|
|
27
28
|
const HOLDING_NAV_ITEM = { label: 'LuhTech Holdings', href: 'https://luh.tech' };
|
|
28
|
-
const rawNav = site.nav as Array<{ label: string; href: string }>;
|
|
29
|
+
const rawNav = site.nav as Array<{ label: string; href: string; cta?: boolean }>;
|
|
29
30
|
const ventureRef = site.ventureRef as string | undefined;
|
|
30
31
|
const nav =
|
|
31
32
|
ventureRef && ventureRef !== 'luhtech-business' && !rawNav.some((item) => item.href === HOLDING_NAV_ITEM.href)
|
|
32
33
|
? [...rawNav, HOLDING_NAV_ITEM]
|
|
33
34
|
: rawNav;
|
|
35
|
+
|
|
36
|
+
// content/site.schema.json v1.1.0: nav[].cta marks the one item (a real
|
|
37
|
+
// live product's sign-in URL, already legal as a full https:// href)
|
|
38
|
+
// that renders as a distinct bordered button instead of a plain link --
|
|
39
|
+
// proven live on Ectropy's own pre-migration login.astro before this was
|
|
40
|
+
// generalized. At most one; if an instance ever marks more than one,
|
|
41
|
+
// the first wins and the rest render as plain links rather than the
|
|
42
|
+
// build silently producing several competing buttons.
|
|
43
|
+
const ctaItem = nav.find((item) => item.cta);
|
|
44
|
+
const linkItems = nav.filter((item) => item !== ctaItem);
|
|
34
45
|
---
|
|
35
46
|
<html lang="en" class="no-js">
|
|
36
47
|
<head>
|
|
@@ -67,34 +78,51 @@ const nav =
|
|
|
67
78
|
<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
79
|
<slot name="logo" />
|
|
69
80
|
</a>
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
81
|
+
<div class="flex items-center gap-4">
|
|
82
|
+
<ul class="hidden md:flex items-center gap-6 text-sm">
|
|
83
|
+
{linkItems.map((item) => (
|
|
84
|
+
<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>
|
|
85
|
+
))}
|
|
86
|
+
</ul>
|
|
87
|
+
<!-- The sign-in CTA (when present) stays visible at every
|
|
88
|
+
width, mobile included -- it's the one thing worth never
|
|
89
|
+
hiding behind the hamburger, matching what was already
|
|
90
|
+
true (if unintentionally, since nothing collapsed at
|
|
91
|
+
all) on Ectropy's own pre-migration login.astro nav. -->
|
|
92
|
+
{ctaItem && (
|
|
93
|
+
<a
|
|
94
|
+
href={ctaItem.href}
|
|
95
|
+
class="inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-md border border-canvas/30 hover:border-canvas/60 transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-secondary focus-visible:rounded text-sm"
|
|
96
|
+
>
|
|
97
|
+
<Icon name="lock" class="w-3.5 h-3.5" />
|
|
98
|
+
{ctaItem.label}
|
|
99
|
+
</a>
|
|
100
|
+
)}
|
|
101
|
+
<!-- Mobile nav trigger -- below md (768px, same breakpoint
|
|
102
|
+
every other responsive class in this file/the wider
|
|
103
|
+
LuhTech dashboard already uses). The nav's own natural
|
|
104
|
+
width (a typical 7-8 item venture nav, ~585-590px)
|
|
105
|
+
exceeds every phone viewport with nothing to wrap or
|
|
106
|
+
collapse it, which forced the WHOLE PAGE to that wider
|
|
107
|
+
layout width on mobile (confirmed live via screenshot
|
|
108
|
+
on ectropy.ai, 2026-09-14) -- not a per-page bug, a
|
|
109
|
+
per-nav one, hence the fix living here once rather
|
|
110
|
+
than on every page. -->
|
|
111
|
+
<button
|
|
112
|
+
type="button"
|
|
113
|
+
id="nav-toggle"
|
|
114
|
+
aria-expanded="false"
|
|
115
|
+
aria-controls="mobile-nav-panel"
|
|
116
|
+
aria-label="Open navigation"
|
|
117
|
+
class="md:hidden flex items-center justify-center w-9 h-9 rounded-md hover:bg-canvas/10 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-primary"
|
|
118
|
+
>
|
|
119
|
+
<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>
|
|
120
|
+
<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>
|
|
121
|
+
</button>
|
|
122
|
+
</div>
|
|
95
123
|
</nav>
|
|
96
124
|
<ul id="mobile-nav-panel" class="hidden md:hidden gap-1 px-6 pb-4 text-sm">
|
|
97
|
-
{
|
|
125
|
+
{linkItems.map((item) => (
|
|
98
126
|
<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
127
|
))}
|
|
100
128
|
</ul>
|