@universal-ember/docs-support 0.9.2 → 0.9.4
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 +0 -1
- package/declarations/article.d.ts.map +1 -1
- package/declarations/callout.d.ts.map +1 -1
- package/declarations/errors.d.ts +1 -1
- package/declarations/errors.d.ts.map +1 -1
- package/declarations/icons.d.ts.map +1 -1
- package/declarations/index-page.d.ts.map +1 -1
- package/declarations/index.d.ts +1 -1
- package/declarations/index.d.ts.map +1 -1
- package/declarations/links.d.ts.map +1 -1
- package/declarations/menu-layout.d.ts.map +1 -1
- package/declarations/page-layout.d.ts +21 -1
- package/declarations/page-layout.d.ts.map +1 -1
- package/declarations/shell.d.ts +1 -8
- package/declarations/shell.d.ts.map +1 -1
- package/declarations/side-nav.d.ts +0 -2
- package/declarations/side-nav.d.ts.map +1 -1
- package/declarations/text.d.ts.map +1 -1
- package/dist/icons.js +1 -1
- package/dist/icons.js.map +1 -1
- package/dist/index-page.css +0 -1
- package/dist/index.js +58 -98
- package/dist/site-css/components.css +84 -4
- package/dist/site-css/featured-demo.css +8 -2
- package/dist/site-css/prose.css +320 -0
- package/dist/site-css/shell.css +21 -3
- package/dist/site-css/site.css +49 -14
- package/dist/theme-toggle.css +9 -1
- package/dist/types/scoped-css.d.ts +2 -0
- package/dist/types/scoped-css.d.ts.map +1 -0
- package/package.json +21 -24
- package/src/article.gts +1 -36
- package/src/callout.gts +48 -8
- package/src/errors.gts +14 -3
- package/src/h2.gts +1 -1
- package/src/icons.gts +6 -12
- package/src/index-page.css +0 -1
- package/src/index-page.gts +69 -6
- package/src/index.gts +2 -2
- package/src/links.gts +2 -12
- package/src/menu-layout.gts +15 -2
- package/src/page-layout.gts +188 -37
- package/src/shell.gts +1 -8
- package/src/side-nav.gts +99 -25
- package/src/site-css/components.css +84 -4
- package/src/site-css/featured-demo.css +8 -2
- package/src/site-css/prose.css +320 -0
- package/src/site-css/shell.css +21 -3
- package/src/site-css/site.css +49 -14
- package/src/text.gts +10 -1
- package/src/theme-toggle.css +9 -1
- package/src/theme-toggle.gts +2 -2
- package/src/types/scoped-css.d.ts +8 -0
- package/tailwind.mjs +0 -74
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prose typography styles
|
|
3
|
+
* Replaces @tailwindcss/typography plugin
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.prose {
|
|
7
|
+
--prose-body: #334155;
|
|
8
|
+
--prose-headings: #0f172a;
|
|
9
|
+
--prose-lead: #64748b;
|
|
10
|
+
--prose-links: #0f172a;
|
|
11
|
+
--prose-bold: #0f172a;
|
|
12
|
+
--prose-counters: #64748b;
|
|
13
|
+
--prose-bullets: #94a3b8;
|
|
14
|
+
--prose-hr: #e2e8f0;
|
|
15
|
+
--prose-quotes: #0f172a;
|
|
16
|
+
--prose-quote-borders: #e2e8f0;
|
|
17
|
+
--prose-captions: #64748b;
|
|
18
|
+
--prose-kbd: #0f172a;
|
|
19
|
+
--prose-kbd-shadows: 17 24 39;
|
|
20
|
+
--prose-code: #0f172a;
|
|
21
|
+
--prose-pre-code: #e2e8f0;
|
|
22
|
+
--prose-pre-bg: #02020e;
|
|
23
|
+
--prose-th-borders: #cbd5e1;
|
|
24
|
+
--prose-td-borders: #e2e8f0;
|
|
25
|
+
--prose-background: #fff;
|
|
26
|
+
--prose-underline: #7dd3fc;
|
|
27
|
+
--prose-underline-size: 2px;
|
|
28
|
+
|
|
29
|
+
color: var(--prose-body);
|
|
30
|
+
max-width: none;
|
|
31
|
+
font-size: 1rem;
|
|
32
|
+
line-height: 1.75;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:is(html[style*="color-scheme: dark"]) .prose {
|
|
36
|
+
--prose-body: #94a3b8;
|
|
37
|
+
--prose-headings: #f8fafc;
|
|
38
|
+
--prose-lead: #94a3b8;
|
|
39
|
+
--prose-links: #f8fafc;
|
|
40
|
+
--prose-bold: #f8fafc;
|
|
41
|
+
--prose-counters: #94a3b8;
|
|
42
|
+
--prose-bullets: #475569;
|
|
43
|
+
--prose-hr: #1e293b;
|
|
44
|
+
--prose-quotes: #f1f5f9;
|
|
45
|
+
--prose-quote-borders: #1e293b;
|
|
46
|
+
--prose-captions: #94a3b8;
|
|
47
|
+
--prose-kbd: #f8fafc;
|
|
48
|
+
--prose-code: #f8fafc;
|
|
49
|
+
--prose-pre-code: #e2e8f0;
|
|
50
|
+
--prose-pre-bg: rgb(30 41 59 / 0.6);
|
|
51
|
+
--prose-th-borders: #475569;
|
|
52
|
+
--prose-td-borders: #1e293b;
|
|
53
|
+
--prose-background: #0f172a;
|
|
54
|
+
--prose-underline: #075985;
|
|
55
|
+
--prose-underline-size: 2px;
|
|
56
|
+
|
|
57
|
+
color: #94a3b8;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Headings */
|
|
61
|
+
.prose :where(h1, h2, h3, h4, h5, h6):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
62
|
+
color: var(--prose-headings);
|
|
63
|
+
font-weight: 400;
|
|
64
|
+
font-family: var(--font-display, "Helvetica", "Arial", sans-serif);
|
|
65
|
+
display: inline-block;
|
|
66
|
+
scroll-margin-top: 7rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (min-width: 1024px) {
|
|
70
|
+
.prose :where(h1, h2, h3, h4, h5, h6):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
71
|
+
scroll-margin-top: 8.5rem;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.prose :where(h1):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
76
|
+
font-size: 1.875rem;
|
|
77
|
+
line-height: 2.25rem;
|
|
78
|
+
margin-top: 0;
|
|
79
|
+
margin-bottom: 0.875em;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.prose :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
83
|
+
font-size: 1.5em;
|
|
84
|
+
margin-top: 2em;
|
|
85
|
+
margin-bottom: 1em;
|
|
86
|
+
line-height: 1.333;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.prose :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
90
|
+
font-size: 1.25em;
|
|
91
|
+
margin-top: 1.6em;
|
|
92
|
+
margin-bottom: 0.6em;
|
|
93
|
+
line-height: 1.6;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.prose :where(h4):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
97
|
+
margin-top: 1.5em;
|
|
98
|
+
margin-bottom: 0.5em;
|
|
99
|
+
line-height: 1.5;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Paragraphs */
|
|
103
|
+
.prose :where(p):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
104
|
+
margin-top: 1.25em;
|
|
105
|
+
margin-bottom: 1.25em;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Lead text */
|
|
109
|
+
.prose :where([class~="lead"]):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
110
|
+
color: var(--prose-lead);
|
|
111
|
+
font-size: 1.25em;
|
|
112
|
+
line-height: 1.6;
|
|
113
|
+
margin-top: 1.2em;
|
|
114
|
+
margin-bottom: 1.2em;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Links */
|
|
118
|
+
.prose :where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
119
|
+
color: var(--prose-links);
|
|
120
|
+
font-weight: 600;
|
|
121
|
+
text-decoration: none;
|
|
122
|
+
box-shadow:
|
|
123
|
+
inset 0 -2px 0 0 var(--prose-background),
|
|
124
|
+
inset 0 calc(-1 * (var(--prose-underline-size) + 2px)) 0 0 var(--prose-underline);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.prose :where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)):hover {
|
|
128
|
+
--prose-underline-size: 3px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:is(html[style*="color-scheme: dark"])
|
|
132
|
+
.prose
|
|
133
|
+
:where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
134
|
+
color: #38bdf8;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:is(html[style*="color-scheme: dark"])
|
|
138
|
+
.prose
|
|
139
|
+
:where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)):hover {
|
|
140
|
+
--prose-underline-size: 6px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Bold */
|
|
144
|
+
.prose :where(strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
145
|
+
color: var(--prose-bold);
|
|
146
|
+
font-weight: 600;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Lists */
|
|
150
|
+
.prose :where(ol):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
151
|
+
list-style-type: decimal;
|
|
152
|
+
margin-top: 1.25em;
|
|
153
|
+
margin-bottom: 1.25em;
|
|
154
|
+
padding-left: 1.625em;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.prose :where(ul):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
158
|
+
list-style-type: disc;
|
|
159
|
+
margin-top: 1.25em;
|
|
160
|
+
margin-bottom: 1.25em;
|
|
161
|
+
padding-left: 1.625em;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.prose :where(li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
165
|
+
margin-top: 0.5em;
|
|
166
|
+
margin-bottom: 0.5em;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.prose :where(ol > li):not(:where([class~="not-prose"], [class~="not-prose"] *))::marker {
|
|
170
|
+
color: var(--prose-counters);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.prose :where(ul > li):not(:where([class~="not-prose"], [class~="not-prose"] *))::marker {
|
|
174
|
+
color: var(--prose-bullets);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* Blockquotes */
|
|
178
|
+
.prose :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
179
|
+
font-weight: 500;
|
|
180
|
+
font-style: italic;
|
|
181
|
+
color: var(--prose-quotes);
|
|
182
|
+
border-left: 0.25rem solid var(--prose-quote-borders);
|
|
183
|
+
margin-top: 1.6em;
|
|
184
|
+
margin-bottom: 1.6em;
|
|
185
|
+
padding-left: 1em;
|
|
186
|
+
quotes: "\201C" "\201D" "\2018" "\2019";
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Horizontal rules */
|
|
190
|
+
.prose :where(hr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
191
|
+
border-color: var(--prose-hr);
|
|
192
|
+
border-top-width: 1px;
|
|
193
|
+
margin-top: 3em;
|
|
194
|
+
margin-bottom: 3em;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* Code */
|
|
198
|
+
.prose :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
199
|
+
color: var(--prose-code);
|
|
200
|
+
font-weight: 600;
|
|
201
|
+
font-size: 0.875em;
|
|
202
|
+
font-family:
|
|
203
|
+
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
|
|
204
|
+
monospace;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
:is(html[style*="color-scheme: dark"])
|
|
208
|
+
.prose
|
|
209
|
+
:where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
210
|
+
color: #f8fafc;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Pre (code blocks) */
|
|
214
|
+
.prose :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
215
|
+
color: var(--prose-pre-code);
|
|
216
|
+
background-color: var(--prose-pre-bg);
|
|
217
|
+
overflow-x: auto;
|
|
218
|
+
font-weight: 400;
|
|
219
|
+
font-size: 0.875em;
|
|
220
|
+
line-height: 1.714;
|
|
221
|
+
margin-top: 1.714em;
|
|
222
|
+
margin-bottom: 1.714em;
|
|
223
|
+
border-radius: 0.75rem;
|
|
224
|
+
padding: 0.857em 1.143em;
|
|
225
|
+
box-shadow:
|
|
226
|
+
0 10px 15px -3px rgb(0 0 0 / 0.1),
|
|
227
|
+
0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
:is(html[style*="color-scheme: dark"])
|
|
231
|
+
.prose
|
|
232
|
+
:where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
233
|
+
background-color: rgb(30 41 59 / 0.6);
|
|
234
|
+
box-shadow: none;
|
|
235
|
+
outline: 1px solid rgb(203 213 225 / 0.1);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.prose :where(pre code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
239
|
+
background-color: transparent;
|
|
240
|
+
border-width: 0;
|
|
241
|
+
border-radius: 0;
|
|
242
|
+
padding: 0;
|
|
243
|
+
font-weight: inherit;
|
|
244
|
+
color: inherit;
|
|
245
|
+
font-size: inherit;
|
|
246
|
+
font-family: inherit;
|
|
247
|
+
line-height: inherit;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* Tables */
|
|
251
|
+
.prose :where(table):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
252
|
+
width: 100%;
|
|
253
|
+
table-layout: auto;
|
|
254
|
+
text-align: left;
|
|
255
|
+
margin-top: 2em;
|
|
256
|
+
margin-bottom: 2em;
|
|
257
|
+
font-size: 0.875em;
|
|
258
|
+
line-height: 1.714;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.prose :where(thead):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
262
|
+
border-bottom-width: 1px;
|
|
263
|
+
border-bottom-color: var(--prose-th-borders);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.prose :where(thead th):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
267
|
+
color: var(--prose-headings);
|
|
268
|
+
font-weight: 600;
|
|
269
|
+
vertical-align: bottom;
|
|
270
|
+
padding-right: 0.571em;
|
|
271
|
+
padding-bottom: 0.571em;
|
|
272
|
+
padding-left: 0.571em;
|
|
273
|
+
display: table-cell;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.prose :where(tbody tr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
277
|
+
border-bottom-width: 1px;
|
|
278
|
+
border-bottom-color: var(--prose-td-borders);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.prose :where(tbody tr:last-child):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
282
|
+
border-bottom-width: 0;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.prose :where(tbody td):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
286
|
+
vertical-align: baseline;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.prose :where(tfoot):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
290
|
+
border-top-width: 1px;
|
|
291
|
+
border-top-color: var(--prose-th-borders);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.prose :where(tfoot td):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
295
|
+
vertical-align: top;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.prose :where(th, td):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
299
|
+
text-align: left;
|
|
300
|
+
padding: 0.571em;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* Figures and captions */
|
|
304
|
+
.prose :where(figure > *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
305
|
+
margin-top: 0;
|
|
306
|
+
margin-bottom: 0;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.prose :where(figcaption):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
310
|
+
color: var(--prose-captions);
|
|
311
|
+
font-size: 0.875em;
|
|
312
|
+
line-height: 1.428;
|
|
313
|
+
margin-top: 0.857em;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* Images and media */
|
|
317
|
+
.prose :where(img, video):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
|
|
318
|
+
margin-top: 2em;
|
|
319
|
+
margin-bottom: 2em;
|
|
320
|
+
}
|
package/src/site-css/shell.css
CHANGED
|
@@ -12,7 +12,11 @@
|
|
|
12
12
|
|
|
13
13
|
aside,
|
|
14
14
|
aside nav {
|
|
15
|
-
|
|
15
|
+
background: white;
|
|
16
|
+
|
|
17
|
+
:is(html[style*="color-scheme: dark"]) & {
|
|
18
|
+
background: #02020e;
|
|
19
|
+
}
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
/**
|
|
@@ -20,10 +24,22 @@
|
|
|
20
24
|
*/
|
|
21
25
|
.outer-content {
|
|
22
26
|
max-width: 80rem;
|
|
23
|
-
|
|
27
|
+
padding-left: 0.5rem;
|
|
28
|
+
padding-right: 0.5rem;
|
|
24
29
|
display: grid;
|
|
25
30
|
gap: 0.5rem;
|
|
31
|
+
|
|
32
|
+
@media (min-width: 1024px) {
|
|
33
|
+
padding-left: 2rem;
|
|
34
|
+
padding-right: 2rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (min-width: 1280px) {
|
|
38
|
+
padding-left: 3rem;
|
|
39
|
+
padding-right: 3rem;
|
|
40
|
+
}
|
|
26
41
|
}
|
|
42
|
+
|
|
27
43
|
.mobile-menu-wrapper__content {
|
|
28
44
|
.outer-content {
|
|
29
45
|
display: grid;
|
|
@@ -93,9 +109,11 @@ header button.mobile-menu__toggle {
|
|
|
93
109
|
.outer-content {
|
|
94
110
|
grid-template-columns: 1fr;
|
|
95
111
|
|
|
96
|
-
|
|
112
|
+
padding-left: 1rem;
|
|
113
|
+
padding-right: 1rem;
|
|
97
114
|
}
|
|
98
115
|
}
|
|
116
|
+
|
|
99
117
|
.mobile-menu-wrapper__content aside {
|
|
100
118
|
display: none;
|
|
101
119
|
}
|
package/src/site-css/site.css
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
@import "tailwindcss/base";
|
|
2
|
-
@import "tailwindcss/components";
|
|
3
|
-
@import "tailwindcss/utilities";
|
|
4
|
-
|
|
5
1
|
html,
|
|
6
2
|
body {
|
|
7
3
|
/*overflow: hidden;*/
|
|
@@ -10,7 +6,14 @@ body {
|
|
|
10
6
|
|
|
11
7
|
@layer base {
|
|
12
8
|
body {
|
|
13
|
-
|
|
9
|
+
font-family: var(--font-sans);
|
|
10
|
+
color: #111827;
|
|
11
|
+
background-color: white;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:is(html[style*="color-scheme: dark"]) body {
|
|
15
|
+
color: #f1f5f9;
|
|
16
|
+
background-color: #02020e;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
[inert] ::-webkit-scrollbar {
|
|
@@ -30,15 +33,22 @@ textarea,
|
|
|
30
33
|
[tabindex] {
|
|
31
34
|
&:focus,
|
|
32
35
|
&:focus-visible {
|
|
33
|
-
|
|
36
|
+
outline: none;
|
|
34
37
|
}
|
|
38
|
+
|
|
35
39
|
&:focus-visible {
|
|
36
|
-
|
|
40
|
+
box-shadow:
|
|
41
|
+
0 0 0 2px black,
|
|
42
|
+
0 0 0 4px #e04e39;
|
|
43
|
+
border-radius: 0.25rem;
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
[role="switch"][name="color-scheme"]:focus-visible + label .ball {
|
|
41
|
-
|
|
48
|
+
box-shadow:
|
|
49
|
+
0 0 0 2px black,
|
|
50
|
+
0 0 0 4px #e04e39;
|
|
51
|
+
border-radius: 0.25rem;
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
.facade-header {
|
|
@@ -51,26 +61,51 @@ textarea,
|
|
|
51
61
|
}
|
|
52
62
|
|
|
53
63
|
nav[aria-label="Main Navigation"] {
|
|
54
|
-
|
|
64
|
+
font-size: 1rem;
|
|
65
|
+
line-height: 1.5rem;
|
|
55
66
|
|
|
56
67
|
> ul {
|
|
57
|
-
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
gap: 2.25rem;
|
|
58
71
|
|
|
59
72
|
h2 {
|
|
60
|
-
|
|
73
|
+
font-weight: 500;
|
|
74
|
+
color: #0f172a;
|
|
75
|
+
font-family: var(--font-display);
|
|
76
|
+
|
|
77
|
+
:is(html[style*="color-scheme: dark"]) & {
|
|
78
|
+
color: white;
|
|
79
|
+
}
|
|
61
80
|
}
|
|
62
81
|
|
|
63
82
|
ul {
|
|
64
|
-
|
|
83
|
+
margin-top: 0.5rem;
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
gap: 0.5rem;
|
|
87
|
+
border-left: 2px solid #f1f5f9;
|
|
88
|
+
|
|
89
|
+
:is(html[style*="color-scheme: dark"]) & {
|
|
90
|
+
border-color: #1e293b;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@media (min-width: 1024px) {
|
|
94
|
+
margin-top: 1rem;
|
|
95
|
+
gap: 1rem;
|
|
96
|
+
border-color: #e2e8f0;
|
|
97
|
+
}
|
|
65
98
|
}
|
|
66
99
|
|
|
67
100
|
li {
|
|
68
|
-
|
|
101
|
+
padding-left: 1rem;
|
|
102
|
+
position: relative;
|
|
69
103
|
}
|
|
70
104
|
|
|
71
105
|
> li {
|
|
72
106
|
> a {
|
|
73
|
-
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
font-family: var(--font-display);
|
|
74
109
|
}
|
|
75
110
|
}
|
|
76
111
|
}
|
package/src/text.gts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import type { TOC } from '@ember/component/template-only';
|
|
2
2
|
|
|
3
3
|
export const Text: TOC<{ Blocks: { default: [] } }> = <template>
|
|
4
|
-
<span class="
|
|
4
|
+
<span class="adaptive-text">{{yield}}</span>
|
|
5
|
+
|
|
6
|
+
<style scoped>
|
|
7
|
+
.adaptive-text {
|
|
8
|
+
color: #0f172a;
|
|
9
|
+
}
|
|
10
|
+
:is(html[style*="color-scheme: dark"]) .adaptive-text {
|
|
11
|
+
color: white;
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
5
14
|
</template>;
|
package/src/theme-toggle.css
CHANGED
|
@@ -8,7 +8,15 @@
|
|
|
8
8
|
transition: background 0.2s linear;
|
|
9
9
|
|
|
10
10
|
.sr-only {
|
|
11
|
-
|
|
11
|
+
position: absolute;
|
|
12
|
+
width: 1px;
|
|
13
|
+
height: 1px;
|
|
14
|
+
padding: 0;
|
|
15
|
+
margin: -1px;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
clip: rect(0, 0, 0, 0);
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
border-width: 0;
|
|
12
20
|
}
|
|
13
21
|
|
|
14
22
|
input[type="checkbox"][role="switch"] {
|
package/src/theme-toggle.gts
CHANGED
|
@@ -28,8 +28,8 @@ export const ThemeToggle = <template>
|
|
|
28
28
|
🎵 It's raining, it's pouring, ... 🎵
|
|
29
29
|
https://www.youtube.com/watch?v=ll5ykbAumD4
|
|
30
30
|
}}
|
|
31
|
-
<Moon
|
|
32
|
-
<Sun
|
|
31
|
+
<Moon style="fill: #38bdf8;" />
|
|
32
|
+
<Sun style="fill: #facc15;" />
|
|
33
33
|
<span class="ball"></span>
|
|
34
34
|
</s.Label>
|
|
35
35
|
</Switch>
|
package/tailwind.mjs
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import assert from "node:assert";
|
|
3
|
-
import { createRequire } from "node:module";
|
|
4
|
-
|
|
5
|
-
import { readPackageUp } from "read-package-up";
|
|
6
|
-
import { packageUp } from "package-up";
|
|
7
|
-
import defaultTheme from "tailwindcss/defaultTheme.js";
|
|
8
|
-
import typography from "@tailwindcss/typography";
|
|
9
|
-
|
|
10
|
-
// tailwindcss is built incorrectly to allow named imports
|
|
11
|
-
const fontFamily = defaultTheme.fontFamily;
|
|
12
|
-
|
|
13
|
-
const require = createRequire(import.meta.url);
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Thanks, past self
|
|
17
|
-
* https://github.com/CrowdStrike/ember-oss-docs/blob/main/ember-oss-docs/tailwind.cjs
|
|
18
|
-
*/
|
|
19
|
-
const files = "**/*.{js,ts,hbs,gjs,gts,html,md}";
|
|
20
|
-
const sourceEntries = "{app,src,public}";
|
|
21
|
-
|
|
22
|
-
export async function config(root, { packages } = {}) {
|
|
23
|
-
const appManifestPath = await packageUp(root);
|
|
24
|
-
const packageResult = await readPackageUp(root);
|
|
25
|
-
const appRoot = path.dirname(appManifestPath);
|
|
26
|
-
|
|
27
|
-
const appPackageJson = packageResult?.packageJson;
|
|
28
|
-
|
|
29
|
-
assert(appPackageJson, `Could not find package.json for ${root}`);
|
|
30
|
-
|
|
31
|
-
const contentPaths = [
|
|
32
|
-
`${appRoot}/${sourceEntries}/${files}`,
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Also check if addons/libraries contain any tailwind classes
|
|
36
|
-
* that we need to include
|
|
37
|
-
*
|
|
38
|
-
* This may be overkill for the typical app,
|
|
39
|
-
* but for our use case, documentation apps, it should be fine.
|
|
40
|
-
* (The risk here is scanning too many files and potentially
|
|
41
|
-
* running out of files watchers (tho, this isn't a problem on linux haha))
|
|
42
|
-
*/
|
|
43
|
-
...Object.keys(appPackageJson.dependencies)
|
|
44
|
-
.map((depName) => {
|
|
45
|
-
if (packages) {
|
|
46
|
-
if (!packages.includes(depName)) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
const packagePath = path.dirname(require.resolve(depName, { paths: [appRoot] }));
|
|
51
|
-
|
|
52
|
-
return `${packagePath}/${files}`;
|
|
53
|
-
})
|
|
54
|
-
.filter(Boolean),
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
/** @type {import('tailwindcss').Config} */
|
|
58
|
-
return {
|
|
59
|
-
content: [...contentPaths],
|
|
60
|
-
darkMode: "selector",
|
|
61
|
-
theme: {
|
|
62
|
-
extend: {
|
|
63
|
-
maxWidth: {
|
|
64
|
-
"8xl": "88rem",
|
|
65
|
-
},
|
|
66
|
-
fontFamily: {
|
|
67
|
-
sans: ["InterVariable", ...fontFamily.sans],
|
|
68
|
-
display: ["Helvetica, Arial, sans-serif"],
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
plugins: [typography],
|
|
73
|
-
};
|
|
74
|
-
}
|