@janga/norna 0.7.23 → 0.7.25

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.
Files changed (82) hide show
  1. package/README.md +14 -18
  2. package/astro.config.mjs +14 -0
  3. package/bin/norna-cli.mjs +6 -0
  4. package/package.json +25 -2
  5. package/schemas/category.schema.json +2 -2
  6. package/schemas/config.schema.json +80 -15
  7. package/schemas/content-frontmatter.schema.json +7 -7
  8. package/schemas/page-theme.schema.json +26 -26
  9. package/schemas/sitewide-content.schema.json +18 -18
  10. package/schemas/theme.schema.json +246 -246
  11. package/scripts/build-site.mjs +1 -0
  12. package/scripts/check-config.mjs +16 -1
  13. package/scripts/dev-local.mjs +106 -11
  14. package/scripts/generate-search-index.mjs +57 -0
  15. package/scripts/init-site.mjs +3 -0
  16. package/scripts/lib/code-fence-metadata.mjs +228 -0
  17. package/scripts/lib/edit-source-link.mjs +102 -0
  18. package/scripts/lib/editor-language-service.mjs +32 -12
  19. package/scripts/lib/image-presentation.mjs +4 -0
  20. package/scripts/lib/navigation-model.mjs +34 -13
  21. package/scripts/lib/navigation-review.mjs +396 -0
  22. package/scripts/lib/norna-markdown-blocks.mjs +164 -26
  23. package/scripts/lib/norna-markdown-render-plugin.mjs +64 -1
  24. package/scripts/lib/page-aliases.mjs +21 -1
  25. package/scripts/lib/page-markdown.mjs +32 -1
  26. package/scripts/lib/page-move-plan.mjs +659 -0
  27. package/scripts/lib/presentation-palette-metadata.mjs +1 -1
  28. package/scripts/lib/presentation.mjs +1 -10
  29. package/scripts/lib/project-config.mjs +141 -5
  30. package/scripts/lib/public-asset-conventions.mjs +36 -2
  31. package/scripts/lib/schema-definitions.mjs +30 -5
  32. package/scripts/lib/schema-editor-metadata.mjs +36 -4
  33. package/scripts/lib/schema-value-definitions.mjs +4 -1
  34. package/scripts/lib/semantic-callouts.mjs +128 -0
  35. package/scripts/lib/site-content.mjs +2 -1
  36. package/scripts/lib/site-link-graph.mjs +33 -2
  37. package/scripts/lib/site-navigation-tree.mjs +85 -0
  38. package/scripts/lib/site-paths.mjs +14 -2
  39. package/scripts/lib/social-image-assets.mjs +30 -0
  40. package/scripts/lib/table-render-plugin.mjs +33 -0
  41. package/scripts/lib/theme-presets.mjs +2 -2
  42. package/scripts/lib/theme-profiles.mjs +0 -4
  43. package/scripts/move-site-page.mjs +256 -0
  44. package/scripts/review-navigation.mjs +32 -0
  45. package/scripts/sync-content-sections.mjs +67 -4
  46. package/scripts/sync-site-public.mjs +24 -5
  47. package/src/components/CardList.astro +1 -0
  48. package/src/components/CodeBlockCopyScript.astro +11 -5
  49. package/src/components/EditSourceLink.astro +17 -0
  50. package/src/components/ImageCarousel.astro +9 -7
  51. package/src/components/ImageStack.astro +34 -9
  52. package/src/components/ImageStackEnhancement.astro +331 -0
  53. package/src/components/NavigationPageTree.astro +66 -55
  54. package/src/components/NavigationTreeControls.astro +77 -0
  55. package/src/components/PageAliasRedirect.astro +1 -1
  56. package/src/components/PageContentsNavigation.astro +2 -3
  57. package/src/components/PageList.astro +33 -0
  58. package/src/components/PageSequenceNavigation.astro +37 -0
  59. package/src/components/SearchPage.astro +151 -0
  60. package/src/components/SectionNavigationScript.astro +45 -7
  61. package/src/components/SiteNavigation.astro +102 -51
  62. package/src/components/SitePage.astro +107 -39
  63. package/src/components/SiteSection.astro +11 -3
  64. package/src/components/SiteTreeNavigation.astro +11 -1
  65. package/src/components/TableOverflowScript.astro +251 -0
  66. package/src/components/TreeNavigationScript.astro +271 -34
  67. package/src/layouts/BaseLayout.astro +83 -2
  68. package/src/lib/generatedImages.ts +18 -0
  69. package/src/lib/sectionContent.ts +36 -30
  70. package/src/lib/siteNavigation.ts +31 -52
  71. package/src/lib/sitePages.ts +6 -3
  72. package/src/lib/sitePublicAssets.ts +1 -0
  73. package/src/pages/404.astro +110 -0
  74. package/src/pages/[...slug].astro +15 -5
  75. package/src/styles/content.css +538 -39
  76. package/src/styles/media.css +187 -8
  77. package/src/styles/navigation.css +199 -3
  78. package/src/styles/page-layout.css +481 -100
  79. package/src/styles/responsive.css +144 -28
  80. package/starters/basic/README.md +6 -19
  81. package/starters/basic/package.json +1 -0
  82. package/starters/basic/site/pages/000-home/content.md +13 -50
@@ -88,18 +88,6 @@
88
88
  text-transform: uppercase;
89
89
  }
90
90
 
91
- .mobile-nav-menu > summary::after {
92
- content: "☰";
93
- font-size: 1rem;
94
- line-height: 1;
95
- opacity: 0.86;
96
- }
97
-
98
- .mobile-nav-menu[open] > summary::after {
99
- content: "×";
100
- font-size: 1.25rem;
101
- }
102
-
103
91
  .mobile-nav-menu > summary::-webkit-details-marker {
104
92
  display: none;
105
93
  }
@@ -135,6 +123,29 @@
135
123
  text-transform: none;
136
124
  }
137
125
 
126
+ .mobile-nav-panel .navigation-tree-controls {
127
+ position: static;
128
+ margin-bottom: 1rem;
129
+ padding-bottom: 1rem;
130
+ background: var(--site-top-background-color, var(--color-page));
131
+ }
132
+
133
+ .mobile-nav-panel .navigation-tree-filter > input {
134
+ min-height: 2.75rem;
135
+ font-size: 0.9rem;
136
+ }
137
+
138
+ .mobile-nav-panel .navigation-tree-commands > button {
139
+ width: 2.75rem;
140
+ height: 2.75rem;
141
+ background: var(--site-top-background-color, var(--color-page));
142
+ }
143
+
144
+ .mobile-nav-panel .navigation-tree-commands svg {
145
+ width: 1.15rem;
146
+ height: 1.15rem;
147
+ }
148
+
138
149
  .mobile-nav-panel :is(ul, ol) {
139
150
  display: grid;
140
151
  gap: 0;
@@ -165,7 +176,9 @@
165
176
  text-transform: none;
166
177
  }
167
178
 
168
- .navigation-page-tree-mobile .navigation-page-disclosure > .navigation-page-summary {
179
+ .navigation-page-tree-mobile
180
+ .navigation-page-disclosure.navigation-category-disclosure
181
+ > .navigation-page-summary {
169
182
  position: static;
170
183
  display: flex;
171
184
  align-items: center;
@@ -179,11 +192,34 @@
179
192
  color: var(--color-secondary-text);
180
193
  }
181
194
 
182
- .navigation-page-tree-mobile .navigation-page-disclosure > .navigation-page-open-link {
183
- display: none;
195
+ .navigation-page-tree-mobile
196
+ .navigation-page-node-page-disclosure {
197
+ display: grid;
198
+ grid-template-columns: 2.5rem minmax(0, 1fr);
199
+ }
200
+
201
+ .navigation-page-tree-mobile
202
+ .navigation-page-node-page-disclosure
203
+ > .navigation-page-disclosure
204
+ > .navigation-page-summary {
205
+ position: static;
206
+ display: grid;
207
+ place-items: center;
208
+ width: 100%;
209
+ height: auto;
210
+ min-height: 3.25rem;
211
+ padding: 0;
212
+ color: var(--color-secondary-text);
213
+ }
214
+
215
+ .navigation-page-tree-mobile .navigation-page-node-page-disclosure > .navigation-page-open-link {
216
+ position: static;
217
+ grid-column: 2;
218
+ grid-row: 1;
219
+ display: flex;
184
220
  align-items: center;
185
221
  min-height: 3.25rem;
186
- width: calc(100% - 2.5rem);
222
+ width: 100%;
187
223
  padding: 0.75rem 0;
188
224
  font-size: 0.94rem;
189
225
  line-height: 1.35;
@@ -191,10 +227,6 @@
191
227
  overflow-wrap: anywhere;
192
228
  }
193
229
 
194
- .navigation-page-tree-mobile .navigation-page-disclosure[open] > .navigation-page-open-link {
195
- display: flex;
196
- }
197
-
198
230
  .navigation-page-tree-mobile .navigation-page-disclosure > .navigation-page-summary:hover,
199
231
  .navigation-page-tree-mobile .navigation-page-disclosure > .navigation-page-summary:focus-visible,
200
232
  .navigation-page-node-current > .navigation-page-disclosure > .navigation-page-summary {
@@ -228,6 +260,7 @@
228
260
  }
229
261
 
230
262
  .navigation-page-tree-mobile .navigation-page-branch-content {
263
+ grid-column: 1 / -1;
231
264
  margin-left: 0.35rem;
232
265
  border-left: 1px solid color-mix(in srgb, currentColor 20%, transparent);
233
266
  padding-left: 1rem;
@@ -237,6 +270,14 @@
237
270
  margin: 0 0 0.45rem;
238
271
  }
239
272
 
273
+ .navigation-page-tree-mobile .navigation-page-sections-disclosure > summary {
274
+ top: 0;
275
+ right: 0;
276
+ left: auto;
277
+ width: 2.5rem;
278
+ height: 3.25rem;
279
+ }
280
+
240
281
  .navigation-page-branch-content > .navigation-page-tree-mobile > .navigation-page-node {
241
282
  border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent);
242
283
  }
@@ -348,6 +389,14 @@
348
389
  display: none;
349
390
  }
350
391
 
392
+ .page-sequence-navigation {
393
+ grid-template-columns: 1fr;
394
+ }
395
+
396
+ .page-sequence-empty {
397
+ display: none;
398
+ }
399
+
351
400
  .site-banners {
352
401
  width: min(calc(100% - 2rem), var(--page-width));
353
402
  padding-top: 0.75rem;
@@ -450,11 +499,21 @@
450
499
  gap: var(--space-image-item);
451
500
  }
452
501
 
453
- .image-details {
454
- padding: 0 0.25rem;
455
- font-size: 1rem;
502
+ .image-details {
503
+ padding: 0 0.25rem;
504
+ font-size: 1rem;
505
+ }
506
+
507
+ .image-inspector {
508
+ width: calc(100% - 1rem);
509
+ height: calc(100svh - 1rem);
510
+ }
511
+
512
+ .image-inspector-layout {
513
+ gap: 0.5rem;
514
+ padding: 0.5rem;
515
+ }
456
516
  }
457
- }
458
517
 
459
518
  @media (forced-colors: active) {
460
519
  :root,
@@ -505,12 +564,28 @@
505
564
  .display-settings-panel,
506
565
  .mobile-nav-panel,
507
566
  .site-nav-submenu > nav,
567
+ .norna-callout,
568
+ .norna-code-example,
508
569
  .card-list-item,
570
+ .page-sequence-link,
509
571
  .image-carousel-button,
510
- .image-carousel-position {
511
- border: 1px solid CanvasText;
512
- box-shadow: none;
513
- }
572
+ .image-carousel-position {
573
+ border: 1px solid CanvasText;
574
+ box-shadow: none;
575
+ }
576
+
577
+ .image-inspector,
578
+ .image-inspector-controls button,
579
+ .norna-table-navigation button,
580
+ .managed-image-inspection-affordance {
581
+ border: 1px solid CanvasText;
582
+ box-shadow: none;
583
+ }
584
+
585
+ .norna-table-navigation button::before {
586
+ border: 0;
587
+ background: transparent;
588
+ }
514
589
 
515
590
  :is(.display-settings button, .display-settings-segmented span, .mobile-nav-menu > summary, .site-banner-dismiss) {
516
591
  border-color: ButtonText;
@@ -518,6 +593,47 @@
518
593
  color: ButtonText;
519
594
  }
520
595
 
596
+ .norna-code-line-highlighted {
597
+ border-inline-start-color: Highlight !important;
598
+ background: Canvas !important;
599
+ }
600
+
601
+ .norna-table-frame::before,
602
+ .norna-table-frame::after {
603
+ top: 50%;
604
+ bottom: auto;
605
+ width: 0.55rem;
606
+ height: 0.55rem;
607
+ border-block-start: 2px solid CanvasText;
608
+ border-inline-end: 2px solid CanvasText;
609
+ background: none;
610
+ }
611
+
612
+ .norna-table-sticky-heading,
613
+ .norna-table-sticky-heading-cell {
614
+ border-color: CanvasText;
615
+ background: Canvas;
616
+ color: CanvasText;
617
+ }
618
+
619
+ .norna-table-frame::before {
620
+ inset-inline-start: 0.4rem;
621
+ transform: translateY(-50%) rotate(-135deg);
622
+ }
623
+
624
+ .norna-table-frame::after {
625
+ inset-inline-end: 0.4rem;
626
+ transform: translateY(-50%) rotate(45deg);
627
+ }
628
+
629
+ .norna-table-frame:dir(rtl)::before {
630
+ transform: translateY(-50%) rotate(45deg);
631
+ }
632
+
633
+ .norna-table-frame:dir(rtl)::after {
634
+ transform: translateY(-50%) rotate(-135deg);
635
+ }
636
+
521
637
  :is(.display-settings-segmented input:checked + span, .image-carousel-button:hover:not(:disabled)) {
522
638
  background: Highlight;
523
639
  color: HighlightText;
@@ -1,4 +1,4 @@
1
- # norna Starter
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
- If the standard local port is blocked, start with:
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
- Generic documentation lives in the `norna` repository:
67
-
68
- - `docs/README.md`
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: Minimal norna starter site.
3
+ description: A new site created with Norna.
4
4
  ---
5
5
 
6
- # Example Site
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
- ## Intro {#intro}
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
- ```norna-image-stack
20
- - image: example.jpg
21
- caption: Replace this with a real image and caption.
22
- ```
23
- ````
24
- ## What is Lorem Ipsum? {#lorem1}
25
- Lorem Ipsum is simply dummy text of the printing and typesetting
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.