@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
package/src/page-layout.gts
CHANGED
|
@@ -15,7 +15,6 @@ function removeLoader() {
|
|
|
15
15
|
document.querySelector('#initial-loader')?.remove();
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
function resetScroll(..._args: unknown[]) {
|
|
20
19
|
document.querySelector('html')?.scrollTo(0, 0);
|
|
21
20
|
}
|
|
@@ -35,40 +34,100 @@ const onWindowScroll = modifier(() => {
|
|
|
35
34
|
};
|
|
36
35
|
});
|
|
37
36
|
|
|
37
|
+
export const PageLoader: TOC<{
|
|
38
|
+
Blocks: {
|
|
39
|
+
defaultl: [];
|
|
40
|
+
};
|
|
41
|
+
}> = <template>
|
|
42
|
+
<div class="loading-page" role="status">
|
|
43
|
+
{{yield}}
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<style>
|
|
47
|
+
@keyframes shimmer {
|
|
48
|
+
0% {
|
|
49
|
+
background-position: -1000px 0;
|
|
50
|
+
}
|
|
51
|
+
100% {
|
|
52
|
+
background-position: 1000px 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.loading-page {
|
|
57
|
+
position: fixed;
|
|
58
|
+
top: 0rem;
|
|
59
|
+
padding: 0.5rem 1rem;
|
|
60
|
+
background: linear-gradient(
|
|
61
|
+
90deg,
|
|
62
|
+
rgba(40, 40, 50, 0.9),
|
|
63
|
+
rgba(60, 60, 70, 0.9),
|
|
64
|
+
rgba(40, 40, 50, 0.9)
|
|
65
|
+
);
|
|
66
|
+
background-size: 1000px 100%;
|
|
67
|
+
animation: shimmer 2s infinite;
|
|
68
|
+
filter: drop-shadow(0 0.5rem 0.5rem rgba(0, 0, 0, 0.8));
|
|
69
|
+
color: white;
|
|
70
|
+
right: 0;
|
|
71
|
+
width: 100%;
|
|
72
|
+
border-bottom-left-radius: 0.25rem;
|
|
73
|
+
border-bottom-right-radius: 0.25rem;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media (prefers-reduced-motion: reduce) {
|
|
77
|
+
.loading-page {
|
|
78
|
+
animation: shimmer 10s infinite;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
82
|
+
</template>;
|
|
83
|
+
|
|
84
|
+
export function hasReason(error: unknown): error is { reason: string; original: Error } {
|
|
85
|
+
return (
|
|
86
|
+
typeof error === 'object' &&
|
|
87
|
+
error !== null &&
|
|
88
|
+
'reason' in error &&
|
|
89
|
+
typeof error.reason === 'string'
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const PageError: TOC<{
|
|
94
|
+
Args: {
|
|
95
|
+
error: string | { reason: string; original: Error };
|
|
96
|
+
};
|
|
97
|
+
}> = <template>
|
|
98
|
+
<div class="error" data-page-error role="alert">
|
|
99
|
+
{{#if (hasReason @error)}}
|
|
100
|
+
{{@error.reason}}
|
|
101
|
+
<details>
|
|
102
|
+
<summary>Original error</summary>
|
|
103
|
+
<pre>{{@error.original.stack}}</pre>
|
|
104
|
+
</details>
|
|
105
|
+
{{else}}
|
|
106
|
+
{{@error}}
|
|
107
|
+
{{/if}}
|
|
108
|
+
</div>
|
|
109
|
+
</template>;
|
|
110
|
+
|
|
38
111
|
export const PageLayout: TOC<{
|
|
39
112
|
Blocks: {
|
|
40
113
|
logoLink: [];
|
|
41
114
|
topRight: [];
|
|
42
115
|
editLink: [typeof EditLink];
|
|
43
|
-
error: [error: string];
|
|
116
|
+
error: [error: string | { reason: string; original: Error }];
|
|
44
117
|
};
|
|
45
118
|
}> = <template>
|
|
46
119
|
<ResponsiveMenuLayout>
|
|
47
120
|
<:header as |Toggle|>
|
|
48
|
-
<header
|
|
49
|
-
class="
|
|
50
|
-
|
|
51
|
-
isScrolled.current
|
|
52
|
-
'dark:bg-slate-900/95 dark:backdrop-blur dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75'
|
|
53
|
-
'dark:bg-slate-900/95'
|
|
54
|
-
}}"
|
|
55
|
-
{{onWindowScroll}}
|
|
56
|
-
>
|
|
57
|
-
<div class="outer-content flex flex-none flex-wrap items-center justify-between py-4">
|
|
58
|
-
<div class="flex mr-6 lg:hidden">
|
|
121
|
+
<header class="page-header {{if isScrolled.current 'is-scrolled'}}" {{onWindowScroll}}>
|
|
122
|
+
<div class="outer-content page-header__inner">
|
|
123
|
+
<div class="page-header__toggle">
|
|
59
124
|
<Toggle />
|
|
60
125
|
</div>
|
|
61
|
-
<div class="
|
|
126
|
+
<div class="page-header__logo">
|
|
62
127
|
<a href="/" aria-label="Home page">
|
|
63
128
|
{{yield to="logoLink"}}
|
|
64
129
|
</a>
|
|
65
130
|
</div>
|
|
66
|
-
{{!
|
|
67
|
-
If we ever have a search bar
|
|
68
|
-
<div class="mr-6 -my-5 sm:mr-8 md:mr-0">
|
|
69
|
-
input here
|
|
70
|
-
</div>
|
|
71
|
-
}}
|
|
72
131
|
<TopRight>
|
|
73
132
|
{{yield to="topRight"}}
|
|
74
133
|
</TopRight>
|
|
@@ -76,15 +135,13 @@ export const PageLayout: TOC<{
|
|
|
76
135
|
</header>
|
|
77
136
|
</:header>
|
|
78
137
|
<:content>
|
|
79
|
-
<section data-main-scroll-container class="
|
|
138
|
+
<section data-main-scroll-container class="page-content">
|
|
80
139
|
<Article>
|
|
81
140
|
<Page>
|
|
82
141
|
<:pending>
|
|
83
|
-
<
|
|
84
|
-
class="fixed top-12 p-4 rounded z-50 transition border border-slate-800 duration-500 shadow-xl shadow-slate-900/5 bg-white/95 'dark:bg-slate-900/95 dark:backdrop-blur dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75'"
|
|
85
|
-
>
|
|
142
|
+
<PageLoader>
|
|
86
143
|
Loading, Compiling, etc
|
|
87
|
-
</
|
|
144
|
+
</PageLoader>
|
|
88
145
|
</:pending>
|
|
89
146
|
|
|
90
147
|
<:error as |error|>
|
|
@@ -96,15 +153,6 @@ export const PageLayout: TOC<{
|
|
|
96
153
|
<:success as |prose|>
|
|
97
154
|
<prose />
|
|
98
155
|
{{(removeLoader)}}
|
|
99
|
-
{{! this is probably really bad, and anti-patterny
|
|
100
|
-
but ember doesn't have a good way to have libraries
|
|
101
|
-
tie in to the URL without a bunch of setup -- which is maybe fine?
|
|
102
|
-
needs some experimenting -- there is a bit of a disconnect with
|
|
103
|
-
deriving data from the URL, and the timing of the model hooks.
|
|
104
|
-
It might be possible to have an afterModel hook wait until the page is
|
|
105
|
-
compiled.
|
|
106
|
-
(that's why we have async state, because we're compiling, not loading)
|
|
107
|
-
}}
|
|
108
156
|
{{resetScroll prose}}
|
|
109
157
|
</:success>
|
|
110
158
|
</Page>
|
|
@@ -112,7 +160,7 @@ export const PageLayout: TOC<{
|
|
|
112
160
|
|
|
113
161
|
{{#if (has-block "editLink")}}
|
|
114
162
|
|
|
115
|
-
<div class="
|
|
163
|
+
<div class="edit-link-container">
|
|
116
164
|
|
|
117
165
|
{{yield EditLink to="editLink"}}
|
|
118
166
|
</div>
|
|
@@ -121,17 +169,120 @@ export const PageLayout: TOC<{
|
|
|
121
169
|
</:content>
|
|
122
170
|
|
|
123
171
|
</ResponsiveMenuLayout>
|
|
172
|
+
|
|
173
|
+
<style scoped>
|
|
174
|
+
.page-header {
|
|
175
|
+
position: sticky;
|
|
176
|
+
top: 0;
|
|
177
|
+
z-index: 50;
|
|
178
|
+
transition: all 0.5s;
|
|
179
|
+
box-shadow: 0 4px 6px -1px rgb(15 23 42 / 0.05);
|
|
180
|
+
background-color: rgb(255 255 255 / 0.95);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:is(html[style*="color-scheme: dark"]) .page-header {
|
|
184
|
+
box-shadow: none;
|
|
185
|
+
background-color: rgb(2 2 14 / 0.95);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
:is(html[style*="color-scheme: dark"]) .page-header.is-scrolled {
|
|
189
|
+
backdrop-filter: blur(12px);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@supports (backdrop-filter: blur(0)) {
|
|
193
|
+
:is(html[style*="color-scheme: dark"]) .page-header.is-scrolled {
|
|
194
|
+
background-color: rgb(2 2 14 / 0.75);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.page-header__inner {
|
|
199
|
+
display: flex;
|
|
200
|
+
flex: none;
|
|
201
|
+
flex-wrap: wrap;
|
|
202
|
+
align-items: center;
|
|
203
|
+
justify-content: space-between;
|
|
204
|
+
padding-top: 1rem;
|
|
205
|
+
padding-bottom: 1rem;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.page-header__toggle {
|
|
209
|
+
display: flex;
|
|
210
|
+
margin-right: 1.5rem;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@media (min-width: 1024px) {
|
|
214
|
+
.page-header__toggle {
|
|
215
|
+
display: none;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.page-header__logo {
|
|
220
|
+
position: relative;
|
|
221
|
+
display: flex;
|
|
222
|
+
align-items: center;
|
|
223
|
+
flex-grow: 1;
|
|
224
|
+
flex-basis: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.page-content {
|
|
228
|
+
flex: 1 1 auto;
|
|
229
|
+
max-width: 42rem;
|
|
230
|
+
min-width: 0;
|
|
231
|
+
padding-top: 1rem;
|
|
232
|
+
padding-bottom: 1rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@media (min-width: 1024px) {
|
|
236
|
+
.page-content {
|
|
237
|
+
max-width: none;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.edit-link-container {
|
|
242
|
+
display: flex;
|
|
243
|
+
justify-content: flex-end;
|
|
244
|
+
padding-top: 1.5rem;
|
|
245
|
+
margin-top: 3rem;
|
|
246
|
+
border-top: 1px solid #e2e8f0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
:is(html[style*="color-scheme: dark"]) .edit-link-container {
|
|
250
|
+
border-color: #1e293b;
|
|
251
|
+
}
|
|
252
|
+
</style>
|
|
124
253
|
</template>;
|
|
125
254
|
|
|
126
255
|
const EditLink: TOC<{ Args: { href: string }; Blocks: { default: [] } }> = <template>
|
|
127
|
-
<Link class="edit-page flex" href={{@href}}>
|
|
256
|
+
<Link class="edit-page" style="display: flex;" href={{@href}}>
|
|
128
257
|
{{yield}}
|
|
129
258
|
</Link>
|
|
130
259
|
</template>;
|
|
131
260
|
|
|
132
261
|
export const TopRight: TOC<{ Blocks: { default: [] } }> = <template>
|
|
133
|
-
<div class="
|
|
262
|
+
<div class="top-right">
|
|
134
263
|
<ThemeToggle />
|
|
135
264
|
{{yield}}
|
|
136
265
|
</div>
|
|
266
|
+
|
|
267
|
+
<style scoped>
|
|
268
|
+
.top-right {
|
|
269
|
+
position: relative;
|
|
270
|
+
display: flex;
|
|
271
|
+
justify-content: flex-end;
|
|
272
|
+
gap: 1.5rem;
|
|
273
|
+
flex-basis: 0;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@media (min-width: 640px) {
|
|
277
|
+
.top-right {
|
|
278
|
+
gap: 2rem;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
@media (min-width: 768px) {
|
|
283
|
+
.top-right {
|
|
284
|
+
flex-grow: 1;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
</style>
|
|
137
288
|
</template>;
|
package/src/shell.gts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import 'ember-mobile-menu/themes/android';
|
|
2
|
-
/**
|
|
3
|
-
* NOTE: while this project uses tailwind,
|
|
4
|
-
* CSS is better than tailwind for
|
|
5
|
-
* - global styles
|
|
6
|
-
* - styling some recursive structures generated by other libraries.
|
|
7
|
-
*
|
|
8
|
-
* Using both together is *very nice* 🎉
|
|
9
|
-
*/
|
|
10
2
|
import './site-css/site.css';
|
|
11
3
|
import './site-css/components.css';
|
|
12
4
|
import './site-css/featured-demo.css';
|
|
13
5
|
import './site-css/shiki.css';
|
|
14
6
|
import './site-css/shell.css';
|
|
7
|
+
import './site-css/prose.css';
|
|
15
8
|
|
|
16
9
|
import { colorScheme } from 'ember-primitives/color-scheme';
|
|
17
10
|
|
package/src/side-nav.gts
CHANGED
|
@@ -4,7 +4,6 @@ import { service } from '@ember/service';
|
|
|
4
4
|
|
|
5
5
|
import { sentenceCase } from 'change-case';
|
|
6
6
|
import { link } from 'ember-primitives/helpers';
|
|
7
|
-
import { selected } from 'kolay';
|
|
8
7
|
import { PageNav } from 'kolay/components';
|
|
9
8
|
import { getAnchor } from 'should-handle-link';
|
|
10
9
|
|
|
@@ -78,12 +77,7 @@ const SectionLink: TOC<{ Element: HTMLAnchorElement; Args: { href: string; name:
|
|
|
78
77
|
{{#let (link @href) as |l|}}
|
|
79
78
|
<a
|
|
80
79
|
href={{@href}}
|
|
81
|
-
class="
|
|
82
|
-
{{if
|
|
83
|
-
l.isActive
|
|
84
|
-
'text-sky-500'
|
|
85
|
-
'text-slate-900 hover:text-slate-600 dark:text-white dark:hover:text-slate-300'
|
|
86
|
-
}}"
|
|
80
|
+
class="section-link {{if l.isActive 'is-active'}}"
|
|
87
81
|
{{on "click" l.handleClick}}
|
|
88
82
|
...attributes
|
|
89
83
|
>
|
|
@@ -101,12 +95,7 @@ const SubSectionLink: TOC<{ Element: HTMLAnchorElement; Args: { href: string; na
|
|
|
101
95
|
{{#let (link @href) as |l|}}
|
|
102
96
|
<a
|
|
103
97
|
href={{@href}}
|
|
104
|
-
class="
|
|
105
|
-
{{if
|
|
106
|
-
l.isActive
|
|
107
|
-
'font-semibold text-sky-500 before:bg-sky-500'
|
|
108
|
-
'text-slate-500 before:hidden before:bg-slate-300 hover:text-slate-600 hover:before:block dark:text-slate-400 dark:before:bg-slate-700 dark:hover:text-slate-300'
|
|
109
|
-
}}"
|
|
98
|
+
class="subsection-link {{if l.isActive 'is-active'}}"
|
|
110
99
|
{{on "click" l.handleClick}}
|
|
111
100
|
...attributes
|
|
112
101
|
>
|
|
@@ -125,19 +114,8 @@ export class SideNav extends Component<{
|
|
|
125
114
|
onClick?: () => void;
|
|
126
115
|
};
|
|
127
116
|
}> {
|
|
128
|
-
get #selected() {
|
|
129
|
-
return selected(this);
|
|
130
|
-
}
|
|
131
117
|
@service('router') declare router: RouterService;
|
|
132
118
|
|
|
133
|
-
get humanSelected() {
|
|
134
|
-
const path = this.#selected?.path;
|
|
135
|
-
|
|
136
|
-
if (!path) return undefined;
|
|
137
|
-
|
|
138
|
-
return path.split('/').filter(Boolean).map(titleize).join(' / ');
|
|
139
|
-
}
|
|
140
|
-
|
|
141
119
|
get rootUrl() {
|
|
142
120
|
return this.router.rootURL;
|
|
143
121
|
}
|
|
@@ -161,7 +139,7 @@ export class SideNav extends Component<{
|
|
|
161
139
|
* The links themselves remain the actual interactive elements.
|
|
162
140
|
*/
|
|
163
141
|
<template>
|
|
164
|
-
<aside class="
|
|
142
|
+
<aside class="side-nav" ...attributes>
|
|
165
143
|
<PageNav aria-label="Main Navigation">
|
|
166
144
|
<:page as |x|>
|
|
167
145
|
<SubSectionLink
|
|
@@ -186,5 +164,101 @@ export class SideNav extends Component<{
|
|
|
186
164
|
</:collection>
|
|
187
165
|
</PageNav>
|
|
188
166
|
</aside>
|
|
167
|
+
|
|
168
|
+
<style scoped>
|
|
169
|
+
.side-nav {
|
|
170
|
+
background-color: white;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.side-nav ul {
|
|
174
|
+
list-style: none;
|
|
175
|
+
margin: 0;
|
|
176
|
+
padding: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.side-nav h2 {
|
|
180
|
+
font-size: 1rem;
|
|
181
|
+
font-weight: 500;
|
|
182
|
+
font-family: var(--font-display, "Helvetica", "Arial", sans-serif);
|
|
183
|
+
color: #0f172a;
|
|
184
|
+
margin: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:is(html[style*="color-scheme: dark"]) .side-nav h2 {
|
|
188
|
+
color: white;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:is(html[style*="color-scheme: dark"]) .side-nav {
|
|
192
|
+
background-color: #02020e;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.section-link {
|
|
196
|
+
font-weight: 500;
|
|
197
|
+
font-family: var(--font-display, "Helvetica", "Arial", sans-serif);
|
|
198
|
+
color: #0f172a;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:is(html[style*="color-scheme: dark"]) .section-link {
|
|
202
|
+
color: white;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.section-link:hover {
|
|
206
|
+
color: #475569;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:is(html[style*="color-scheme: dark"]) .section-link:hover {
|
|
210
|
+
color: #cbd5e1;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.section-link.is-active {
|
|
214
|
+
color: #0ea5e9;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.subsection-link {
|
|
218
|
+
display: block;
|
|
219
|
+
width: 100%;
|
|
220
|
+
position: relative;
|
|
221
|
+
color: #64748b;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.subsection-link::before {
|
|
225
|
+
content: "";
|
|
226
|
+
pointer-events: none;
|
|
227
|
+
position: absolute;
|
|
228
|
+
left: -0.25rem;
|
|
229
|
+
top: 50%;
|
|
230
|
+
height: 0.375rem;
|
|
231
|
+
width: 0.375rem;
|
|
232
|
+
transform: translateY(-50%);
|
|
233
|
+
border-radius: 9999px;
|
|
234
|
+
background-color: #cbd5e1;
|
|
235
|
+
display: none;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.subsection-link:hover {
|
|
239
|
+
color: #475569;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.subsection-link:hover::before {
|
|
243
|
+
display: block;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
:is(html[style*="color-scheme: dark"]) .subsection-link {
|
|
247
|
+
color: #94a3b8;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:is(html[style*="color-scheme: dark"]) .subsection-link::before {
|
|
251
|
+
background-color: #334155;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
:is(html[style*="color-scheme: dark"]) .subsection-link:hover {
|
|
255
|
+
color: #cbd5e1;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.subsection-link.is-active {
|
|
259
|
+
font-weight: 600;
|
|
260
|
+
color: #0ea5e9;
|
|
261
|
+
}
|
|
262
|
+
</style>
|
|
189
263
|
</template>
|
|
190
264
|
}
|
|
@@ -1,23 +1,103 @@
|
|
|
1
|
+
/* Lightbulb icon (callout) */
|
|
2
|
+
.lightbulb-icon {
|
|
3
|
+
--icon-foreground: #0f172a;
|
|
4
|
+
--icon-background: white;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.icon-bg-fill {
|
|
8
|
+
fill: var(--icon-background);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.icon-fg-fill {
|
|
12
|
+
fill: var(--icon-foreground);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.lightbulb-light {
|
|
16
|
+
display: block;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.lightbulb-dark {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:is(html[style*="color-scheme: dark"]) .lightbulb-light {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:is(html[style*="color-scheme: dark"]) .lightbulb-dark {
|
|
28
|
+
display: inline;
|
|
29
|
+
}
|
|
30
|
+
|
|
1
31
|
.edit-page:after {
|
|
2
32
|
content: "➚";
|
|
3
|
-
|
|
33
|
+
padding-left: 0.25rem;
|
|
4
34
|
}
|
|
5
35
|
|
|
6
36
|
.prose details {
|
|
7
|
-
|
|
37
|
+
padding-left: 1.5rem;
|
|
38
|
+
padding-right: 1.5rem;
|
|
39
|
+
padding-top: 0.75rem;
|
|
40
|
+
padding-bottom: 0.75rem;
|
|
41
|
+
margin-bottom: 1.5rem;
|
|
42
|
+
margin-top: 0;
|
|
43
|
+
border: 1px solid #e2e8f0;
|
|
44
|
+
border-radius: 0.75rem;
|
|
45
|
+
|
|
46
|
+
:is(html[style*="color-scheme: dark"]) & {
|
|
47
|
+
border-color: #1e293b;
|
|
48
|
+
}
|
|
8
49
|
}
|
|
9
50
|
|
|
10
51
|
.prose summary {
|
|
11
|
-
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
cursor: default;
|
|
54
|
+
user-select: none;
|
|
55
|
+
color: #0f172a;
|
|
56
|
+
|
|
57
|
+
:is(html[style*="color-scheme: dark"]) & {
|
|
58
|
+
color: #e2e8f0;
|
|
59
|
+
}
|
|
12
60
|
}
|
|
13
61
|
|
|
14
62
|
.prose summary h1,
|
|
15
63
|
.prose summary h2,
|
|
16
64
|
.prose summary h3 {
|
|
17
|
-
|
|
65
|
+
display: inline;
|
|
66
|
+
margin: 0;
|
|
18
67
|
}
|
|
19
68
|
|
|
20
69
|
.prose pre {
|
|
21
70
|
max-height: 520px;
|
|
22
71
|
}
|
|
23
72
|
|
|
73
|
+
/* Styled links used in Links component */
|
|
74
|
+
.styled-link {
|
|
75
|
+
--link-prose-background: #fff;
|
|
76
|
+
--link-prose-underline: #7dd3fc;
|
|
77
|
+
--link-prose-underline-size: 4px;
|
|
78
|
+
|
|
79
|
+
font-size: 0.875rem;
|
|
80
|
+
line-height: 1.25rem;
|
|
81
|
+
font-weight: 600;
|
|
82
|
+
text-decoration: none;
|
|
83
|
+
box-shadow:
|
|
84
|
+
inset 0 -2px 0 0 var(--link-prose-background),
|
|
85
|
+
inset 0 calc(-1 * (var(--link-prose-underline-size) + 2px)) 0 0 var(--link-prose-underline);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.styled-link:hover {
|
|
89
|
+
--link-prose-underline-size: 6px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:is(html[style*="color-scheme: dark"]) .styled-link {
|
|
93
|
+
--link-prose-background: #0f172a;
|
|
94
|
+
--link-prose-underline: #075985;
|
|
95
|
+
|
|
96
|
+
color: #38bdf8;
|
|
97
|
+
box-shadow: inset 0 calc(-1 * var(--link-prose-underline-size, 2px)) 0 0
|
|
98
|
+
var(--link-prose-underline);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:is(html[style*="color-scheme: dark"]) .styled-link:hover {
|
|
102
|
+
--link-prose-underline-size: 6px;
|
|
103
|
+
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
.featured-demo .glimdown-render,
|
|
2
2
|
.featured-demo .repl-sdk__demo {
|
|
3
|
-
|
|
3
|
+
width: 100%;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
padding: 5rem;
|
|
6
|
+
background: linear-gradient(to right, #7c3aed, #4f46e5);
|
|
7
|
+
border-radius: 0.75rem;
|
|
8
|
+
max-height: 20rem;
|
|
9
|
+
color: #f8fafc;
|
|
4
10
|
}
|
|
5
11
|
|
|
6
12
|
.featured-demo.auto-height .glimdown-render,
|
|
7
13
|
.featured-demo.auto-height .repl-sdk__demo {
|
|
8
|
-
|
|
14
|
+
max-height: none;
|
|
9
15
|
}
|