@nulib/canopy 0.0.0 → 2.0.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.
Files changed (141) hide show
  1. package/bin/canopy.js +16 -0
  2. package/lib/AGENTS.md +107 -0
  3. package/lib/base-path.js +67 -0
  4. package/lib/build/appearance.js +76 -0
  5. package/lib/build/assets.js +30 -0
  6. package/lib/build/build.js +350 -0
  7. package/lib/build/dev.js +1355 -0
  8. package/lib/build/devtoast.config.json +6 -0
  9. package/lib/build/devtoast.css +14 -0
  10. package/lib/build/facets.js +19 -0
  11. package/lib/build/fonts.js +105 -0
  12. package/lib/build/iiif.js +2990 -0
  13. package/lib/build/log.js +31 -0
  14. package/lib/build/mdx.js +1967 -0
  15. package/lib/build/package-names.js +111 -0
  16. package/lib/build/pages.js +420 -0
  17. package/lib/build/rehype-task-list-labels.js +54 -0
  18. package/lib/build/runtimes.js +141 -0
  19. package/lib/build/search-index.js +55 -0
  20. package/lib/build/search-text.js +160 -0
  21. package/lib/build/search-workflow.js +72 -0
  22. package/lib/build/search.js +302 -0
  23. package/lib/build/sitemap.js +197 -0
  24. package/lib/build/styles.js +140 -0
  25. package/lib/build/theme-tokens.js +78 -0
  26. package/lib/build/ui-styles.js +25 -0
  27. package/lib/build/upgrade-notices.js +121 -0
  28. package/lib/cli.js +64 -0
  29. package/lib/common.js +580 -0
  30. package/lib/components/bibliography.js +197 -0
  31. package/lib/components/featured.js +237 -0
  32. package/lib/components/hero-slider-runtime.js +215 -0
  33. package/lib/components/image-story-runtime-entry.js +249 -0
  34. package/lib/components/map-runtime.js +114 -0
  35. package/lib/components/metadata-index.js +32 -0
  36. package/lib/components/nav-place.js +227 -0
  37. package/lib/components/navigation.js +381 -0
  38. package/lib/components/referenced.js +217 -0
  39. package/lib/components/slider-runtime-entry.js +106 -0
  40. package/lib/components/timeline-runtime.js +80 -0
  41. package/lib/components/viewer-runtime-entry.js +88 -0
  42. package/lib/config-path.js +78 -0
  43. package/lib/default-locale.js +113 -0
  44. package/lib/discovery/browser-loader.js +107 -0
  45. package/lib/discovery/browser.js +115 -0
  46. package/lib/discovery/config.js +25 -0
  47. package/lib/discovery/envelope.js +124 -0
  48. package/lib/discovery/export.js +226 -0
  49. package/lib/discovery/ingestion.js +62 -0
  50. package/lib/discovery/pagination.js +66 -0
  51. package/lib/discovery/provenance.js +79 -0
  52. package/lib/discovery/search.js +81 -0
  53. package/lib/discovery/tools.js +155 -0
  54. package/lib/discovery/validation.js +121 -0
  55. package/lib/head.js +154 -0
  56. package/lib/iiif/thumbnail.js +402 -0
  57. package/lib/index.js +9 -0
  58. package/lib/locale-runtime.js +69 -0
  59. package/lib/locales.js +203 -0
  60. package/lib/orchestrator.js +231 -0
  61. package/lib/page-context.js +24 -0
  62. package/lib/search/bundle.js +25 -0
  63. package/lib/search/data.js +202 -0
  64. package/lib/search/engine.js +86 -0
  65. package/lib/search/index-cache.js +95 -0
  66. package/lib/search/search-app.jsx +835 -0
  67. package/lib/search/search-engine-runtime.js +44 -0
  68. package/lib/search/search-form-runtime.js +462 -0
  69. package/lib/search/search.js +676 -0
  70. package/package.json +109 -3
  71. package/types/base-path.d.ts +4 -0
  72. package/types/orchestrator.d.ts +17 -0
  73. package/ui/dist/index.mjs +7358 -0
  74. package/ui/dist/index.mjs.map +7 -0
  75. package/ui/dist/server.mjs +12731 -0
  76. package/ui/dist/server.mjs.map +7 -0
  77. package/ui/fonts/OFL.txt +98 -0
  78. package/ui/fonts/google-sans-flex-latin-ext.woff2 +0 -0
  79. package/ui/fonts/google-sans-flex-latin.woff2 +0 -0
  80. package/ui/fonts/source-serif-4-italic-latin-ext.woff2 +0 -0
  81. package/ui/fonts/source-serif-4-italic-latin.woff2 +0 -0
  82. package/ui/fonts/source-serif-4-latin-ext.woff2 +0 -0
  83. package/ui/fonts/source-serif-4-latin.woff2 +0 -0
  84. package/ui/styles/base/_common.scss +97 -0
  85. package/ui/styles/base/_heading.scss +61 -0
  86. package/ui/styles/base/_markdown.scss +188 -0
  87. package/ui/styles/base/_type.scss +51 -0
  88. package/ui/styles/base/_utilities.scss +7 -0
  89. package/ui/styles/base/index.scss +5 -0
  90. package/ui/styles/components/_article-card.scss +108 -0
  91. package/ui/styles/components/_band.scss +104 -0
  92. package/ui/styles/components/_bibliography.scss +88 -0
  93. package/ui/styles/components/_buttons.scss +143 -0
  94. package/ui/styles/components/_card.scss +109 -0
  95. package/ui/styles/components/_diagram.scss +76 -0
  96. package/ui/styles/components/_feature.scss +66 -0
  97. package/ui/styles/components/_footer.scss +136 -0
  98. package/ui/styles/components/_gallery.scss +476 -0
  99. package/ui/styles/components/_image-story.scss +56 -0
  100. package/ui/styles/components/_interstitial-hero.scss +625 -0
  101. package/ui/styles/components/_layout.scss +83 -0
  102. package/ui/styles/components/_map.scss +296 -0
  103. package/ui/styles/components/_metadata-index.scss +68 -0
  104. package/ui/styles/components/_nav-tree.scss +80 -0
  105. package/ui/styles/components/_referenced-items.scss +69 -0
  106. package/ui/styles/components/_sub-navigation.scss +208 -0
  107. package/ui/styles/components/_swoosh.scss +50 -0
  108. package/ui/styles/components/_timeline.scss +350 -0
  109. package/ui/styles/components/_work.scss +71 -0
  110. package/ui/styles/components/header/_header.scss +294 -0
  111. package/ui/styles/components/header/_logo.scss +99 -0
  112. package/ui/styles/components/header/_navbar.scss +143 -0
  113. package/ui/styles/components/header/index.scss +3 -0
  114. package/ui/styles/components/iiif/_image.scss +32 -0
  115. package/ui/styles/components/iiif/_slider.scss +5 -0
  116. package/ui/styles/components/iiif/index.scss +2 -0
  117. package/ui/styles/components/index.scss +25 -0
  118. package/ui/styles/components/modal/_modal.scss +130 -0
  119. package/ui/styles/components/modal/index.scss +1 -0
  120. package/ui/styles/components/search/_filters.scss +259 -0
  121. package/ui/styles/components/search/_form.scss +187 -0
  122. package/ui/styles/components/search/_panel.scss +7 -0
  123. package/ui/styles/components/search/_results.scss +241 -0
  124. package/ui/styles/components/search/_tabs.scss +60 -0
  125. package/ui/styles/components/search/index.scss +4 -0
  126. package/ui/styles/index.css +5007 -0
  127. package/ui/styles/index.scss +11 -0
  128. package/ui/styles/settings/_breakpoints.scss +7 -0
  129. package/ui/styles/settings/_focus.scss +15 -0
  130. package/ui/styles/settings/_tokens.scss +170 -0
  131. package/ui/styles/settings/_type.scss +126 -0
  132. package/ui/styles/version-parity.css +116 -0
  133. package/ui/tailwind-canopy-iiif-plugin.js +39 -0
  134. package/ui/tailwind-canopy-iiif-preset.js +32 -0
  135. package/ui/tailwind-config.d.ts +29 -0
  136. package/ui/tailwind-config.js +159 -0
  137. package/ui/tailwind-default.config.mjs +4 -0
  138. package/ui/theme-color.js +130 -0
  139. package/ui/theme-palette.js +337 -0
  140. package/ui/theme.js +153 -0
  141. package/README.md +0 -3
@@ -0,0 +1,104 @@
1
+ @use "../settings/focus" as focus;
2
+ @use "../settings/type";
3
+
4
+ // `<Band>`: a call to action on black, after Clover's homepage, in both appearances: its
5
+ // words white (21:1), its quieter words `--canopy-band-muted` (9:1 or more), its links
6
+ // white and underlined, its focus ring white. A `<Button>` in it is drawn for the dark:
7
+ // the primary white with black words, the secondary a white edge. On a dark page, black
8
+ // on near-black, a hairline sets it off (`--canopy-band-edge`).
9
+ @layer components {
10
+ .canopy-band {
11
+ --canopy-focus-color: var(--canopy-band-text);
12
+ box-sizing: border-box;
13
+ margin: 2.618rem 0;
14
+ padding: clamp(1.618rem, 5vw, 4.236rem) clamp(1.25rem, 5vw, 4.236rem);
15
+ border-radius: var(--canopy-radius-xl);
16
+ background-color: var(--canopy-band-background);
17
+ box-shadow: inset 0 0 0 1px var(--canopy-band-edge);
18
+ color: var(--canopy-band-text);
19
+ }
20
+
21
+ .canopy-band__inner {
22
+ display: flex;
23
+ flex-direction: column;
24
+ align-items: flex-start;
25
+ gap: 1rem;
26
+ max-width: 48rem;
27
+ }
28
+
29
+ .canopy-band[data-align="center"] .canopy-band__inner {
30
+ align-items: center;
31
+ margin-inline: auto;
32
+ text-align: center;
33
+ }
34
+
35
+ .canopy-band__inner > * {
36
+ margin: 0;
37
+ }
38
+
39
+ .canopy-band :where(h1, h2, h3, h4, h5, h6) {
40
+ @include type.title;
41
+ color: inherit;
42
+ }
43
+
44
+ .canopy-band :where(p, li),
45
+ .canopy-band :is(.canopy-lead, .canopy-feature__body) {
46
+ color: var(--canopy-band-muted);
47
+ }
48
+
49
+ .canopy-band .canopy-feature__eyebrow {
50
+ color: var(--canopy-band-text);
51
+ }
52
+
53
+ .canopy-band a:not([class]) {
54
+ color: var(--canopy-band-text);
55
+ text-decoration-line: underline;
56
+ text-underline-offset: 0.2em;
57
+ }
58
+
59
+ .canopy-band a:focus-visible {
60
+ @include focus.focus-ring;
61
+ }
62
+
63
+ .canopy-band .canopy-button-group__actions {
64
+ justify-content: inherit;
65
+ padding: 0;
66
+ }
67
+
68
+ .canopy-band[data-align="center"] .canopy-button-group,
69
+ .canopy-band[data-align="center"] .canopy-button-group__actions {
70
+ align-items: center;
71
+ justify-content: center;
72
+ }
73
+
74
+ // The primary: white, its words black (21:1); a step darker under the pointer.
75
+ .canopy-band .canopy-button--primary {
76
+ border-color: var(--canopy-band-text);
77
+ background-color: var(--canopy-band-text);
78
+ color: var(--canopy-band-background);
79
+
80
+ &:hover,
81
+ &:focus-visible {
82
+ border-color: var(--canopy-band-muted);
83
+ background-color: var(--canopy-band-muted);
84
+ }
85
+ }
86
+
87
+ // The secondary: no fill, a white edge (the band's muted step, 9:1 on black), white
88
+ // words; under the pointer, the edge whole.
89
+ .canopy-band .canopy-button--secondary {
90
+ border-color: var(--canopy-band-muted);
91
+ background-color: transparent;
92
+ color: var(--canopy-band-text);
93
+
94
+ &:hover {
95
+ border-color: var(--canopy-band-text);
96
+ color: var(--canopy-band-text);
97
+ }
98
+ }
99
+
100
+ .canopy-band code {
101
+ background-color: rgb(255 255 255 / 0.12);
102
+ color: var(--canopy-band-text);
103
+ }
104
+ }
@@ -0,0 +1,88 @@
1
+ @use "../settings/type";
2
+
3
+ .bibliography {
4
+ margin: clamp(2rem, 6vw, 4rem) 0;
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 1rem;
8
+ }
9
+
10
+ .bibliography__pages {
11
+ display: grid;
12
+ gap: clamp(1rem, 2vw, 1.75rem);
13
+ }
14
+
15
+ @media (min-width: 900px) {
16
+ .bibliography__pages {
17
+ grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
18
+ }
19
+ }
20
+
21
+ .bibliography__page {
22
+ display: flex;
23
+ flex-direction: column;
24
+ gap: 1rem;
25
+ }
26
+
27
+ .bibliography__page-header {
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 0.382rem;
31
+ }
32
+
33
+ .bibliography__page-title {
34
+ @include type.ui(bold);
35
+ margin: 0;
36
+ }
37
+
38
+ .bibliography__page-link {
39
+ @include type.ui-sm;
40
+ color: var(--color-accent-default);
41
+ text-decoration: none;
42
+ word-break: break-word;
43
+ }
44
+
45
+ .bibliography__page-link:hover {
46
+ text-decoration: underline;
47
+ }
48
+
49
+ .bibliography__notes {
50
+ list-style: none;
51
+ margin: 0;
52
+ padding: 0;
53
+ display: flex;
54
+ flex-direction: column;
55
+ gap: 0.75rem;
56
+ }
57
+
58
+ .bibliography__note {
59
+ display: grid;
60
+ grid-template-columns: auto 1fr;
61
+ gap: 0.5rem;
62
+ border-top: 1px solid var(--color-gray-100);
63
+ padding-top: 0.65rem;
64
+ }
65
+
66
+ .bibliography__note:first-child {
67
+ border-top: none;
68
+ padding-top: 0;
69
+ }
70
+
71
+ .bibliography__note-label {
72
+ @include type.ui(bold);
73
+ font-variant-numeric: tabular-nums;
74
+ color: var(--color-gray-muted);
75
+ }
76
+
77
+ // A note is reading text.
78
+ .bibliography__note-body {
79
+ @include type.body;
80
+ }
81
+
82
+ .bibliography__note-body p {
83
+ margin: 0;
84
+ }
85
+
86
+ .bibliography__note-body p + p {
87
+ margin-top: 0.6rem;
88
+ }
@@ -0,0 +1,143 @@
1
+ @use "../settings/focus" as focus;
2
+ @use "../settings/type";
3
+
4
+ // What every control Canopy draws as a button starts from: a box of its padding, a 1px
5
+ // edge in its text color, its corners `--canopy-radius-md`. Each control sets its own
6
+ // edge, fill and focus after it.
7
+ @mixin canopy-button-base($padding-y: 0.6rem, $padding-x: 1.4rem) {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ gap: 0.35rem;
12
+ padding: $padding-y $padding-x;
13
+ border: 1px solid currentColor;
14
+ border-radius: var(--canopy-radius-md);
15
+ color: inherit;
16
+ font: inherit;
17
+ text-decoration: none;
18
+ cursor: pointer;
19
+ line-height: 1.4;
20
+ transition:
21
+ background-color 0.12s ease,
22
+ color 0.12s ease,
23
+ border-color 0.12s ease;
24
+ }
25
+
26
+ @mixin canopy-button-variant($variant) {
27
+ @if $variant == "primary" {
28
+ background-color: var(--color-accent-default);
29
+ border-color: var(--color-accent-default);
30
+ color: var(--color-accent-50);
31
+
32
+ // Darker (lighter, in dark mode) than the rest fill, never toward the label, so the
33
+ // label keeps 4.5:1 (`--color-accent-hover`, theme-palette.js; ACCESSIBILITY.md C5).
34
+ &:hover,
35
+ &:focus-visible {
36
+ background-color: var(--color-accent-hover);
37
+ border-color: var(--color-accent-hover);
38
+ }
39
+ } @else if $variant == "secondary" {
40
+ // No fill; its edge 3:1 against the page (1.4.11), the accent's text step under the
41
+ // pointer.
42
+ border-color: var(--canopy-control-edge);
43
+ background-color: transparent;
44
+ color: var(--color-gray-900);
45
+
46
+ &:hover {
47
+ border-color: var(--color-accent-default);
48
+ color: var(--color-accent-default);
49
+ }
50
+ } @else if $variant == "ghost" {
51
+ border-color: transparent;
52
+ }
53
+ }
54
+
55
+ @layer components {
56
+ // `<Button>`: a link (or `as` another element) drawn as a call to action, 44px tall,
57
+ // its corners `--canopy-radius-lg`. On a `<Band>`, each variant takes the band's colors.
58
+ .canopy-button {
59
+ @include canopy-button-base(0.625rem, 1.125rem);
60
+ box-sizing: border-box;
61
+ min-height: 2.75rem;
62
+ gap: 0.5rem;
63
+ border-color: currentColor;
64
+ border-radius: var(--canopy-radius-lg);
65
+ // The interface's, wherever it sits: a `<Feature>`'s words are the serif.
66
+ @include type.ui-sm;
67
+ transition:
68
+ background-color 0.12s ease,
69
+ color 0.12s ease,
70
+ border-color 0.12s ease,
71
+ transform 0.12s ease;
72
+
73
+ &:hover {
74
+ text-decoration: none;
75
+ }
76
+
77
+ &:focus-visible {
78
+ @include focus.focus-ring;
79
+ }
80
+
81
+ &:active {
82
+ transform: translateY(1px);
83
+ }
84
+
85
+ &--primary {
86
+ @include canopy-button-variant("primary");
87
+ }
88
+
89
+ &--secondary {
90
+ @include canopy-button-variant("secondary");
91
+ }
92
+
93
+ &--ghost {
94
+ @include canopy-button-variant("ghost");
95
+ }
96
+ }
97
+
98
+ @media (prefers-reduced-motion: reduce) {
99
+ .canopy-button {
100
+ transition: none;
101
+ }
102
+
103
+ .canopy-button:active {
104
+ transform: none;
105
+ }
106
+ }
107
+
108
+ .canopy-button-group {
109
+ display: flex;
110
+ flex-direction: column;
111
+ align-items: flex-start;
112
+ gap: 0.5rem;
113
+ }
114
+
115
+ .canopy-button-group__text {
116
+ @include type.h4;
117
+ color: var(--color-gray-900);
118
+ margin-bottom: 1rem;
119
+ }
120
+
121
+ .canopy-button-group__actions {
122
+ display: flex;
123
+ flex-wrap: wrap;
124
+ align-items: center;
125
+ gap: 0.75rem;
126
+ padding: 0.618rem 0 1.618rem;
127
+ width: 100%;
128
+ }
129
+
130
+ .canopy-button-group--interstitial {
131
+ width: 100%;
132
+ align-items: center;
133
+ text-align: center;
134
+ padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 4vw, 4rem);
135
+ margin: 2rem 0;
136
+ }
137
+
138
+ .canopy-button-group--interstitial .canopy-button-group__actions {
139
+ justify-content: center;
140
+ padding: 0;
141
+ gap: 0.75rem;
142
+ }
143
+ }
@@ -0,0 +1,109 @@
1
+ @use "../settings/focus" as focus;
2
+ @use "../settings/type";
3
+
4
+ // `<Card>`: a link lifted off the page (`--canopy-card-shadow`: a hairline edge, then a
5
+ // close, soft shadow), its corners `--canopy-radius-lg`, its picture to the edges and its
6
+ // words under it, the title bold. Under the pointer it lifts a little further and its
7
+ // title takes the accent, underlined; focused, it takes the focus ring.
8
+ .canopy-card {
9
+ display: block;
10
+ text-decoration: none;
11
+ color: inherit;
12
+ border-radius: var(--canopy-radius-lg);
13
+ background-color: var(--canopy-surface-raised);
14
+ box-shadow: var(--canopy-card-shadow);
15
+ overflow: hidden;
16
+ transition:
17
+ box-shadow 150ms ease,
18
+ transform 150ms var(--canopy-ease);
19
+
20
+ figure {
21
+ margin: 0;
22
+ }
23
+
24
+ .canopy-card-media {
25
+ position: relative;
26
+ width: 100%;
27
+ padding-bottom: var(--canopy-card-padding);
28
+ overflow: hidden;
29
+ background-color: var(--canopy-surface);
30
+
31
+ > img {
32
+ position: absolute;
33
+ inset: 0;
34
+ width: 100%;
35
+ height: 100%;
36
+ object-fit: cover;
37
+ display: flex;
38
+ justify-content: center;
39
+ text-align: center;
40
+ flex-direction: column;
41
+ opacity: 0;
42
+ transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1);
43
+ color: var(--color-gray-muted);
44
+ font-size: var(--canopy-text-sm);
45
+ }
46
+ }
47
+
48
+ &[data-image-loaded="true"] .canopy-card-media > img {
49
+ opacity: 1;
50
+ }
51
+
52
+ .canopy-card-image {
53
+ display: block;
54
+ width: 100%;
55
+ height: auto;
56
+ opacity: 0;
57
+ transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1);
58
+ }
59
+
60
+ &[data-image-loaded="true"] .canopy-card-image {
61
+ opacity: 1;
62
+ }
63
+
64
+ figcaption {
65
+ display: flex;
66
+ flex-direction: column;
67
+ gap: 0.236rem;
68
+ padding: 0.75rem 1rem 1rem;
69
+
70
+ > span:first-child {
71
+ @include type.ui(bold);
72
+ display: block;
73
+ color: var(--color-gray-900);
74
+ text-underline-offset: 0.2em;
75
+ }
76
+
77
+ > span + span {
78
+ @include type.ui-sm;
79
+ display: block;
80
+ color: var(--color-gray-muted);
81
+ }
82
+ }
83
+
84
+ &:hover {
85
+ box-shadow:
86
+ 0 0 0 1px var(--canopy-edge),
87
+ var(--canopy-shadow-lg);
88
+ transform: translateY(-2px);
89
+
90
+ figcaption > span:first-child {
91
+ color: var(--color-accent-default);
92
+ text-decoration-line: underline;
93
+ }
94
+ }
95
+
96
+ &:focus-visible {
97
+ @include focus.focus-ring;
98
+ }
99
+ }
100
+
101
+ @media (prefers-reduced-motion: reduce) {
102
+ .canopy-card {
103
+ transition: none;
104
+
105
+ &:hover {
106
+ transform: none;
107
+ }
108
+ }
109
+ }
@@ -0,0 +1,76 @@
1
+ @use "../settings/type";
2
+
3
+ .canopy-diagram {
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: clamp(1rem, 3vw, 1.618rem);
7
+ padding: clamp(1.618rem, 3vw, 2.618rem) 0;
8
+ }
9
+
10
+ .canopy-diagram__section {
11
+ padding: 0 clamp(1rem, 3vw, 1.618rem);
12
+
13
+ h3 {
14
+ text-align: center;
15
+ margin-top: 0;
16
+ }
17
+ }
18
+
19
+ .canopy-diagram__section-summary {
20
+ display: block;
21
+ text-align: center;
22
+ padding-bottom: 1.618rem;
23
+ @include type.ui;
24
+ color: var(--color-gray-muted);
25
+ }
26
+
27
+ .canopy-diagram__grid {
28
+ display: grid;
29
+ gap: 1.618rem;
30
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
31
+
32
+ article {
33
+ background: linear-gradient(
34
+ 173deg,
35
+ transparent 0%,
36
+ var(--color-accent-200) 100%
37
+ );
38
+ padding: 1rem 1.618rem;
39
+ }
40
+
41
+ h3 {
42
+ @include type.h4;
43
+ margin: 0 0 0.382rem;
44
+ text-align: center;
45
+ color: var(--color-accent-default);
46
+ }
47
+
48
+ ul {
49
+ @include type.ui-sm;
50
+ padding-top: 1rem;
51
+ }
52
+ }
53
+
54
+ .canopy-diagram__arrow {
55
+ display: flex;
56
+ flex-direction: column;
57
+ align-items: center;
58
+ }
59
+
60
+ .canopy-diagram__arrow-line {
61
+ width: 6px;
62
+ height: 2.618rem;
63
+ background: linear-gradient(
64
+ to bottom,
65
+ transparent,
66
+ var(--color-accent-default)
67
+ );
68
+ }
69
+
70
+ .canopy-diagram__arrow-head {
71
+ width: 0;
72
+ height: 0;
73
+ border-left: 0.618rem solid transparent;
74
+ border-right: 0.618rem solid transparent;
75
+ border-top: 1rem solid var(--color-accent-default);
76
+ }
@@ -0,0 +1,66 @@
1
+ @use "../settings/type";
2
+ // `<Feature>`: a section's introduction, after Clover's homepage. The eyebrow small,
3
+ // uppercase and bold in the accent's text step (4.5:1); the title at a section title's
4
+ // size by the window's width (`--canopy-text-title`), bold; the words under it a lede,
5
+ // muted, kept to a readable measure.
6
+ @layer components {
7
+ .canopy-feature {
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-items: flex-start;
11
+ gap: 1rem;
12
+ margin: clamp(2.618rem, 7vw, 4.236rem) 0 clamp(1.618rem, 4vw, 2.618rem);
13
+ }
14
+
15
+ .canopy-feature[data-align="center"] {
16
+ align-items: center;
17
+ text-align: center;
18
+ }
19
+
20
+ .canopy-feature__heading {
21
+ display: flex;
22
+ flex-direction: column;
23
+ gap: 0.382rem;
24
+ margin: 0;
25
+ }
26
+
27
+ .canopy-feature[data-align="center"] .canopy-feature__heading {
28
+ align-items: center;
29
+ }
30
+
31
+ .canopy-feature__eyebrow {
32
+ @include type.label;
33
+ margin: 0;
34
+ padding: 0;
35
+ color: var(--color-accent-default);
36
+ }
37
+
38
+ .canopy-feature__title {
39
+ @include type.title;
40
+ margin: 0;
41
+ }
42
+
43
+ // Its words in the reading serif, at a lede's size, whatever they are.
44
+ .canopy-feature__body {
45
+ display: flex;
46
+ flex-direction: column;
47
+ align-items: inherit;
48
+ gap: 1rem;
49
+ max-width: 44rem;
50
+ @include type.lede;
51
+ }
52
+
53
+ .canopy-feature__body > * {
54
+ margin: 0;
55
+ padding: 0;
56
+ font-size: inherit;
57
+ }
58
+
59
+ .canopy-feature__body .canopy-button-group__actions {
60
+ padding: 0;
61
+ }
62
+
63
+ .canopy-feature[data-align="center"] .canopy-button-group__actions {
64
+ justify-content: center;
65
+ }
66
+ }
@@ -0,0 +1,136 @@
1
+ @use "../settings/focus" as focus;
2
+ @use "../settings/type";
3
+
4
+ // The footer (`CanopyFooter`), in Clover's layout: set off from the page by white space,
5
+ // no line over it; what the site is, at the golden ratio of its width; its own content in
6
+ // the muted text; a row under a hairline with its links and the appearance switch. Links
7
+ // are the accent's text step, underlined (1.4.1), and each line of the row is 24px tall at
8
+ // the least (2.5.8).
9
+ @layer components {
10
+ .canopy-footer {
11
+ color: var(--color-gray-muted);
12
+ }
13
+
14
+ .canopy-footer__inner {
15
+ box-sizing: border-box;
16
+ margin: 0 auto;
17
+ width: 100%;
18
+ max-width: 80rem;
19
+ padding: 2.618rem clamp(1rem, 3vw, 2rem) 4.236rem;
20
+ display: flex;
21
+ flex-direction: column;
22
+ align-items: flex-start;
23
+ gap: 0.618rem;
24
+ @include type.ui-sm;
25
+ }
26
+
27
+ .canopy-footer__inner > * {
28
+ margin: 0;
29
+ }
30
+
31
+ .canopy-footer a {
32
+ color: var(--color-accent-default);
33
+ text-decoration-line: underline;
34
+ text-underline-offset: 0.2em;
35
+ }
36
+
37
+ .canopy-footer a:hover {
38
+ text-decoration-thickness: max(2px, 0.1em);
39
+ }
40
+
41
+ .canopy-footer a:focus-visible {
42
+ @include focus.focus-ring;
43
+ }
44
+
45
+ // As wide as the footer, to the golden ratio of it, so a long site name shortens to
46
+ // fit rather than push the page sideways at 320px (1.4.10).
47
+ .canopy-footer__about {
48
+ display: flex;
49
+ flex-direction: column;
50
+ align-items: flex-start;
51
+ align-self: stretch;
52
+ gap: 0.618rem;
53
+ max-width: 61.8%;
54
+ min-width: 0;
55
+ margin-bottom: 1rem;
56
+ }
57
+
58
+ .canopy-footer .canopy-footer__brand {
59
+ color: var(--color-gray-default);
60
+ text-decoration: none;
61
+ }
62
+
63
+ .canopy-footer__lede {
64
+ @include type.lede;
65
+ text-wrap: balance;
66
+ }
67
+
68
+ .canopy-footer__legal {
69
+ display: flex;
70
+ flex-wrap: wrap;
71
+ align-items: center;
72
+ justify-content: space-between;
73
+ gap: 0.618rem 1.618rem;
74
+ align-self: stretch;
75
+ margin-top: 1.618rem;
76
+ padding-top: 1.618rem;
77
+ border-top: 1px solid var(--canopy-edge);
78
+ }
79
+
80
+ .canopy-footer__links {
81
+ display: flex;
82
+ flex-wrap: wrap;
83
+ gap: 0.382rem 1.618rem;
84
+ list-style: none;
85
+ margin: 0;
86
+ padding: 0;
87
+ }
88
+
89
+ .canopy-footer__links li {
90
+ min-block-size: 24px;
91
+ margin: 0;
92
+ list-style: none;
93
+ }
94
+
95
+ // The appearance switch (`AppearanceToggle`, `theme.appearance: auto`): its label in
96
+ // the footer's muted text, the select's edge 3:1 against the page.
97
+ .canopy-appearance {
98
+ display: inline-flex;
99
+ align-items: center;
100
+ gap: 0.5rem;
101
+ margin-left: auto;
102
+ }
103
+
104
+ .canopy-appearance[hidden] {
105
+ display: none;
106
+ }
107
+
108
+ .canopy-appearance__label {
109
+ color: var(--color-gray-muted);
110
+ }
111
+
112
+ .canopy-appearance__select {
113
+ min-height: 2rem;
114
+ padding: 0.25rem 0.618rem;
115
+ border: 1px solid var(--canopy-control-edge);
116
+ border-radius: var(--canopy-radius-md);
117
+ background-color: var(--color-gray-50);
118
+ color: var(--color-gray-900);
119
+ font: inherit;
120
+ cursor: pointer;
121
+ }
122
+
123
+ .canopy-appearance__select:focus-visible {
124
+ @include focus.focus-ring;
125
+ }
126
+
127
+ @media (max-width: 48rem) {
128
+ .canopy-footer__about {
129
+ max-width: none;
130
+ }
131
+
132
+ .canopy-appearance {
133
+ margin-left: 0;
134
+ }
135
+ }
136
+ }