@janga/norna 0.7.22 → 0.7.24
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 +14 -18
- package/astro.config.mjs +15 -0
- package/bin/norna-cli.mjs +8 -2
- package/package.json +28 -3
- package/schemas/category.schema.json +2 -2
- package/schemas/config.schema.json +52 -24
- package/schemas/content-frontmatter.schema.json +25 -5
- package/schemas/page-theme.schema.json +53 -25
- package/schemas/sitewide-content.schema.json +19 -18
- package/schemas/theme.schema.json +385 -252
- package/scripts/build-site.mjs +1 -0
- package/scripts/check-config.mjs +36 -5
- package/scripts/deploy-site.mjs +0 -1
- package/scripts/dev-local.mjs +175 -112
- package/scripts/generate-search-index.mjs +57 -0
- package/scripts/init-site.mjs +1 -0
- package/scripts/lib/code-fence-metadata.mjs +223 -0
- package/scripts/lib/content-sync-apply.mjs +34 -0
- package/scripts/lib/content-sync-plan.mjs +179 -0
- package/scripts/lib/edit-source-link.mjs +49 -0
- package/scripts/lib/editor-language-service.mjs +160 -12
- package/scripts/lib/heading-ids.mjs +1 -1
- package/scripts/lib/image-presentation.mjs +6 -0
- package/scripts/lib/markdown-links.mjs +182 -0
- package/scripts/lib/navigation-model.mjs +44 -12
- package/scripts/lib/navigation-review.mjs +396 -0
- package/scripts/lib/norna-markdown-blocks.mjs +74 -26
- package/scripts/lib/norna-markdown-render-plugin.mjs +64 -1
- package/scripts/lib/page-aliases.mjs +184 -0
- package/scripts/lib/page-markdown.mjs +88 -7
- package/scripts/lib/page-move-plan.mjs +659 -0
- package/scripts/lib/presentation-palette-metadata.mjs +1 -1
- package/scripts/lib/presentation.mjs +10 -37
- package/scripts/lib/project-config.mjs +146 -19
- package/scripts/lib/public-asset-conventions.mjs +36 -2
- package/scripts/lib/schema-definitions.mjs +43 -15
- package/scripts/lib/schema-editor-metadata.mjs +60 -32
- package/scripts/lib/schema-value-definitions.mjs +6 -2
- package/scripts/lib/semantic-callouts.mjs +128 -0
- package/scripts/lib/site-content.mjs +28 -5
- package/scripts/lib/site-link-graph.mjs +357 -0
- package/scripts/lib/site-navigation-tree.mjs +85 -0
- package/scripts/lib/site-page-urls.mjs +10 -0
- package/scripts/lib/sitemap.mjs +34 -0
- package/scripts/lib/social-image-assets.mjs +30 -0
- package/scripts/lib/theme-presets.mjs +53 -25
- package/scripts/lib/theme-profiles.mjs +6 -8
- package/scripts/lib/yaml-config.mjs +6 -2
- package/scripts/move-site-page.mjs +256 -0
- package/scripts/review-navigation.mjs +32 -0
- package/scripts/sync-content-sections.mjs +182 -216
- package/scripts/sync-site-public.mjs +43 -3
- package/src/components/CodeBlockCopyScript.astro +97 -0
- package/src/components/DisplaySettings.astro +4 -4
- package/src/components/EditSourceLink.astro +17 -0
- package/src/components/ImageCarousel.astro +6 -3
- package/src/components/NavigationPageTree.astro +81 -86
- package/src/components/NavigationTreeControls.astro +77 -0
- package/src/components/PageAliasRedirect.astro +49 -0
- package/src/components/PageContentsNavigation.astro +21 -0
- package/src/components/PageList.astro +33 -0
- package/src/components/PageSequenceNavigation.astro +37 -0
- package/src/components/SearchPage.astro +151 -0
- package/src/components/SectionNavigationScript.astro +62 -6
- package/src/components/SiteNavigation.astro +50 -11
- package/src/components/SitePage.astro +113 -20
- package/src/components/SiteSection.astro +16 -3
- package/src/components/SiteTreeNavigation.astro +8 -2
- package/src/components/TreeNavigationScript.astro +207 -26
- package/src/content.config.ts +5 -2
- package/src/layouts/BaseLayout.astro +71 -10
- package/src/lib/readerPreferencesScript.mjs +2 -2
- package/src/lib/sectionContent.ts +32 -3
- package/src/lib/siteNavigation.ts +31 -52
- package/src/lib/sitePages.ts +3 -2
- package/src/lib/sitePublicAssets.ts +1 -0
- package/src/pages/404.astro +110 -0
- package/src/pages/[...slug].astro +45 -8
- package/src/styles/content.css +718 -0
- package/src/styles/foundations.css +284 -0
- package/src/styles/global.css +6 -2510
- package/src/styles/media.css +518 -0
- package/src/styles/navigation.css +526 -0
- package/src/styles/page-layout.css +786 -0
- package/src/styles/responsive.css +594 -0
- package/starters/basic/README.md +6 -19
- package/starters/basic/package.json +1 -0
- package/starters/basic/site/pages/000-home/content.md +13 -50
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/* Foundations: tokens, Appearance variants, global elements, and accessibility primitives. */
|
|
2
|
+
|
|
3
|
+
*,
|
|
4
|
+
*::before,
|
|
5
|
+
*::after {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
--color-page: var(--palette-light-page-background, #fff);
|
|
11
|
+
--color-primary-text: var(--palette-light-primary-text, var(--palette-light-page-text, #17201d));
|
|
12
|
+
--color-secondary-text: var(--palette-light-secondary-text, #5e655f);
|
|
13
|
+
--color-link-text: var(--palette-light-link-text, #38645a);
|
|
14
|
+
--color-focus-ring: var(--palette-light-focus-ring, #17201d);
|
|
15
|
+
--color-focus-ring-contrast: var(--palette-light-focus-ring-contrast, #fff);
|
|
16
|
+
--color-selection-background: var(--palette-light-selection-background, #17201d);
|
|
17
|
+
--color-selection-text: var(--palette-light-selection-text, #fff);
|
|
18
|
+
--color-control-background: var(--palette-light-control-background, rgb(0 0 0 / 70%));
|
|
19
|
+
--color-control-background-active: var(--palette-light-control-background-active, rgb(0 0 0 / 86%));
|
|
20
|
+
--color-control-text: var(--palette-light-control-text, #fff);
|
|
21
|
+
--color-code-background: var(--palette-light-code-background, #0d1117);
|
|
22
|
+
--color-code-text: var(--palette-light-code-text, #f0f6fc);
|
|
23
|
+
--color-warning-accent: var(--palette-light-warning-accent, #7a5600);
|
|
24
|
+
--color-warning-surface: var(--palette-light-warning-surface, #fff4c2);
|
|
25
|
+
--color-warning-text: var(--palette-light-warning-text, #3b2b00);
|
|
26
|
+
--color-error-accent: var(--palette-light-error-accent, #a12d2d);
|
|
27
|
+
--color-error-surface: var(--palette-light-error-surface, #fce8e8);
|
|
28
|
+
--color-error-text: var(--palette-light-error-text, #5f1616);
|
|
29
|
+
--color-success-accent: var(--palette-light-success-accent, #17643c);
|
|
30
|
+
--color-success-surface: var(--palette-light-success-surface, #e4f4e9);
|
|
31
|
+
--color-success-text: var(--palette-light-success-text, #12472e);
|
|
32
|
+
--color-text: var(--color-primary-text);
|
|
33
|
+
--color-surface: var(--palette-light-surface, #f7f8f7);
|
|
34
|
+
--color-muted: var(--color-secondary-text);
|
|
35
|
+
--color-soft: var(--palette-light-soft, #d9dfda);
|
|
36
|
+
--color-accent: var(--color-link-text);
|
|
37
|
+
--color-border: var(--palette-light-border, rgb(0 0 0 / 14%));
|
|
38
|
+
--color-nav-separator: var(--palette-light-nav-separator, rgb(0 0 0 / 20%));
|
|
39
|
+
--color-frame-background: var(--palette-light-frame-background, #fff);
|
|
40
|
+
--color-frame-text: var(--palette-light-frame-text, #17201d);
|
|
41
|
+
--color-surface-base-background: var(--palette-light-surface-base-background, #fff);
|
|
42
|
+
--color-surface-base-text: var(--palette-light-surface-base-text, #17201d);
|
|
43
|
+
--color-surface-base-secondary-text: var(--palette-light-surface-base-secondary-text, #555b57);
|
|
44
|
+
--color-surface-soft-background: var(--palette-light-surface-soft-background, #f1f4f2);
|
|
45
|
+
--color-surface-soft-text: var(--palette-light-surface-soft-text, #17201d);
|
|
46
|
+
--color-surface-soft-secondary-text: var(--palette-light-surface-soft-secondary-text, #555b57);
|
|
47
|
+
--color-surface-emphasis-background: var(--palette-light-surface-emphasis-background, #dde7e1);
|
|
48
|
+
--color-surface-emphasis-text: var(--palette-light-surface-emphasis-text, #17201d);
|
|
49
|
+
--color-surface-emphasis-secondary-text: var(--palette-light-surface-emphasis-secondary-text, #555b57);
|
|
50
|
+
--font-sans: Arial, 'Helvetica Neue', Helvetica, sans-serif;
|
|
51
|
+
--font-serif: Georgia, 'Times New Roman', serif;
|
|
52
|
+
--page-width: 1180px;
|
|
53
|
+
--text-width: 680px;
|
|
54
|
+
--image-width: 900px;
|
|
55
|
+
--image-max-available-width-desktop: 100%;
|
|
56
|
+
--image-max-available-width-mobile: 100%;
|
|
57
|
+
--image-max-available-width: var(--image-max-available-width-desktop);
|
|
58
|
+
--image-layout-width: min(var(--image-width), var(--image-max-available-width));
|
|
59
|
+
--image-max-height-desktop: 74svh;
|
|
60
|
+
--image-max-height-mobile: 68svh;
|
|
61
|
+
--image-max-height: var(--image-max-height-desktop);
|
|
62
|
+
--nav-top-safety-inset: 0px;
|
|
63
|
+
|
|
64
|
+
--space-nav-to-first-section-desktop: clamp(1.875rem, 3vw, 2.75rem);
|
|
65
|
+
--space-nav-to-first-section-mobile: 1.375rem;
|
|
66
|
+
--space-nav-to-first-section: var(--space-nav-to-first-section-desktop);
|
|
67
|
+
--space-content-block-gap-desktop: 1.5em;
|
|
68
|
+
--space-content-block-gap-mobile: 1.25em;
|
|
69
|
+
--space-content-block-gap: var(--space-content-block-gap-desktop);
|
|
70
|
+
--space-card-list-after: 0.5em;
|
|
71
|
+
--space-heading-to-block-desktop: 0.75em;
|
|
72
|
+
--space-heading-to-block-mobile: 0.7em;
|
|
73
|
+
--space-heading-to-block: var(--space-heading-to-block-desktop);
|
|
74
|
+
--space-image-item-desktop: clamp(1.5rem, 3.5vw, 2.75rem);
|
|
75
|
+
--space-image-item-mobile: 2.75rem;
|
|
76
|
+
--space-image-item: var(--space-image-item-desktop);
|
|
77
|
+
--space-section-to-section-desktop: clamp(2.55rem, 4.2vw, 3.9rem);
|
|
78
|
+
--space-section-to-section-mobile: 2.25rem;
|
|
79
|
+
--space-section-to-section: var(--space-section-to-section-desktop);
|
|
80
|
+
--space-page-title-to-first-section-desktop: clamp(0.9rem, 1.6vw, 1.4rem);
|
|
81
|
+
--space-page-title-to-first-section-mobile: 0.9rem;
|
|
82
|
+
--space-page-title-to-first-section: var(--space-page-title-to-first-section-desktop);
|
|
83
|
+
--space-final-section-bottom-desktop: var(--space-section-to-section-desktop);
|
|
84
|
+
--space-final-section-bottom-mobile: var(--space-section-to-section-mobile);
|
|
85
|
+
--space-final-section-bottom: var(--space-final-section-bottom-desktop);
|
|
86
|
+
|
|
87
|
+
--content-gutter-desktop: clamp(1.25rem, 4vw, 3rem);
|
|
88
|
+
--content-gutter-mobile: 1rem;
|
|
89
|
+
--content-gutter: var(--content-gutter-desktop);
|
|
90
|
+
--site-top-anchor-offset: 4.5rem;
|
|
91
|
+
--focus-indicator-width: 2px;
|
|
92
|
+
--target-size-minimum: 1.5rem;
|
|
93
|
+
--target-size-comfortable: 2.75rem;
|
|
94
|
+
color-scheme: light;
|
|
95
|
+
scroll-behavior: smooth;
|
|
96
|
+
scroll-padding-top: var(--site-top-anchor-offset);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:root[data-appearance='dark'] {
|
|
100
|
+
--color-page: var(--palette-dark-page-background);
|
|
101
|
+
--color-primary-text: var(--palette-dark-primary-text);
|
|
102
|
+
--color-secondary-text: var(--palette-dark-secondary-text);
|
|
103
|
+
--color-link-text: var(--palette-dark-link-text);
|
|
104
|
+
--color-focus-ring: var(--palette-dark-focus-ring);
|
|
105
|
+
--color-focus-ring-contrast: var(--palette-dark-focus-ring-contrast);
|
|
106
|
+
--color-selection-background: var(--palette-dark-selection-background);
|
|
107
|
+
--color-selection-text: var(--palette-dark-selection-text);
|
|
108
|
+
--color-control-background: var(--palette-dark-control-background);
|
|
109
|
+
--color-control-background-active: var(--palette-dark-control-background-active);
|
|
110
|
+
--color-control-text: var(--palette-dark-control-text);
|
|
111
|
+
--color-code-background: var(--palette-dark-code-background);
|
|
112
|
+
--color-code-text: var(--palette-dark-code-text);
|
|
113
|
+
--color-warning-accent: var(--palette-dark-warning-accent);
|
|
114
|
+
--color-warning-surface: var(--palette-dark-warning-surface);
|
|
115
|
+
--color-warning-text: var(--palette-dark-warning-text);
|
|
116
|
+
--color-error-accent: var(--palette-dark-error-accent);
|
|
117
|
+
--color-error-surface: var(--palette-dark-error-surface);
|
|
118
|
+
--color-error-text: var(--palette-dark-error-text);
|
|
119
|
+
--color-success-accent: var(--palette-dark-success-accent);
|
|
120
|
+
--color-success-surface: var(--palette-dark-success-surface);
|
|
121
|
+
--color-success-text: var(--palette-dark-success-text);
|
|
122
|
+
--color-text: var(--color-primary-text);
|
|
123
|
+
--color-surface: var(--palette-dark-surface);
|
|
124
|
+
--color-muted: var(--color-secondary-text);
|
|
125
|
+
--color-soft: var(--palette-dark-soft);
|
|
126
|
+
--color-accent: var(--color-link-text);
|
|
127
|
+
--color-border: var(--palette-dark-border);
|
|
128
|
+
--color-nav-separator: var(--palette-dark-nav-separator);
|
|
129
|
+
--color-frame-background: var(--palette-dark-frame-background);
|
|
130
|
+
--color-frame-text: var(--palette-dark-frame-text);
|
|
131
|
+
--color-surface-base-background: var(--palette-dark-surface-base-background);
|
|
132
|
+
--color-surface-base-text: var(--palette-dark-surface-base-text);
|
|
133
|
+
--color-surface-base-secondary-text: var(--palette-dark-surface-base-secondary-text);
|
|
134
|
+
--color-surface-soft-background: var(--palette-dark-surface-soft-background);
|
|
135
|
+
--color-surface-soft-text: var(--palette-dark-surface-soft-text);
|
|
136
|
+
--color-surface-soft-secondary-text: var(--palette-dark-surface-soft-secondary-text);
|
|
137
|
+
--color-surface-emphasis-background: var(--palette-dark-surface-emphasis-background);
|
|
138
|
+
--color-surface-emphasis-text: var(--palette-dark-surface-emphasis-text);
|
|
139
|
+
--color-surface-emphasis-secondary-text: var(--palette-dark-surface-emphasis-secondary-text);
|
|
140
|
+
color-scheme: dark;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@media (prefers-color-scheme: dark) {
|
|
144
|
+
:root[data-appearance='system'] {
|
|
145
|
+
--color-page: var(--palette-dark-page-background);
|
|
146
|
+
--color-primary-text: var(--palette-dark-primary-text);
|
|
147
|
+
--color-secondary-text: var(--palette-dark-secondary-text);
|
|
148
|
+
--color-link-text: var(--palette-dark-link-text);
|
|
149
|
+
--color-focus-ring: var(--palette-dark-focus-ring);
|
|
150
|
+
--color-focus-ring-contrast: var(--palette-dark-focus-ring-contrast);
|
|
151
|
+
--color-selection-background: var(--palette-dark-selection-background);
|
|
152
|
+
--color-selection-text: var(--palette-dark-selection-text);
|
|
153
|
+
--color-control-background: var(--palette-dark-control-background);
|
|
154
|
+
--color-control-background-active: var(--palette-dark-control-background-active);
|
|
155
|
+
--color-control-text: var(--palette-dark-control-text);
|
|
156
|
+
--color-code-background: var(--palette-dark-code-background);
|
|
157
|
+
--color-code-text: var(--palette-dark-code-text);
|
|
158
|
+
--color-warning-accent: var(--palette-dark-warning-accent);
|
|
159
|
+
--color-warning-surface: var(--palette-dark-warning-surface);
|
|
160
|
+
--color-warning-text: var(--palette-dark-warning-text);
|
|
161
|
+
--color-error-accent: var(--palette-dark-error-accent);
|
|
162
|
+
--color-error-surface: var(--palette-dark-error-surface);
|
|
163
|
+
--color-error-text: var(--palette-dark-error-text);
|
|
164
|
+
--color-success-accent: var(--palette-dark-success-accent);
|
|
165
|
+
--color-success-surface: var(--palette-dark-success-surface);
|
|
166
|
+
--color-success-text: var(--palette-dark-success-text);
|
|
167
|
+
--color-text: var(--color-primary-text);
|
|
168
|
+
--color-surface: var(--palette-dark-surface);
|
|
169
|
+
--color-muted: var(--color-secondary-text);
|
|
170
|
+
--color-soft: var(--palette-dark-soft);
|
|
171
|
+
--color-accent: var(--color-link-text);
|
|
172
|
+
--color-border: var(--palette-dark-border);
|
|
173
|
+
--color-nav-separator: var(--palette-dark-nav-separator);
|
|
174
|
+
--color-frame-background: var(--palette-dark-frame-background);
|
|
175
|
+
--color-frame-text: var(--palette-dark-frame-text);
|
|
176
|
+
--color-surface-base-background: var(--palette-dark-surface-base-background);
|
|
177
|
+
--color-surface-base-text: var(--palette-dark-surface-base-text);
|
|
178
|
+
--color-surface-base-secondary-text: var(--palette-dark-surface-base-secondary-text);
|
|
179
|
+
--color-surface-soft-background: var(--palette-dark-surface-soft-background);
|
|
180
|
+
--color-surface-soft-text: var(--palette-dark-surface-soft-text);
|
|
181
|
+
--color-surface-soft-secondary-text: var(--palette-dark-surface-soft-secondary-text);
|
|
182
|
+
--color-surface-emphasis-background: var(--palette-dark-surface-emphasis-background);
|
|
183
|
+
--color-surface-emphasis-text: var(--palette-dark-surface-emphasis-text);
|
|
184
|
+
--color-surface-emphasis-secondary-text: var(--palette-dark-surface-emphasis-secondary-text);
|
|
185
|
+
color-scheme: dark;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:root[data-reading-width='narrow'] {
|
|
190
|
+
--reader-text-width: min(60ch, var(--text-width));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:root[data-reading-width='standard'] {
|
|
194
|
+
--reader-text-width: min(72ch, var(--text-width));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:root[data-reading-width='wide'] {
|
|
198
|
+
--reader-text-width: min(80ch, var(--image-layout-width));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
html {
|
|
202
|
+
min-height: 100%;
|
|
203
|
+
background: var(--color-page);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@media (prefers-reduced-motion: reduce) {
|
|
207
|
+
html {
|
|
208
|
+
scroll-behavior: auto !important;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
*,
|
|
212
|
+
*::before,
|
|
213
|
+
*::after {
|
|
214
|
+
animation-duration: 0.01ms !important;
|
|
215
|
+
animation-iteration-count: 1 !important;
|
|
216
|
+
scroll-behavior: auto !important;
|
|
217
|
+
transition-duration: 0.01ms !important;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
body {
|
|
222
|
+
min-height: 100vh;
|
|
223
|
+
min-height: 100svh;
|
|
224
|
+
margin: 0;
|
|
225
|
+
isolation: isolate;
|
|
226
|
+
background: var(--color-page);
|
|
227
|
+
color: var(--color-text);
|
|
228
|
+
font-family: var(--font-sans);
|
|
229
|
+
-webkit-font-smoothing: antialiased;
|
|
230
|
+
-moz-osx-font-smoothing: grayscale;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
img {
|
|
234
|
+
display: block;
|
|
235
|
+
height: auto;
|
|
236
|
+
max-width: 100%;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
a {
|
|
240
|
+
color: var(--color-accent);
|
|
241
|
+
overflow-wrap: anywhere;
|
|
242
|
+
transition: color 0.18s ease, opacity 0.18s ease;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
::selection {
|
|
246
|
+
background: var(--color-selection-background);
|
|
247
|
+
color: var(--color-selection-text);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:where(a, button, summary, [tabindex]:not([tabindex='-1'])):focus-visible {
|
|
251
|
+
outline: var(--focus-indicator-width) solid var(--color-focus-ring);
|
|
252
|
+
outline-offset: var(--focus-indicator-width);
|
|
253
|
+
box-shadow: 0 0 0 calc(var(--focus-indicator-width) + var(--focus-indicator-width)) var(--color-focus-ring-contrast);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.visually-hidden {
|
|
257
|
+
position: absolute;
|
|
258
|
+
width: 1px;
|
|
259
|
+
height: 1px;
|
|
260
|
+
margin: -1px;
|
|
261
|
+
padding: 0;
|
|
262
|
+
border: 0;
|
|
263
|
+
overflow: hidden;
|
|
264
|
+
clip: rect(0 0 0 0);
|
|
265
|
+
clip-path: inset(50%);
|
|
266
|
+
white-space: nowrap;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.skip-link {
|
|
270
|
+
position: fixed;
|
|
271
|
+
top: 0.75rem;
|
|
272
|
+
left: 0.75rem;
|
|
273
|
+
z-index: 100;
|
|
274
|
+
transform: translateY(-200%);
|
|
275
|
+
background: var(--color-text);
|
|
276
|
+
color: var(--color-surface);
|
|
277
|
+
padding: 0.75rem 1rem;
|
|
278
|
+
font-weight: 700;
|
|
279
|
+
text-decoration: none;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.skip-link:focus {
|
|
283
|
+
transform: translateY(0);
|
|
284
|
+
}
|