@janga/norna 0.7.23 → 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 +12 -0
- package/bin/norna-cli.mjs +6 -0
- package/package.json +13 -2
- package/schemas/category.schema.json +2 -2
- package/schemas/config.schema.json +45 -15
- package/schemas/content-frontmatter.schema.json +7 -7
- package/schemas/page-theme.schema.json +26 -26
- package/schemas/sitewide-content.schema.json +18 -18
- package/schemas/theme.schema.json +246 -246
- package/scripts/build-site.mjs +1 -0
- package/scripts/check-config.mjs +12 -1
- 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/edit-source-link.mjs +49 -0
- package/scripts/lib/editor-language-service.mjs +32 -12
- package/scripts/lib/image-presentation.mjs +4 -0
- package/scripts/lib/navigation-model.mjs +34 -13
- package/scripts/lib/navigation-review.mjs +396 -0
- package/scripts/lib/norna-markdown-blocks.mjs +73 -26
- package/scripts/lib/norna-markdown-render-plugin.mjs +64 -1
- package/scripts/lib/page-aliases.mjs +21 -1
- package/scripts/lib/page-markdown.mjs +32 -1
- package/scripts/lib/page-move-plan.mjs +659 -0
- package/scripts/lib/presentation-palette-metadata.mjs +1 -1
- package/scripts/lib/presentation.mjs +1 -10
- package/scripts/lib/project-config.mjs +111 -5
- package/scripts/lib/public-asset-conventions.mjs +36 -2
- package/scripts/lib/schema-definitions.mjs +22 -5
- package/scripts/lib/schema-editor-metadata.mjs +19 -4
- package/scripts/lib/schema-value-definitions.mjs +1 -1
- package/scripts/lib/semantic-callouts.mjs +128 -0
- package/scripts/lib/site-content.mjs +2 -1
- package/scripts/lib/site-link-graph.mjs +33 -2
- package/scripts/lib/site-navigation-tree.mjs +85 -0
- package/scripts/lib/social-image-assets.mjs +30 -0
- package/scripts/lib/theme-presets.mjs +2 -2
- package/scripts/lib/theme-profiles.mjs +0 -4
- package/scripts/move-site-page.mjs +256 -0
- package/scripts/review-navigation.mjs +32 -0
- package/scripts/sync-content-sections.mjs +67 -4
- package/scripts/sync-site-public.mjs +24 -5
- package/src/components/CodeBlockCopyScript.astro +9 -4
- package/src/components/EditSourceLink.astro +17 -0
- package/src/components/ImageCarousel.astro +5 -6
- package/src/components/NavigationPageTree.astro +66 -55
- package/src/components/NavigationTreeControls.astro +77 -0
- package/src/components/PageAliasRedirect.astro +1 -1
- package/src/components/PageList.astro +33 -0
- package/src/components/PageSequenceNavigation.astro +37 -0
- package/src/components/SearchPage.astro +151 -0
- package/src/components/SiteNavigation.astro +35 -8
- package/src/components/SitePage.astro +79 -26
- package/src/components/SiteSection.astro +11 -3
- package/src/components/SiteTreeNavigation.astro +8 -1
- package/src/components/TreeNavigationScript.astro +207 -26
- package/src/layouts/BaseLayout.astro +57 -2
- package/src/lib/sectionContent.ts +32 -3
- package/src/lib/siteNavigation.ts +31 -52
- package/src/lib/sitePublicAssets.ts +1 -0
- package/src/pages/404.astro +110 -0
- package/src/pages/[...slug].astro +15 -5
- package/src/styles/content.css +242 -18
- package/src/styles/media.css +0 -5
- package/src/styles/navigation.css +31 -0
- package/src/styles/page-layout.css +438 -89
- package/src/styles/responsive.css +77 -8
- 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
|
@@ -135,6 +135,29 @@
|
|
|
135
135
|
text-transform: none;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
.mobile-nav-panel .navigation-tree-controls {
|
|
139
|
+
position: static;
|
|
140
|
+
margin-bottom: 1rem;
|
|
141
|
+
padding-bottom: 1rem;
|
|
142
|
+
background: var(--site-top-background-color, var(--color-page));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.mobile-nav-panel .navigation-tree-filter > input {
|
|
146
|
+
min-height: 2.75rem;
|
|
147
|
+
font-size: 0.9rem;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.mobile-nav-panel .navigation-tree-commands > button {
|
|
151
|
+
width: 2.75rem;
|
|
152
|
+
height: 2.75rem;
|
|
153
|
+
background: var(--site-top-background-color, var(--color-page));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.mobile-nav-panel .navigation-tree-commands svg {
|
|
157
|
+
width: 1.15rem;
|
|
158
|
+
height: 1.15rem;
|
|
159
|
+
}
|
|
160
|
+
|
|
138
161
|
.mobile-nav-panel :is(ul, ol) {
|
|
139
162
|
display: grid;
|
|
140
163
|
gap: 0;
|
|
@@ -165,7 +188,9 @@
|
|
|
165
188
|
text-transform: none;
|
|
166
189
|
}
|
|
167
190
|
|
|
168
|
-
.navigation-page-tree-mobile
|
|
191
|
+
.navigation-page-tree-mobile
|
|
192
|
+
.navigation-page-disclosure.navigation-category-disclosure
|
|
193
|
+
> .navigation-page-summary {
|
|
169
194
|
position: static;
|
|
170
195
|
display: flex;
|
|
171
196
|
align-items: center;
|
|
@@ -179,11 +204,34 @@
|
|
|
179
204
|
color: var(--color-secondary-text);
|
|
180
205
|
}
|
|
181
206
|
|
|
182
|
-
.navigation-page-tree-mobile
|
|
183
|
-
|
|
207
|
+
.navigation-page-tree-mobile
|
|
208
|
+
.navigation-page-node-page-disclosure {
|
|
209
|
+
display: grid;
|
|
210
|
+
grid-template-columns: 2.5rem minmax(0, 1fr);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.navigation-page-tree-mobile
|
|
214
|
+
.navigation-page-node-page-disclosure
|
|
215
|
+
> .navigation-page-disclosure
|
|
216
|
+
> .navigation-page-summary {
|
|
217
|
+
position: static;
|
|
218
|
+
display: grid;
|
|
219
|
+
place-items: center;
|
|
220
|
+
width: 100%;
|
|
221
|
+
height: auto;
|
|
222
|
+
min-height: 3.25rem;
|
|
223
|
+
padding: 0;
|
|
224
|
+
color: var(--color-secondary-text);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.navigation-page-tree-mobile .navigation-page-node-page-disclosure > .navigation-page-open-link {
|
|
228
|
+
position: static;
|
|
229
|
+
grid-column: 2;
|
|
230
|
+
grid-row: 1;
|
|
231
|
+
display: flex;
|
|
184
232
|
align-items: center;
|
|
185
233
|
min-height: 3.25rem;
|
|
186
|
-
width:
|
|
234
|
+
width: 100%;
|
|
187
235
|
padding: 0.75rem 0;
|
|
188
236
|
font-size: 0.94rem;
|
|
189
237
|
line-height: 1.35;
|
|
@@ -191,10 +239,6 @@
|
|
|
191
239
|
overflow-wrap: anywhere;
|
|
192
240
|
}
|
|
193
241
|
|
|
194
|
-
.navigation-page-tree-mobile .navigation-page-disclosure[open] > .navigation-page-open-link {
|
|
195
|
-
display: flex;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
242
|
.navigation-page-tree-mobile .navigation-page-disclosure > .navigation-page-summary:hover,
|
|
199
243
|
.navigation-page-tree-mobile .navigation-page-disclosure > .navigation-page-summary:focus-visible,
|
|
200
244
|
.navigation-page-node-current > .navigation-page-disclosure > .navigation-page-summary {
|
|
@@ -228,6 +272,7 @@
|
|
|
228
272
|
}
|
|
229
273
|
|
|
230
274
|
.navigation-page-tree-mobile .navigation-page-branch-content {
|
|
275
|
+
grid-column: 1 / -1;
|
|
231
276
|
margin-left: 0.35rem;
|
|
232
277
|
border-left: 1px solid color-mix(in srgb, currentColor 20%, transparent);
|
|
233
278
|
padding-left: 1rem;
|
|
@@ -237,6 +282,14 @@
|
|
|
237
282
|
margin: 0 0 0.45rem;
|
|
238
283
|
}
|
|
239
284
|
|
|
285
|
+
.navigation-page-tree-mobile .navigation-page-sections-disclosure > summary {
|
|
286
|
+
top: 0;
|
|
287
|
+
right: 0;
|
|
288
|
+
left: auto;
|
|
289
|
+
width: 2.5rem;
|
|
290
|
+
height: 3.25rem;
|
|
291
|
+
}
|
|
292
|
+
|
|
240
293
|
.navigation-page-branch-content > .navigation-page-tree-mobile > .navigation-page-node {
|
|
241
294
|
border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent);
|
|
242
295
|
}
|
|
@@ -348,6 +401,14 @@
|
|
|
348
401
|
display: none;
|
|
349
402
|
}
|
|
350
403
|
|
|
404
|
+
.page-sequence-navigation {
|
|
405
|
+
grid-template-columns: 1fr;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.page-sequence-empty {
|
|
409
|
+
display: none;
|
|
410
|
+
}
|
|
411
|
+
|
|
351
412
|
.site-banners {
|
|
352
413
|
width: min(calc(100% - 2rem), var(--page-width));
|
|
353
414
|
padding-top: 0.75rem;
|
|
@@ -505,7 +566,10 @@
|
|
|
505
566
|
.display-settings-panel,
|
|
506
567
|
.mobile-nav-panel,
|
|
507
568
|
.site-nav-submenu > nav,
|
|
569
|
+
.norna-callout,
|
|
570
|
+
.norna-code-example,
|
|
508
571
|
.card-list-item,
|
|
572
|
+
.page-sequence-link,
|
|
509
573
|
.image-carousel-button,
|
|
510
574
|
.image-carousel-position {
|
|
511
575
|
border: 1px solid CanvasText;
|
|
@@ -518,6 +582,11 @@
|
|
|
518
582
|
color: ButtonText;
|
|
519
583
|
}
|
|
520
584
|
|
|
585
|
+
.norna-code-line-highlighted {
|
|
586
|
+
border-inline-start-color: Highlight !important;
|
|
587
|
+
background: Canvas !important;
|
|
588
|
+
}
|
|
589
|
+
|
|
521
590
|
:is(.display-settings-segmented input:checked + span, .image-carousel-button:hover:not(:disabled)) {
|
|
522
591
|
background: Highlight;
|
|
523
592
|
color: HighlightText;
|
package/starters/basic/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Norna Starter
|
|
2
2
|
|
|
3
3
|
This is a minimal site repository starter for `@janga/norna`.
|
|
4
4
|
|
|
@@ -9,11 +9,8 @@ npm install
|
|
|
9
9
|
npm run norna:dev
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
```sh
|
|
15
|
-
npm run norna:dev
|
|
16
|
-
```
|
|
12
|
+
Open the address printed by the development server. Stop it later with
|
|
13
|
+
`npm run norna:dev:stop`.
|
|
17
14
|
|
|
18
15
|
Edit shared logo settings, banners, and footer in
|
|
19
16
|
`site/sitewide-content.yaml`,
|
|
@@ -63,16 +60,6 @@ still selects this project's locally installed Norna version.
|
|
|
63
60
|
Use `npm run norna:engine:version` to inspect the installed engine and
|
|
64
61
|
`npm run norna:engine:update` to update it.
|
|
65
62
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- `docs/site-files.md`
|
|
70
|
-
- `docs/public-files.md`
|
|
71
|
-
- `docs/content.md`
|
|
72
|
-
- `docs/theme.md`
|
|
73
|
-
- `docs/typography.md`
|
|
74
|
-
- `docs/pages.md`
|
|
75
|
-
- `docs/configuration.md`
|
|
76
|
-
- `docs/commands.md`
|
|
77
|
-
- `docs/images-and-metadata.md`
|
|
78
|
-
- `docs/publishing.md`
|
|
63
|
+
Start with the [illustrated Getting Started guide](https://janga.github.io/norna/getting-started/install-norna/).
|
|
64
|
+
Use the [Markdown reference index](https://github.com/janga/norna/blob/main/docs/README.md)
|
|
65
|
+
for exact file contracts, syntax, commands, and publishing behavior.
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"norna:config:check": "norna config:check",
|
|
15
15
|
"norna:content:check": "norna content:check",
|
|
16
16
|
"norna:sync": "norna content:sync",
|
|
17
|
+
"norna:navigation:review": "norna navigation:review",
|
|
17
18
|
"norna:theme:presets": "norna theme:presets",
|
|
18
19
|
"norna:theme:export": "norna theme:export",
|
|
19
20
|
"norna:typography:profiles": "norna typography profiles",
|
|
@@ -1,57 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
page:
|
|
3
|
-
description:
|
|
3
|
+
description: A new site created with Norna.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# My Site
|
|
7
7
|
|
|
8
|
+
This is a new Norna site. Replace this introduction with a short description
|
|
9
|
+
of what visitors can find here.
|
|
8
10
|
|
|
9
|
-
##
|
|
10
|
-
This is a minimal starter site for norna. Since this site doesn't have any
|
|
11
|
-
pages defined, the navigation menu will be a sticky bar with anchor links for
|
|
12
|
-
ease of use on phones etc. **Highlighted inline text** when a short
|
|
13
|
-
phrase needs emphasis
|
|
14
|
-
## Work {#work}
|
|
15
|
-
Add Norna image blocks in Markdown where the images should appear. Put
|
|
16
|
-
matching source images directly under `images/`.
|
|
11
|
+
## Welcome
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
industry. Lorem Ipsum has been the industry's standard dummy text ever
|
|
27
|
-
since 1966, when designers at Letraset and James Mosley, the librarian
|
|
28
|
-
at St Bride Printing Library in London, took a 1914 Cicero translation
|
|
29
|
-
and scrambled it to make dummy text for Letraset's Body Type
|
|
30
|
-
sheets. It has survived not only many decades, but also the leap into
|
|
31
|
-
electronic typesetting, remaining essentially unchanged. It was
|
|
32
|
-
popularised thanks to these sheets and more recently with desktop
|
|
33
|
-
publishing software like Aldus PageMaker and Microsoft Word including
|
|
34
|
-
versions of Lorem Ipsum.
|
|
35
|
-
## Why do we use it? {#lorem2}
|
|
36
|
-
It is a long established fact that a reader will be distracted by the
|
|
37
|
-
readable content of a page when looking at its layout. The point of
|
|
38
|
-
using Lorem Ipsum is that it has a more-or-less normal distribution of
|
|
39
|
-
letters, as opposed to using 'Content here, content here', making it
|
|
40
|
-
look like readable English. Many desktop publishing packages and web
|
|
41
|
-
page editors now use Lorem Ipsum as their default model text, and a
|
|
42
|
-
search for 'lorem ipsum' will uncover many web sites still in their
|
|
43
|
-
infancy. Various versions have evolved over the years, sometimes by
|
|
44
|
-
accident, sometimes on purpose (injected humour and the like).
|
|
45
|
-
## Where does it come from? {#lorem3}
|
|
46
|
-
Contrary to popular belief, Lorem Ipsum is not simply random text. It
|
|
47
|
-
has roots in a piece of classical Latin literature from 45 BC, making
|
|
48
|
-
it over 2000 years old. Richard McClintock, a Latin professor at
|
|
49
|
-
Hampden-Sydney College in Virginia, looked up one of the more obscure
|
|
50
|
-
Latin words, consectetur, from a Lorem Ipsum passage, and going
|
|
51
|
-
through the cites of the word in classical literature, discovered the
|
|
52
|
-
undoubtable source. Lorem Ipsum comes from sections 1.10.32 and
|
|
53
|
-
1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and
|
|
54
|
-
Evil) by Cicero, written in 45 BC. This book is a treatise on the
|
|
55
|
-
theory of ethics, very popular during the Renaissance. The first line
|
|
56
|
-
of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in
|
|
57
|
-
section 1.10.32
|
|
13
|
+
Edit this page in `site/pages/000-home/content.md`. Every H2 starts a section
|
|
14
|
+
and becomes a destination in this one-page site's navigation.
|
|
15
|
+
|
|
16
|
+
## Next steps
|
|
17
|
+
|
|
18
|
+
Add your own text, then choose a preset in `site/theme.yaml`. Put local images
|
|
19
|
+
in this page's `images/` directory and reference them through a Norna image
|
|
20
|
+
block when the site needs them.
|