@ninjainfosys/site-kit 0.0.0-stage → 0.2.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 +99 -2
- package/bin/site-kit.mjs +24 -0
- package/package.json +40 -4
- package/src/components/blog/Pager.astro +60 -0
- package/src/components/blog/PostCard.astro +53 -0
- package/src/components/blog/PostList.astro +21 -0
- package/src/components/blog/Story.astro +63 -0
- package/src/components/blog/Topics.astro +23 -0
- package/src/components/seo/Seo.astro +46 -0
- package/src/components/site/CtaBand.astro +21 -0
- package/src/components/site/DashainPopup.astro +324 -0
- package/src/components/site/Faq.astro +37 -0
- package/src/components/site/Footer.astro +66 -0
- package/src/components/site/Header.astro +311 -0
- package/src/components/site/Related.astro +44 -0
- package/src/config.ts +56 -0
- package/src/contract.ts +181 -0
- package/src/integration.d.mts +4 -0
- package/src/integration.mjs +96 -0
- package/src/layouts/Base.astro +65 -0
- package/src/lib/blog-schema.ts +60 -0
- package/src/lib/blog.ts +64 -0
- package/src/lib/glossary-types.ts +25 -0
- package/src/lib/glossary.ts +21 -0
- package/src/lib/posts.ts +22 -0
- package/src/lib/rehype-figures.mjs +25 -0
- package/src/lib/seo.ts +176 -0
- package/src/pages/blog/[slug].astro +274 -0
- package/src/pages/blog/index.astro +111 -0
- package/src/pages/blog/page/[page].astro +32 -0
- package/src/pages/blog/tag/[tag].astro +38 -0
- package/src/pages/glossary/[slug].astro +125 -0
- package/src/pages/glossary/index.astro +51 -0
- package/src/pages/llms.txt.ts +25 -0
- package/src/pages/og/[...slug].png.ts +61 -0
- package/src/pages/rss.xml.ts +23 -0
- package/src/scripts/a11y.mjs +38 -0
- package/src/scripts/check-credits.mjs +31 -0
- package/src/scripts/check-site.mjs +198 -0
- package/src/scripts/commons.mjs +106 -0
- package/src/scripts/config.mjs +19 -0
- package/src/scripts/indexnow.mjs +25 -0
- package/src/scripts/redirects.mjs +55 -0
- package/src/scripts/sitemap.mjs +173 -0
- package/src/styles/base.css +164 -0
- package/src/styles/blog-serif.css +2 -0
- package/src/styles/motion.css +20 -0
- package/src/virtual.d.ts +4 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Writes dist/sitemap.xml from the built pages themselves, so the sitemap can
|
|
3
|
+
// never disagree with what is served. A page is listed only when it is
|
|
4
|
+
// indexable: it has a self-referencing canonical, no `noindex`, and is not an
|
|
5
|
+
// error page. Each entry carries an honest lastmod (post dates, else the last
|
|
6
|
+
// git commit touching the page's sources) and its images.
|
|
7
|
+
//
|
|
8
|
+
// site-kit sitemap dist
|
|
9
|
+
import { readFileSync, writeFileSync, readdirSync, statSync, existsSync } from 'node:fs';
|
|
10
|
+
import { join, relative } from 'node:path';
|
|
11
|
+
import { execFileSync } from 'node:child_process';
|
|
12
|
+
import { pathToFileURL } from 'node:url';
|
|
13
|
+
import { parse } from 'node-html-parser';
|
|
14
|
+
import { config, requireSite } from './config.mjs';
|
|
15
|
+
|
|
16
|
+
export const SITE = requireSite();
|
|
17
|
+
const NOT_PAGES = new RegExp(`^/(${['og', ...(config.sitemap?.notPages ?? [])].join('|')})(/|$)`);
|
|
18
|
+
const MAX_URLS = 50000;
|
|
19
|
+
const MAX_BYTES = 50 * 1024 * 1024;
|
|
20
|
+
|
|
21
|
+
/** dist file -> public path: `blog/x.html` -> `/blog/x`, `index.html` -> `/`. */
|
|
22
|
+
export function pathFor(file) {
|
|
23
|
+
const p = `/${file.replace(/\\/g, '/').replace(/\.html$/, '')}`;
|
|
24
|
+
if (p === '/index') return '/';
|
|
25
|
+
return p.replace(/\/index$/, '');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const urlFor = (path) => (path === '/' ? `${SITE}/` : `${SITE}${path}`);
|
|
29
|
+
|
|
30
|
+
const xmlEscape = (s) =>
|
|
31
|
+
s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
|
32
|
+
|
|
33
|
+
/** Reads what the sitemap needs from one built page. */
|
|
34
|
+
export function readPage(html, path) {
|
|
35
|
+
const root = parse(html);
|
|
36
|
+
const meta = (sel) => root.querySelector(sel)?.getAttribute('content') ?? null;
|
|
37
|
+
const robots = (meta('meta[name="robots"]') ?? '').toLowerCase();
|
|
38
|
+
const canonical = root.querySelector('link[rel="canonical"]')?.getAttribute('href') ?? null;
|
|
39
|
+
const images = new Set();
|
|
40
|
+
const og = meta('meta[property="og:image"]');
|
|
41
|
+
if (og) images.add(og);
|
|
42
|
+
for (const img of root.querySelectorAll('main img')) {
|
|
43
|
+
const src = img.getAttribute('src');
|
|
44
|
+
if (src && !src.startsWith('data:')) images.add(new URL(src, urlFor(path)).href);
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
path,
|
|
48
|
+
canonical,
|
|
49
|
+
noindex: /\bnoindex\b|\bnone\b/.test(robots),
|
|
50
|
+
modified: meta('meta[property="article:modified_time"]') ?? meta('meta[property="article:published_time"]'),
|
|
51
|
+
images: [...images].filter((u) => u.startsWith(SITE)),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Why a page is left out, or null when it belongs in the sitemap. */
|
|
56
|
+
export function exclusion(page) {
|
|
57
|
+
if (page.path === '/404' || NOT_PAGES.test(page.path)) return 'not a page';
|
|
58
|
+
if (page.noindex) return 'noindex';
|
|
59
|
+
if (!page.canonical) return 'no canonical';
|
|
60
|
+
if (page.canonical !== urlFor(page.path)) return `canonical points to ${page.canonical}`;
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Source files whose last commit dates a page. */
|
|
65
|
+
export function sourcesFor(path) {
|
|
66
|
+
const data = { products: 'src/data/products.ts', solutions: 'src/data/solutions.ts' };
|
|
67
|
+
if (path === '/') return ['src/pages/index.astro', 'src/components/home', 'src/data/products.ts'];
|
|
68
|
+
// The glossary index is as new as its newest term.
|
|
69
|
+
if (path === '/glossary') return ['src/data/glossary/terms'];
|
|
70
|
+
const [, section, slug] = path.split('/');
|
|
71
|
+
if (data[section] && slug) return [`src/pages/${section}/[slug].astro`, data[section]];
|
|
72
|
+
return [`src/pages${path}.astro`, `src/pages${path}`];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function gitDate(files) {
|
|
76
|
+
const present = files.filter((f) => existsSync(f));
|
|
77
|
+
if (!present.length) return null;
|
|
78
|
+
try {
|
|
79
|
+
const out = execFileSync('git', ['log', '-1', '--format=%cI', '--', ...present], { encoding: 'utf8' }).trim();
|
|
80
|
+
return out || null;
|
|
81
|
+
} catch {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** W3C datetime, date only: the precision we can honestly claim. */
|
|
87
|
+
export const day = (iso) => (iso ? new Date(iso).toISOString().slice(0, 10) : null);
|
|
88
|
+
|
|
89
|
+
export function toXml(entries) {
|
|
90
|
+
const urls = entries.map((e) => {
|
|
91
|
+
const lines = [` <url>`, ` <loc>${xmlEscape(e.loc)}</loc>`];
|
|
92
|
+
if (e.lastmod) lines.push(` <lastmod>${e.lastmod}</lastmod>`);
|
|
93
|
+
for (const img of e.images) lines.push(` <image:image><image:loc>${xmlEscape(img)}</image:loc></image:image>`);
|
|
94
|
+
lines.push(` </url>`);
|
|
95
|
+
return lines.join('\n');
|
|
96
|
+
});
|
|
97
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
98
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
|
|
99
|
+
${urls.join('\n')}
|
|
100
|
+
</urlset>
|
|
101
|
+
`;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** Hard checks on the finished list; any failure stops the build. */
|
|
105
|
+
export function validate(entries, xml, exists) {
|
|
106
|
+
const errors = [];
|
|
107
|
+
const seen = new Set();
|
|
108
|
+
for (const e of entries) {
|
|
109
|
+
if (seen.has(e.loc)) errors.push(`duplicate ${e.loc}`);
|
|
110
|
+
seen.add(e.loc);
|
|
111
|
+
if (!e.loc.startsWith(`${SITE}/`)) errors.push(`foreign or relative loc ${e.loc}`);
|
|
112
|
+
if (e.loc !== `${SITE}/` && e.loc.endsWith('/')) errors.push(`trailing slash ${e.loc}`);
|
|
113
|
+
if (/[?#]/.test(e.loc)) errors.push(`query or fragment in ${e.loc}`);
|
|
114
|
+
if (e.loc !== e.loc.toLowerCase()) errors.push(`uppercase in ${e.loc}`);
|
|
115
|
+
if (e.lastmod && !/^\d{4}-\d{2}-\d{2}$/.test(e.lastmod)) errors.push(`bad lastmod ${e.lastmod} on ${e.loc}`);
|
|
116
|
+
if (e.lastmod && e.lastmod > day(new Date(Date.now() + 345 * 60000).toISOString())) errors.push(`future lastmod on ${e.loc}`);
|
|
117
|
+
for (const img of e.images) if (!exists(img)) errors.push(`missing image ${img} on ${e.loc}`);
|
|
118
|
+
}
|
|
119
|
+
if (!seen.has(`${SITE}/`)) errors.push('home page missing');
|
|
120
|
+
if (entries.length > MAX_URLS) errors.push(`${entries.length} urls exceeds ${MAX_URLS}`);
|
|
121
|
+
if (Buffer.byteLength(xml) > MAX_BYTES) errors.push('sitemap exceeds 50 MB');
|
|
122
|
+
return errors;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function htmlFiles(dir, base = dir) {
|
|
126
|
+
return readdirSync(dir).flatMap((name) => {
|
|
127
|
+
const full = join(dir, name);
|
|
128
|
+
if (statSync(full).isDirectory()) return htmlFiles(full, base);
|
|
129
|
+
return name.endsWith('.html') ? [relative(base, full)] : [];
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function build(dist) {
|
|
134
|
+
const pages = htmlFiles(dist).map((f) => readPage(readFileSync(join(dist, f), 'utf8'), pathFor(f)));
|
|
135
|
+
const skipped = [];
|
|
136
|
+
const listed = pages.filter((p) => {
|
|
137
|
+
const why = exclusion(p);
|
|
138
|
+
if (why) skipped.push(`${p.path}: ${why}`);
|
|
139
|
+
return !why;
|
|
140
|
+
});
|
|
141
|
+
// Blog index and tag pages change when their newest post does.
|
|
142
|
+
const posts = listed.filter((p) => p.modified);
|
|
143
|
+
const newestIn = (pred) => posts.filter(pred).map((p) => p.modified).sort().at(-1) ?? null;
|
|
144
|
+
const entries = listed
|
|
145
|
+
.map((p) => {
|
|
146
|
+
let iso = p.modified;
|
|
147
|
+
if (!iso && p.path.startsWith('/blog')) {
|
|
148
|
+
const tag = p.path.match(/^\/blog\/tag\/([^/]+)$/)?.[1];
|
|
149
|
+
iso = newestIn((q) => !tag || readFileSync(join(dist, `${q.path.slice(1)}.html`), 'utf8').includes(`/blog/tag/${tag}"`));
|
|
150
|
+
}
|
|
151
|
+
iso ??= gitDate(sourcesFor(p.path));
|
|
152
|
+
return { loc: urlFor(p.path), lastmod: day(iso), images: p.images };
|
|
153
|
+
})
|
|
154
|
+
.sort((a, b) => (a.loc === `${SITE}/` ? -1 : b.loc === `${SITE}/` ? 1 : a.loc.localeCompare(b.loc)));
|
|
155
|
+
const xml = toXml(entries);
|
|
156
|
+
const exists = (url) => {
|
|
157
|
+
const rel = decodeURIComponent(new URL(url).pathname).slice(1);
|
|
158
|
+
return existsSync(join(dist, rel));
|
|
159
|
+
};
|
|
160
|
+
return { entries, xml, skipped, errors: validate(entries, xml, exists) };
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
|
|
164
|
+
const dist = process.argv[2] ?? 'dist';
|
|
165
|
+
const { entries, xml, skipped, errors } = build(dist);
|
|
166
|
+
if (errors.length) {
|
|
167
|
+
console.error(`sitemap: ${errors.length} problem(s)\n ${errors.join('\n ')}`);
|
|
168
|
+
process.exit(1);
|
|
169
|
+
}
|
|
170
|
+
writeFileSync(join(dist, 'sitemap.xml'), xml);
|
|
171
|
+
const imgs = entries.reduce((n, e) => n + e.images.length, 0);
|
|
172
|
+
console.log(`sitemap: ${entries.length} urls, ${imgs} images, ${skipped.length} left out (${skipped.join('; ')})`);
|
|
173
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/* Fonts are the site's: its stylesheet imports Inter and Source Serif before this file. */
|
|
2
|
+
@font-face { font-family: 'Serif Fallback'; src: local('Georgia'); size-adjust: 92%; ascent-override: 98%; descent-override: 31%; line-gap-override: 0%; }
|
|
3
|
+
@font-face { font-family: 'Inter Fallback'; src: local('Arial'), local('Helvetica Neue'), local('Helvetica'); size-adjust: 107%; ascent-override: 90%; descent-override: 22.5%; line-gap-override: 0%; }
|
|
4
|
+
|
|
5
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
6
|
+
|
|
7
|
+
html {
|
|
8
|
+
background: var(--canvas);
|
|
9
|
+
-webkit-text-size-adjust: 100%;
|
|
10
|
+
text-size-adjust: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
body {
|
|
14
|
+
margin: 0;
|
|
15
|
+
min-height: 100vh;
|
|
16
|
+
background: var(--canvas);
|
|
17
|
+
color: var(--ink);
|
|
18
|
+
font-family: var(--font-sans);
|
|
19
|
+
font-size: 18px;
|
|
20
|
+
line-height: 1.5;
|
|
21
|
+
overflow-x: hidden;
|
|
22
|
+
text-rendering: optimizeLegibility;
|
|
23
|
+
-webkit-font-smoothing: antialiased;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (max-width: 479px) {
|
|
27
|
+
body { font-size: 16px; }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
h1, h2, h3, h4, .display {
|
|
31
|
+
font-family: var(--font-display);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
h1, h2, h3, h4 {
|
|
35
|
+
margin: 0;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
line-height: 1.12;
|
|
38
|
+
letter-spacing: 0;
|
|
39
|
+
text-wrap: balance;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.display { font-size: clamp(2.25rem, 1.2rem + 4.2vw, 4.5rem); line-height: 1.04; }
|
|
43
|
+
h1 { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); }
|
|
44
|
+
h2 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); }
|
|
45
|
+
h3 { font-size: 1.375rem; line-height: 1.25; }
|
|
46
|
+
|
|
47
|
+
p { margin: 0; text-wrap: pretty; }
|
|
48
|
+
p + p { margin-top: 1em; }
|
|
49
|
+
|
|
50
|
+
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
|
|
51
|
+
a:hover { text-decoration-thickness: 2px; }
|
|
52
|
+
|
|
53
|
+
img, svg, video, canvas { display: block; max-width: 100%; }
|
|
54
|
+
img { height: auto; }
|
|
55
|
+
|
|
56
|
+
button, input, select, textarea { font: inherit; color: inherit; }
|
|
57
|
+
|
|
58
|
+
:focus-visible {
|
|
59
|
+
outline: 2px solid var(--link);
|
|
60
|
+
outline-offset: 2px;
|
|
61
|
+
border-radius: 2px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
.wrap {
|
|
66
|
+
width: 100%;
|
|
67
|
+
max-width: var(--max-width);
|
|
68
|
+
margin-inline: auto;
|
|
69
|
+
padding-inline: var(--gutter);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.muted { color: var(--ink-muted); }
|
|
73
|
+
.small { font-size: 16px; }
|
|
74
|
+
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
|
|
75
|
+
|
|
76
|
+
.visually-hidden {
|
|
77
|
+
position: absolute !important;
|
|
78
|
+
width: 1px; height: 1px;
|
|
79
|
+
padding: 0; margin: -1px;
|
|
80
|
+
overflow: hidden; clip: rect(0 0 0 0);
|
|
81
|
+
white-space: nowrap; border: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.skip-link {
|
|
85
|
+
position: absolute;
|
|
86
|
+
left: var(--space-4);
|
|
87
|
+
top: -100px;
|
|
88
|
+
z-index: 100;
|
|
89
|
+
padding: var(--space-3) var(--space-4);
|
|
90
|
+
background: var(--surface);
|
|
91
|
+
color: var(--ink);
|
|
92
|
+
border: 1px solid var(--line);
|
|
93
|
+
border-radius: var(--radius-control);
|
|
94
|
+
}
|
|
95
|
+
.skip-link:focus { top: var(--space-4); }
|
|
96
|
+
|
|
97
|
+
/* Buttons */
|
|
98
|
+
.btn {
|
|
99
|
+
display: inline-flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
gap: var(--space-2);
|
|
103
|
+
min-height: 48px;
|
|
104
|
+
padding: 0 var(--space-5);
|
|
105
|
+
border-radius: var(--radius-control);
|
|
106
|
+
border: 1px solid transparent;
|
|
107
|
+
font-size: 17px;
|
|
108
|
+
font-weight: 600;
|
|
109
|
+
line-height: 1;
|
|
110
|
+
text-decoration: none;
|
|
111
|
+
white-space: nowrap;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
|
|
114
|
+
}
|
|
115
|
+
.btn-primary { background: var(--brand); color: var(--on-brand); }
|
|
116
|
+
.btn-primary:hover { background: var(--ink); }
|
|
117
|
+
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
|
|
118
|
+
.btn-secondary:hover { border-color: var(--ink); }
|
|
119
|
+
.on-stage .btn-secondary { color: var(--stage-ink); border-color: var(--stage-line); }
|
|
120
|
+
.on-stage .btn-secondary:hover { border-color: var(--stage-ink); }
|
|
121
|
+
|
|
122
|
+
/* Sections: space above a heading is larger than below it. */
|
|
123
|
+
.section { padding-block: var(--space-9); }
|
|
124
|
+
.section-tight { padding-block: var(--space-8); }
|
|
125
|
+
@media (max-width: 767px) {
|
|
126
|
+
.section { padding-block: var(--space-8); }
|
|
127
|
+
.section-tight { padding-block: var(--space-7); }
|
|
128
|
+
}
|
|
129
|
+
.section > .wrap > h2:first-child { margin-bottom: var(--space-6); }
|
|
130
|
+
|
|
131
|
+
.on-stage { background: var(--stage); color: var(--stage-ink); }
|
|
132
|
+
.on-stage .muted { color: var(--stage-muted); }
|
|
133
|
+
.on-stage a:not(.btn) { color: var(--stage-ink); }
|
|
134
|
+
|
|
135
|
+
/* Long-form text */
|
|
136
|
+
.prose { max-width: var(--measure); }
|
|
137
|
+
.prose h2 { font-size: 1.75rem; margin: var(--space-7) 0 var(--space-4); }
|
|
138
|
+
.prose h3 { margin: var(--space-6) 0 var(--space-3); }
|
|
139
|
+
.prose p, .prose ul, .prose ol { margin: 0 0 var(--space-4); }
|
|
140
|
+
.prose li + li { margin-top: var(--space-2); }
|
|
141
|
+
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
|
|
142
|
+
.prose th, .prose td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); vertical-align: top; }
|
|
143
|
+
.prose .table-scroll { overflow-x: auto; margin: 0 0 var(--space-5); }
|
|
144
|
+
.prose blockquote { margin: 0 0 var(--space-4); padding-left: var(--space-4); border-left: 2px solid var(--line); color: var(--ink-muted); }
|
|
145
|
+
.prose img { border-radius: var(--radius-panel); margin: var(--space-5) 0; }
|
|
146
|
+
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--subtle); padding: 0.1em 0.3em; border-radius: 4px; }
|
|
147
|
+
|
|
148
|
+
/* Entrance: content is visible by default; JS adds .reveal-ready to animate. */
|
|
149
|
+
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(8px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
|
|
150
|
+
.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }
|
|
151
|
+
/* Lists marked data-stagger rise in one row after another once their section is in view. */
|
|
152
|
+
.reveal-ready [data-reveal] [data-stagger] > * { opacity: 0; transform: translateY(14px); transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(var(--i, 0) * 70ms + 120ms); }
|
|
153
|
+
.reveal-ready [data-reveal].is-in [data-stagger] > * { opacity: 1; transform: none; }
|
|
154
|
+
|
|
155
|
+
@media (prefers-reduced-motion: reduce) {
|
|
156
|
+
*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
|
|
157
|
+
.reveal-ready [data-reveal], .reveal-ready [data-reveal] [data-stagger] > * { opacity: 1; transform: none; }
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@media print {
|
|
161
|
+
.site-header, .site-footer, .no-print { display: none !important; }
|
|
162
|
+
body { background: #FFFFFF; color: #000000; font-size: 12pt; }
|
|
163
|
+
a { color: inherit; }
|
|
164
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* Scroll and entrance motion. Everything here is decoration: content is
|
|
2
|
+
fully visible without it, and none of it runs under reduced motion.
|
|
3
|
+
Scroll-linked effects use native scroll-driven animations where the
|
|
4
|
+
browser has them; elsewhere the page simply stays still. */
|
|
5
|
+
|
|
6
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
7
|
+
/* Hero on load: headline words rise out of a mask, then actions and orb. */
|
|
8
|
+
.hero .display .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
|
|
9
|
+
.hero .display .w > span { display: inline-block; animation: rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i) * 70ms + 80ms); }
|
|
10
|
+
.hero .actions { animation: fade-up 700ms cubic-bezier(0.16, 1, 0.3, 1) 520ms both; }
|
|
11
|
+
.hero .stage { animation: settle 1100ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both; }
|
|
12
|
+
|
|
13
|
+
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
|
|
14
|
+
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
|
|
15
|
+
/* Page entrances outside the home hero: elements marked data-enter rise in
|
|
16
|
+
on load, in the order given by --d. CSS only, so nothing waits on JS. */
|
|
17
|
+
[data-enter] { animation: fade-up 700ms cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--d, 0) * 80ms + 60ms); }
|
|
18
|
+
@keyframes settle { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
|
|
19
|
+
|
|
20
|
+
}
|
package/src/virtual.d.ts
ADDED