@universal-ember/docs-support 0.9.3 → 0.9.5
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/declarations/article.d.ts.map +1 -1
- package/declarations/callout.d.ts.map +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/links.d.ts.map +1 -1
- package/declarations/menu-layout.d.ts.map +1 -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.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.js +23 -70
- package/dist/site-css/components.css +85 -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 +3 -8
- package/src/article.gts +1 -36
- package/src/callout.gts +48 -8
- package/src/errors.gts +10 -1
- package/src/h2.gts +1 -1
- package/src/icons.gts +6 -12
- package/src/index-page.gts +69 -6
- package/src/links.gts +2 -12
- package/src/menu-layout.gts +15 -2
- package/src/page-layout.gts +111 -31
- package/src/shell.gts +1 -8
- package/src/side-nav.gts +99 -13
- package/src/site-css/components.css +85 -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/icons.gts
CHANGED
|
@@ -90,13 +90,7 @@ export const Moon: TOC<{ Element: SVGElement }> = <template>
|
|
|
90
90
|
</template>;
|
|
91
91
|
|
|
92
92
|
export const LightBulb: TOC<{ Element: SVGElement }> = <template>
|
|
93
|
-
<svg
|
|
94
|
-
aria-hidden="true"
|
|
95
|
-
viewBox="0 0 32 32"
|
|
96
|
-
fill="none"
|
|
97
|
-
class="[--icon-foreground:theme(colors.slate.900)] [--icon-background:theme(colors.white)]"
|
|
98
|
-
...attributes
|
|
99
|
-
>
|
|
93
|
+
<svg aria-hidden="true" viewBox="0 0 32 32" fill="none" class="lightbulb-icon" ...attributes>
|
|
100
94
|
<defs>
|
|
101
95
|
<radialGradient
|
|
102
96
|
cx="0"
|
|
@@ -120,25 +114,25 @@ export const LightBulb: TOC<{ Element: SVGElement }> = <template>
|
|
|
120
114
|
<stop stop-color="#0EA5E9"></stop><stop stop-color="#22D3EE" offset=".527"></stop>
|
|
121
115
|
<stop stop-color="#818CF8" offset="1"></stop>
|
|
122
116
|
</radialGradient></defs>
|
|
123
|
-
<g class="
|
|
117
|
+
<g class="lightbulb-light">
|
|
124
118
|
<circle cx="20" cy="20" r="12" fill="url(#:S6:-gradient)"></circle>
|
|
125
119
|
<path
|
|
126
120
|
fill-rule="evenodd"
|
|
127
121
|
clip-rule="evenodd"
|
|
128
122
|
d="M20 24.995c0-1.855 1.094-3.501 2.427-4.792C24.61 18.087 26 15.07 26 12.231 26 7.133 21.523 3 16 3S6 7.133 6 12.23c0 2.84 1.389 5.857 3.573 7.973C10.906 21.494 12 23.14 12 24.995V27a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-2.005Z"
|
|
129
|
-
class="
|
|
123
|
+
class="icon-bg-fill"
|
|
130
124
|
fill-opacity="0.5"
|
|
131
125
|
></path>
|
|
132
126
|
<path
|
|
133
127
|
d="M25 12.23c0 2.536-1.254 5.303-3.269 7.255l1.391 1.436c2.354-2.28 3.878-5.547 3.878-8.69h-2ZM16 4c5.047 0 9 3.759 9 8.23h2C27 6.508 21.998 2 16 2v2Zm-9 8.23C7 7.76 10.953 4 16 4V2C10.002 2 5 6.507 5 12.23h2Zm3.269 7.255C8.254 17.533 7 14.766 7 12.23H5c0 3.143 1.523 6.41 3.877 8.69l1.392-1.436ZM13 27v-2.005h-2V27h2Zm1 1a1 1 0 0 1-1-1h-2a3 3 0 0 0 3 3v-2Zm4 0h-4v2h4v-2Zm1-1a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2Zm0-2.005V27h2v-2.005h-2ZM8.877 20.921C10.132 22.136 11 23.538 11 24.995h2c0-2.253-1.32-4.143-2.731-5.51L8.877 20.92Zm12.854-1.436C20.32 20.852 19 22.742 19 24.995h2c0-1.457.869-2.859 2.122-4.074l-1.391-1.436Z"
|
|
134
|
-
class="
|
|
128
|
+
class="icon-fg-fill"
|
|
135
129
|
></path>
|
|
136
130
|
<path
|
|
137
131
|
d="M20 26a1 1 0 1 0 0-2v2Zm-8-2a1 1 0 1 0 0 2v-2Zm2 0h-2v2h2v-2Zm1 1V13.5h-2V25h2Zm-5-11.5v1h2v-1h-2Zm3.5 4.5h5v-2h-5v2Zm8.5-3.5v-1h-2v1h2ZM20 24h-2v2h2v-2Zm-2 0h-4v2h4v-2Zm-1-10.5V25h2V13.5h-2Zm2.5-2.5a2.5 2.5 0 0 0-2.5 2.5h2a.5.5 0 0 1 .5-.5v-2Zm2.5 2.5a2.5 2.5 0 0 0-2.5-2.5v2a.5.5 0 0 1 .5.5h2ZM18.5 18a3.5 3.5 0 0 0 3.5-3.5h-2a1.5 1.5 0 0 1-1.5 1.5v2ZM10 14.5a3.5 3.5 0 0 0 3.5 3.5v-2a1.5 1.5 0 0 1-1.5-1.5h-2Zm2.5-3.5a2.5 2.5 0 0 0-2.5 2.5h2a.5.5 0 0 1 .5-.5v-2Zm2.5 2.5a2.5 2.5 0 0 0-2.5-2.5v2a.5.5 0 0 1 .5.5h2Z"
|
|
138
|
-
class="
|
|
132
|
+
class="icon-fg-fill"
|
|
139
133
|
></path>
|
|
140
134
|
</g>
|
|
141
|
-
<g class="
|
|
135
|
+
<g class="lightbulb-dark">
|
|
142
136
|
<path
|
|
143
137
|
fill-rule="evenodd"
|
|
144
138
|
clip-rule="evenodd"
|
package/src/index-page.gts
CHANGED
|
@@ -14,17 +14,20 @@ export const IndexPage: TOC<{
|
|
|
14
14
|
footer: [];
|
|
15
15
|
};
|
|
16
16
|
}> = <template>
|
|
17
|
-
<Hero class="
|
|
18
|
-
<header class="
|
|
17
|
+
<Hero class="index-hero gradient-background">
|
|
18
|
+
<header class="index-hero__header">
|
|
19
19
|
{{yield to="header"}}
|
|
20
20
|
</header>
|
|
21
21
|
|
|
22
|
-
<div class="
|
|
23
|
-
<div
|
|
22
|
+
<div class="index-hero__body">
|
|
23
|
+
<div
|
|
24
|
+
style="width: 66%; margin: 0 auto; transform: translateY(-20%);"
|
|
25
|
+
class="index-hero__grid"
|
|
26
|
+
>
|
|
24
27
|
<h1 style="filter: drop-shadow(3px 5px 0px rgba(0, 0, 0, 0.4));">
|
|
25
28
|
{{yield to="logo"}}
|
|
26
29
|
</h1>
|
|
27
|
-
<p class="
|
|
30
|
+
<p class="index-hero__tagline">
|
|
28
31
|
{{yield to="tagline"}}
|
|
29
32
|
</p>
|
|
30
33
|
</div>
|
|
@@ -35,7 +38,67 @@ export const IndexPage: TOC<{
|
|
|
35
38
|
{{yield to="content"}}
|
|
36
39
|
|
|
37
40
|
<hr />
|
|
38
|
-
<footer style="padding: 3rem; width: 66%;" class="
|
|
41
|
+
<footer style="padding: 3rem; width: 66%;" class="index-footer">
|
|
39
42
|
{{yield to="footer"}}
|
|
40
43
|
</footer>
|
|
44
|
+
|
|
45
|
+
<style scoped>
|
|
46
|
+
.index-hero {
|
|
47
|
+
box-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.05);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.index-hero__header {
|
|
51
|
+
position: absolute;
|
|
52
|
+
right: 0;
|
|
53
|
+
bottom: 0;
|
|
54
|
+
z-index: 50;
|
|
55
|
+
padding: 1rem;
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (min-width: 768px) {
|
|
61
|
+
.index-hero__header {
|
|
62
|
+
position: sticky;
|
|
63
|
+
top: 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.index-hero__body {
|
|
68
|
+
height: 100%;
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
gap: 2rem;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
align-items: center;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.index-hero__grid {
|
|
77
|
+
display: grid;
|
|
78
|
+
gap: 1rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.index-hero__tagline {
|
|
82
|
+
font-style: italic;
|
|
83
|
+
color: white;
|
|
84
|
+
width: 100%;
|
|
85
|
+
margin-left: auto;
|
|
86
|
+
margin-right: auto;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (min-width: 768px) {
|
|
90
|
+
.index-hero__tagline {
|
|
91
|
+
width: 50%;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.index-footer {
|
|
96
|
+
margin-left: auto;
|
|
97
|
+
margin-right: auto;
|
|
98
|
+
gap: 3rem;
|
|
99
|
+
flex-wrap: wrap;
|
|
100
|
+
display: flex;
|
|
101
|
+
justify-content: space-between;
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
41
104
|
</template>;
|
package/src/links.gts
CHANGED
|
@@ -2,21 +2,11 @@ import { ExternalLink } from 'ember-primitives/components/external-link';
|
|
|
2
2
|
|
|
3
3
|
import type { TOC } from '@ember/component/template-only';
|
|
4
4
|
|
|
5
|
-
const linkClasses = `
|
|
6
|
-
text-sm font-semibold
|
|
7
|
-
dark:text-sky-400
|
|
8
|
-
no-underline shadow-[inset_0_-2px_0_0_var(--tw-prose-background,#fff),inset_0_calc(-1*(var(--tw-prose-underline-size,4px)+2px))_0_0_var(--tw-prose-underline,theme(colors.sky.300))]
|
|
9
|
-
hover:[--tw-prose-underline-size:6px]
|
|
10
|
-
dark:[--tw-prose-background:theme(colors.slate.900)]
|
|
11
|
-
dark:shadow-[inset_0_calc(-1*var(--tw-prose-underline-size,2px))_0_0_var(--tw-prose-underline,theme(colors.sky.800))]
|
|
12
|
-
dark:hover:[--tw-prose-underline-size:6px]
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
5
|
export const InternalLink: TOC<{
|
|
16
6
|
Element: HTMLAnchorElement;
|
|
17
7
|
Blocks: { default: [] };
|
|
18
8
|
}> = <template>
|
|
19
|
-
<a class=
|
|
9
|
+
<a class="styled-link" href="#" ...attributes>
|
|
20
10
|
{{yield}}
|
|
21
11
|
</a>
|
|
22
12
|
</template>;
|
|
@@ -25,7 +15,7 @@ export const Link: TOC<{
|
|
|
25
15
|
Element: HTMLAnchorElement;
|
|
26
16
|
Blocks: { default: [] };
|
|
27
17
|
}> = <template>
|
|
28
|
-
<ExternalLink class=
|
|
18
|
+
<ExternalLink class="styled-link" ...attributes>
|
|
29
19
|
{{yield}}
|
|
30
20
|
</ExternalLink>
|
|
31
21
|
</template>;
|
package/src/menu-layout.gts
CHANGED
|
@@ -13,7 +13,7 @@ const Toggle: TOC<{
|
|
|
13
13
|
};
|
|
14
14
|
}> = <template>
|
|
15
15
|
<@toggle>
|
|
16
|
-
<Menu
|
|
16
|
+
<Menu style="width: 1.5rem; height: 1.5rem; stroke: #64748b;" />
|
|
17
17
|
</@toggle>
|
|
18
18
|
</template>;
|
|
19
19
|
|
|
@@ -34,10 +34,23 @@ export const ResponsiveMenuLayout: TOC<{
|
|
|
34
34
|
<div class="outer-content">
|
|
35
35
|
<SideNav />
|
|
36
36
|
|
|
37
|
-
<main class="
|
|
37
|
+
<main class="page-main">
|
|
38
38
|
{{yield to="content"}}
|
|
39
39
|
</main>
|
|
40
40
|
</div>
|
|
41
41
|
</mmw.Content>
|
|
42
42
|
</MenuWrapper>
|
|
43
|
+
|
|
44
|
+
<style scoped>
|
|
45
|
+
.page-main {
|
|
46
|
+
position: relative;
|
|
47
|
+
display: grid;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
flex: 1 1 auto;
|
|
50
|
+
width: 100%;
|
|
51
|
+
margin-left: auto;
|
|
52
|
+
margin-right: auto;
|
|
53
|
+
max-width: 88rem;
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
43
56
|
</template>;
|
package/src/page-layout.gts
CHANGED
|
@@ -118,30 +118,16 @@ export const PageLayout: TOC<{
|
|
|
118
118
|
}> = <template>
|
|
119
119
|
<ResponsiveMenuLayout>
|
|
120
120
|
<:header as |Toggle|>
|
|
121
|
-
<header
|
|
122
|
-
class="
|
|
123
|
-
|
|
124
|
-
isScrolled.current
|
|
125
|
-
'dark:bg-slate-900/95 dark:backdrop-blur dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75'
|
|
126
|
-
'dark:bg-slate-900/95'
|
|
127
|
-
}}"
|
|
128
|
-
{{onWindowScroll}}
|
|
129
|
-
>
|
|
130
|
-
<div class="outer-content flex flex-none flex-wrap items-center justify-between py-4">
|
|
131
|
-
<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">
|
|
132
124
|
<Toggle />
|
|
133
125
|
</div>
|
|
134
|
-
<div class="
|
|
126
|
+
<div class="page-header__logo">
|
|
135
127
|
<a href="/" aria-label="Home page">
|
|
136
128
|
{{yield to="logoLink"}}
|
|
137
129
|
</a>
|
|
138
130
|
</div>
|
|
139
|
-
{{!
|
|
140
|
-
If we ever have a search bar
|
|
141
|
-
<div class="mr-6 -my-5 sm:mr-8 md:mr-0">
|
|
142
|
-
input here
|
|
143
|
-
</div>
|
|
144
|
-
}}
|
|
145
131
|
<TopRight>
|
|
146
132
|
{{yield to="topRight"}}
|
|
147
133
|
</TopRight>
|
|
@@ -149,7 +135,7 @@ export const PageLayout: TOC<{
|
|
|
149
135
|
</header>
|
|
150
136
|
</:header>
|
|
151
137
|
<:content>
|
|
152
|
-
<section data-main-scroll-container class="
|
|
138
|
+
<section data-main-scroll-container class="page-content">
|
|
153
139
|
<Article>
|
|
154
140
|
<Page>
|
|
155
141
|
<:pending>
|
|
@@ -167,15 +153,6 @@ export const PageLayout: TOC<{
|
|
|
167
153
|
<:success as |prose|>
|
|
168
154
|
<prose />
|
|
169
155
|
{{(removeLoader)}}
|
|
170
|
-
{{! this is probably really bad, and anti-patterny
|
|
171
|
-
but ember doesn't have a good way to have libraries
|
|
172
|
-
tie in to the URL without a bunch of setup -- which is maybe fine?
|
|
173
|
-
needs some experimenting -- there is a bit of a disconnect with
|
|
174
|
-
deriving data from the URL, and the timing of the model hooks.
|
|
175
|
-
It might be possible to have an afterModel hook wait until the page is
|
|
176
|
-
compiled.
|
|
177
|
-
(that's why we have async state, because we're compiling, not loading)
|
|
178
|
-
}}
|
|
179
156
|
{{resetScroll prose}}
|
|
180
157
|
</:success>
|
|
181
158
|
</Page>
|
|
@@ -183,7 +160,7 @@ export const PageLayout: TOC<{
|
|
|
183
160
|
|
|
184
161
|
{{#if (has-block "editLink")}}
|
|
185
162
|
|
|
186
|
-
<div class="
|
|
163
|
+
<div class="edit-link-container">
|
|
187
164
|
|
|
188
165
|
{{yield EditLink to="editLink"}}
|
|
189
166
|
</div>
|
|
@@ -192,17 +169,120 @@ export const PageLayout: TOC<{
|
|
|
192
169
|
</:content>
|
|
193
170
|
|
|
194
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>
|
|
195
253
|
</template>;
|
|
196
254
|
|
|
197
255
|
const EditLink: TOC<{ Args: { href: string }; Blocks: { default: [] } }> = <template>
|
|
198
|
-
<Link class="edit-page flex" href={{@href}}>
|
|
256
|
+
<Link class="edit-page" style="display: flex;" href={{@href}}>
|
|
199
257
|
{{yield}}
|
|
200
258
|
</Link>
|
|
201
259
|
</template>;
|
|
202
260
|
|
|
203
261
|
export const TopRight: TOC<{ Blocks: { default: [] } }> = <template>
|
|
204
|
-
<div class="
|
|
262
|
+
<div class="top-right">
|
|
205
263
|
<ThemeToggle />
|
|
206
264
|
{{yield}}
|
|
207
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>
|
|
208
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
|
@@ -77,12 +77,7 @@ const SectionLink: TOC<{ Element: HTMLAnchorElement; Args: { href: string; name:
|
|
|
77
77
|
{{#let (link @href) as |l|}}
|
|
78
78
|
<a
|
|
79
79
|
href={{@href}}
|
|
80
|
-
class="
|
|
81
|
-
{{if
|
|
82
|
-
l.isActive
|
|
83
|
-
'text-sky-500'
|
|
84
|
-
'text-slate-900 hover:text-slate-600 dark:text-white dark:hover:text-slate-300'
|
|
85
|
-
}}"
|
|
80
|
+
class="section-link {{if l.isActive 'is-active'}}"
|
|
86
81
|
{{on "click" l.handleClick}}
|
|
87
82
|
...attributes
|
|
88
83
|
>
|
|
@@ -100,12 +95,7 @@ const SubSectionLink: TOC<{ Element: HTMLAnchorElement; Args: { href: string; na
|
|
|
100
95
|
{{#let (link @href) as |l|}}
|
|
101
96
|
<a
|
|
102
97
|
href={{@href}}
|
|
103
|
-
class="
|
|
104
|
-
{{if
|
|
105
|
-
l.isActive
|
|
106
|
-
'font-semibold text-sky-500 before:bg-sky-500'
|
|
107
|
-
'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'
|
|
108
|
-
}}"
|
|
98
|
+
class="subsection-link {{if l.isActive 'is-active'}}"
|
|
109
99
|
{{on "click" l.handleClick}}
|
|
110
100
|
...attributes
|
|
111
101
|
>
|
|
@@ -149,7 +139,7 @@ export class SideNav extends Component<{
|
|
|
149
139
|
* The links themselves remain the actual interactive elements.
|
|
150
140
|
*/
|
|
151
141
|
<template>
|
|
152
|
-
<aside class="
|
|
142
|
+
<aside class="side-nav" ...attributes>
|
|
153
143
|
<PageNav aria-label="Main Navigation">
|
|
154
144
|
<:page as |x|>
|
|
155
145
|
<SubSectionLink
|
|
@@ -174,5 +164,101 @@ export class SideNav extends Component<{
|
|
|
174
164
|
</:collection>
|
|
175
165
|
</PageNav>
|
|
176
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>
|
|
177
263
|
</template>
|
|
178
264
|
}
|
|
@@ -1,22 +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
|
}
|
|
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
|
}
|