@astrojs/starlight 0.5.6 → 0.6.1
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/404.astro +17 -17
- package/CHANGELOG.md +50 -2
- package/components/CallToAction.astro +32 -35
- package/components/ContentPanel.astro +18 -18
- package/components/EditLink.astro +23 -23
- package/components/FallbackContentNotice.astro +16 -18
- package/components/Footer.astro +28 -34
- package/components/HeadSEO.astro +69 -75
- package/components/Header.astro +47 -51
- package/components/Hero.astro +108 -121
- package/components/Icons.ts +81 -71
- package/components/LanguageSelect.astro +31 -31
- package/components/LastUpdated.astro +16 -18
- package/components/MarkdownContent.astro +105 -117
- package/components/MobileMenuToggle.astro +80 -80
- package/components/PrevNextLinks.astro +60 -60
- package/components/RightSidebar.astro +17 -17
- package/components/RightSidebarPanel.astro +41 -41
- package/components/Search.astro +293 -306
- package/components/Select.astro +64 -65
- package/components/Sidebar.astro +23 -23
- package/components/SidebarSublist.astro +96 -95
- package/components/SiteTitle.astro +65 -63
- package/components/SkipLink.astro +17 -17
- package/components/SocialIcons.astro +40 -34
- package/components/TableOfContents/MobileTableOfContents.astro +124 -124
- package/components/TableOfContents/TableOfContentsList.astro +67 -69
- package/components/TableOfContents/generateToC.ts +41 -43
- package/components/TableOfContents/starlight-toc.ts +84 -90
- package/components/TableOfContents.astro +8 -8
- package/components/ThemeProvider.astro +28 -32
- package/components/ThemeSelect.astro +66 -71
- package/global.d.ts +3 -3
- package/index.astro +1 -1
- package/index.ts +52 -59
- package/integrations/asides.ts +109 -111
- package/integrations/sitemap.ts +10 -13
- package/integrations/virtual-user-config.ts +37 -37
- package/layout/Page.astro +84 -72
- package/layout/PageFrame.astro +67 -69
- package/layout/TwoColumnContent.astro +40 -42
- package/package.json +2 -2
- package/schema.ts +126 -113
- package/schemas/favicon.ts +40 -0
- package/schemas/head.ts +12 -23
- package/schemas/i18n.ts +146 -160
- package/schemas/logo.ts +22 -22
- package/schemas/prevNextLink.ts +14 -14
- package/schemas/tableOfContents.ts +14 -18
- package/style/asides.css +27 -27
- package/style/props.css +168 -172
- package/style/reset.css +13 -13
- package/style/shiki.css +11 -11
- package/style/util.css +30 -30
- package/translations/fr.json +21 -21
- package/translations/index.ts +4 -4
- package/translations/it.json +20 -20
- package/translations/tr.json +1 -1
- package/translations/zh.json +0 -1
- package/user-components/Card.astro +50 -54
- package/user-components/CardGrid.astro +21 -21
- package/user-components/Icon.astro +19 -21
- package/user-components/TabItem.astro +3 -3
- package/user-components/Tabs.astro +113 -117
- package/user-components/rehype-tabs.ts +72 -72
- package/utils/base.ts +6 -6
- package/utils/git.ts +55 -55
- package/utils/head.ts +56 -54
- package/utils/i18n.ts +3 -3
- package/utils/localizedUrl.ts +25 -25
- package/utils/navigation.ts +225 -203
- package/utils/routing.ts +74 -85
- package/utils/slugs.ts +41 -51
- package/utils/translations.ts +26 -32
- package/utils/user-config.ts +282 -278
- package/virtual.d.ts +8 -8
package/components/Search.astro
CHANGED
|
@@ -4,327 +4,314 @@ import { useTranslations } from '../utils/translations';
|
|
|
4
4
|
import Icon from '../user-components/Icon.astro';
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
|
-
|
|
7
|
+
locale: string | undefined;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const t = useTranslations(Astro.props.locale);
|
|
11
11
|
const pagefindTranslations = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
value,
|
|
17
|
-
])
|
|
18
|
-
),
|
|
12
|
+
placeholder: t('search.label'),
|
|
13
|
+
...Object.fromEntries(
|
|
14
|
+
Object.entries(t.pick('pagefind.')).map(([key, value]) => [key.replace('pagefind.', ''), value])
|
|
15
|
+
),
|
|
19
16
|
};
|
|
20
17
|
---
|
|
21
18
|
|
|
22
19
|
<site-search data-translations={JSON.stringify(pagefindTranslations)}>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
</div>
|
|
56
|
-
</dialog>
|
|
20
|
+
<button data-open-modal disabled>
|
|
21
|
+
{
|
|
22
|
+
/* The span is `aria-hidden` because it is not shown on small screens. Instead, the icon label is used for accessibility purposes. */
|
|
23
|
+
}
|
|
24
|
+
<Icon name="magnifier" label={t('search.label')} />
|
|
25
|
+
<span class="hidden md:block" aria-hidden="true">{t('search.label')}</span>
|
|
26
|
+
<Icon name="forward-slash" class="hidden md:block" label={t('search.shortcutLabel')} />
|
|
27
|
+
</button>
|
|
28
|
+
|
|
29
|
+
<dialog style="padding:0" aria-label={t('search.label')}>
|
|
30
|
+
<div class="dialog-frame flex">
|
|
31
|
+
{
|
|
32
|
+
/* TODO: Make the layout of this button flexible to accommodate different word lengths. Currently hard-coded for English: “Cancel” */
|
|
33
|
+
}
|
|
34
|
+
<button data-close-modal class="flex md:hidden">
|
|
35
|
+
{t('search.cancelLabel')}
|
|
36
|
+
</button>
|
|
37
|
+
{
|
|
38
|
+
import.meta.env.DEV ? (
|
|
39
|
+
<div style="margin: auto; text-align: center; white-space: pre-line;" dir="ltr">
|
|
40
|
+
<p>{t('search.devWarning')}</p>
|
|
41
|
+
</div>
|
|
42
|
+
) : (
|
|
43
|
+
<div class="search-container">
|
|
44
|
+
<div id="starlight__search" />
|
|
45
|
+
</div>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
</div>
|
|
49
|
+
</dialog>
|
|
57
50
|
</site-search>
|
|
58
51
|
|
|
59
52
|
<script>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
customElements.define('site-search', SiteSearch);
|
|
53
|
+
class SiteSearch extends HTMLElement {
|
|
54
|
+
constructor() {
|
|
55
|
+
super();
|
|
56
|
+
const openBtn = this.querySelector<HTMLButtonElement>('button[data-open-modal]')!;
|
|
57
|
+
const closeBtn = this.querySelector<HTMLButtonElement>('button[data-close-modal]')!;
|
|
58
|
+
const dialog = this.querySelector('dialog')!;
|
|
59
|
+
const dialogFrame = this.querySelector('.dialog-frame')!;
|
|
60
|
+
|
|
61
|
+
/** Close the modal if a user clicks outside of the modal. */
|
|
62
|
+
const onWindowClick = (event: MouseEvent) => {
|
|
63
|
+
if (
|
|
64
|
+
document.body.contains(event.target as Node) &&
|
|
65
|
+
!dialogFrame.contains(event.target as Node)
|
|
66
|
+
)
|
|
67
|
+
closeModal();
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const openModal = (event?: MouseEvent) => {
|
|
71
|
+
dialog.showModal();
|
|
72
|
+
this.querySelector('input')?.focus();
|
|
73
|
+
event?.stopPropagation();
|
|
74
|
+
window.addEventListener('click', onWindowClick);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const closeModal = () => {
|
|
78
|
+
dialog.close();
|
|
79
|
+
window.removeEventListener('click', onWindowClick);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
openBtn.addEventListener('click', openModal);
|
|
83
|
+
openBtn.disabled = false;
|
|
84
|
+
closeBtn.addEventListener('click', closeModal);
|
|
85
|
+
|
|
86
|
+
// Listen for `/` and `cmd + k` keyboard shortcuts.
|
|
87
|
+
window.addEventListener('keydown', (e) => {
|
|
88
|
+
const isInput =
|
|
89
|
+
document.activeElement &&
|
|
90
|
+
['input', 'select', 'textarea'].includes(document.activeElement.tagName.toLowerCase());
|
|
91
|
+
if (e.metaKey === true && e.key === 'k') {
|
|
92
|
+
dialog.open ? closeModal() : openModal();
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
} else if (e.key === '/' && !dialog.open && !isInput) {
|
|
95
|
+
openModal();
|
|
96
|
+
e.preventDefault();
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
let translations = {};
|
|
101
|
+
try {
|
|
102
|
+
translations = JSON.parse(this.dataset.translations || '{}');
|
|
103
|
+
} catch {}
|
|
104
|
+
|
|
105
|
+
window.addEventListener('DOMContentLoaded', () => {
|
|
106
|
+
if (import.meta.env.DEV) return;
|
|
107
|
+
const onIdle = window.requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
108
|
+
onIdle(async () => {
|
|
109
|
+
const { PagefindUI } = await import('@pagefind/default-ui');
|
|
110
|
+
new PagefindUI({
|
|
111
|
+
element: '#starlight__search',
|
|
112
|
+
baseUrl: import.meta.env.BASE_URL,
|
|
113
|
+
bundlePath: import.meta.env.BASE_URL.replace(/\/$/, '') + '/_pagefind/',
|
|
114
|
+
showImages: false,
|
|
115
|
+
translations,
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
customElements.define('site-search', SiteSearch);
|
|
135
122
|
</script>
|
|
136
123
|
|
|
137
124
|
<style>
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
125
|
+
button[data-open-modal] {
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: 0.5rem;
|
|
129
|
+
border: 0;
|
|
130
|
+
background-color: transparent;
|
|
131
|
+
color: var(--sl-color-gray-1);
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
height: 2.5rem;
|
|
134
|
+
font-size: var(--sl-text-xl);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media (min-width: 50rem) {
|
|
138
|
+
button[data-open-modal] {
|
|
139
|
+
border: 1px solid var(--sl-color-gray-5);
|
|
140
|
+
border-radius: 0.5rem;
|
|
141
|
+
padding-inline-start: 0.75rem;
|
|
142
|
+
padding-inline-end: 1rem;
|
|
143
|
+
background-color: var(--sl-color-black);
|
|
144
|
+
color: var(--sl-color-gray-2);
|
|
145
|
+
font-size: var(--sl-text-sm);
|
|
146
|
+
width: 100%;
|
|
147
|
+
max-width: 22rem;
|
|
148
|
+
}
|
|
149
|
+
button[data-open-modal]:hover {
|
|
150
|
+
border-color: var(--sl-color-gray-2);
|
|
151
|
+
color: var(--sl-color-white);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
button[data-open-modal] > :last-child {
|
|
155
|
+
margin-inline-start: auto;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
dialog {
|
|
160
|
+
margin: 0;
|
|
161
|
+
background-color: var(--sl-color-gray-6);
|
|
162
|
+
border: 1px solid var(--sl-color-gray-5);
|
|
163
|
+
width: 100%;
|
|
164
|
+
max-width: 100%;
|
|
165
|
+
height: 100%;
|
|
166
|
+
max-height: 100%;
|
|
167
|
+
box-shadow: var(--sl-shadow-lg);
|
|
168
|
+
}
|
|
169
|
+
dialog[open] {
|
|
170
|
+
display: grid;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
dialog::backdrop {
|
|
174
|
+
background-color: var(--sl-color-backdrop-overlay);
|
|
175
|
+
-webkit-backdrop-filter: blur(0.25rem);
|
|
176
|
+
backdrop-filter: blur(0.25rem);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.dialog-frame {
|
|
180
|
+
flex-direction: column;
|
|
181
|
+
gap: 1rem;
|
|
182
|
+
padding: 1.5rem;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
button[data-close-modal] {
|
|
186
|
+
position: absolute;
|
|
187
|
+
z-index: 1;
|
|
188
|
+
align-items: center;
|
|
189
|
+
align-self: flex-end;
|
|
190
|
+
height: calc(64px * var(--pagefind-ui-scale));
|
|
191
|
+
padding: 0.25rem;
|
|
192
|
+
border: 0;
|
|
193
|
+
background: transparent;
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
color: var(--sl-color-text-accent);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
#starlight__search {
|
|
199
|
+
--pagefind-ui-primary: var(--sl-color-accent-light);
|
|
200
|
+
--pagefind-ui-text: var(--sl-color-gray-2);
|
|
201
|
+
--pagefind-ui-background: var(--sl-color-black);
|
|
202
|
+
--pagefind-ui-border: var(--sl-color-gray-5);
|
|
203
|
+
--pagefind-ui-border-width: 1px;
|
|
204
|
+
--sl-search-cancel-space: 5rem;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@media (min-width: 50rem) {
|
|
208
|
+
#starlight__search {
|
|
209
|
+
--sl-search-cancel-space: 0px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
dialog {
|
|
213
|
+
margin: 4rem auto auto;
|
|
214
|
+
border-radius: 0.5rem;
|
|
215
|
+
width: 90%;
|
|
216
|
+
max-width: 40rem;
|
|
217
|
+
height: max-content;
|
|
218
|
+
min-height: 15rem;
|
|
219
|
+
max-height: calc(100% - 8rem);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
235
222
|
</style>
|
|
236
223
|
|
|
237
224
|
<style is:global>
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
225
|
+
#starlight__search .pagefind-ui__form::before {
|
|
226
|
+
--pagefind-ui-text: var(--sl-color-gray-1);
|
|
227
|
+
opacity: 1;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
#starlight__search .pagefind-ui__search-input {
|
|
231
|
+
color: var(--sl-color-white);
|
|
232
|
+
font-weight: 400;
|
|
233
|
+
width: calc(100% - var(--sl-search-cancel-space));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
#starlight__search input:focus {
|
|
237
|
+
--pagefind-ui-border: var(--sl-color-accent);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
#starlight__search .pagefind-ui__search-clear {
|
|
241
|
+
inset-inline-end: var(--sl-search-cancel-space);
|
|
242
|
+
width: calc(60px * var(--pagefind-ui-scale));
|
|
243
|
+
padding: 0;
|
|
244
|
+
background-color: transparent;
|
|
245
|
+
overflow: hidden;
|
|
246
|
+
}
|
|
247
|
+
#starlight__search .pagefind-ui__search-clear:focus {
|
|
248
|
+
outline: 1px solid var(--sl-color-accent);
|
|
249
|
+
}
|
|
250
|
+
#starlight__search .pagefind-ui__search-clear::before {
|
|
251
|
+
content: '';
|
|
252
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m13.41 12 6.3-6.29a1 1 0 1 0-1.42-1.42L12 10.59l-6.29-6.3a1 1 0 0 0-1.42 1.42l6.3 6.29-6.3 6.29a1 1 0 0 0 .33 1.64 1 1 0 0 0 1.09-.22l6.29-6.3 6.29 6.3a1 1 0 0 0 1.64-.33 1 1 0 0 0-.22-1.09L13.41 12Z'/%3E%3C/svg%3E")
|
|
253
|
+
center / 50% no-repeat;
|
|
254
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m13.41 12 6.3-6.29a1 1 0 1 0-1.42-1.42L12 10.59l-6.29-6.3a1 1 0 0 0-1.42 1.42l6.3 6.29-6.3 6.29a1 1 0 0 0 .33 1.64 1 1 0 0 0 1.09-.22l6.29-6.3 6.29 6.3a1 1 0 0 0 1.64-.33 1 1 0 0 0-.22-1.09L13.41 12Z'/%3E%3C/svg%3E")
|
|
255
|
+
center / 50% no-repeat;
|
|
256
|
+
background-color: var(--sl-color-text-accent);
|
|
257
|
+
display: block;
|
|
258
|
+
width: 100%;
|
|
259
|
+
height: 100%;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
#starlight__search .pagefind-ui__results > * + * {
|
|
263
|
+
margin-top: 0.5rem;
|
|
264
|
+
}
|
|
265
|
+
#starlight__search .pagefind-ui__result {
|
|
266
|
+
position: relative;
|
|
267
|
+
border: 0;
|
|
268
|
+
border-radius: 0.25rem;
|
|
269
|
+
padding: 1rem;
|
|
270
|
+
background-color: var(--sl-color-black);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
#starlight__search .pagefind-ui__result:hover,
|
|
274
|
+
#starlight__search .pagefind-ui__result:focus-within {
|
|
275
|
+
outline: 1px solid var(--sl-color-accent-high);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
#starlight__search .pagefind-ui__result:focus-within {
|
|
279
|
+
background-color: var(--sl-color-accent-low);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
#starlight__search .pagefind-ui__result-thumb,
|
|
283
|
+
#starlight__search .pagefind-ui__result-inner {
|
|
284
|
+
margin-top: 0;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
#starlight__search .pagefind-ui__result-link {
|
|
288
|
+
--pagefind-ui-text: var(--sl-color-white);
|
|
289
|
+
font-weight: 600;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
#starlight__search .pagefind-ui__result-link:hover {
|
|
293
|
+
text-decoration: none;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
#starlight__search .pagefind-ui__result-link::after {
|
|
297
|
+
content: '';
|
|
298
|
+
position: absolute;
|
|
299
|
+
inset: 0;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
#starlight__search .pagefind-ui__result-excerpt {
|
|
303
|
+
font-size: var(--sl-text-body-sm);
|
|
304
|
+
word-break: break-word;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
#starlight__search mark {
|
|
308
|
+
color: var(--sl-color-white);
|
|
309
|
+
background-color: var(--sl-color-accent-low);
|
|
310
|
+
font-weight: 500;
|
|
311
|
+
padding: 0.1em 0.2em;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
#starlight__search .pagefind-ui__result:focus-within mark {
|
|
315
|
+
text-decoration: underline;
|
|
316
|
+
}
|
|
330
317
|
</style>
|