@grove-dev/astro 0.2.19 → 0.2.20
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/dist/theme.test.js +14 -0
- package/dist/theme.test.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CategoryGrid.astro +2 -11
- package/src/components/ContributorsGrid.astro +2 -11
- package/src/components/CurationGrid.astro +1 -1
- package/src/components/DecisionRow.astro +1 -1
- package/src/components/ExploreByCategory.astro +3 -3
- package/src/components/ExploreByStack.astro +3 -3
- package/src/components/FilterGroupMenu.astro +5 -5
- package/src/components/Hero.astro +8 -8
- package/src/components/Icon.astro +6 -33
- package/src/components/IndexRow.astro +5 -5
- package/src/components/ItemCard.astro +5 -16
- package/src/components/MinimalAbout.astro +2 -2
- package/src/components/OriginalCollection.astro +4 -4
- package/src/components/Pagination.astro +2 -2
- package/src/components/RecordSection.astro +1 -1
- package/src/components/RefinePanel.astro +1 -1
- package/src/components/SmartLensTabs.astro +3 -3
- package/src/components/StackGrid.astro +6 -15
- package/src/components/WhyThisExists.astro +3 -3
- package/src/layouts/Container.astro +4 -4
- package/src/layouts/Footer.astro +3 -3
- package/src/layouts/Header.astro +5 -5
- package/src/layouts/ThemeToggle.astro +1 -1
- package/src/styles.css +33 -339
- package/src/theme.test.ts +15 -0
- package/templates/default/public/icons/stacks/rag.svg +7 -0
- package/templates/default/public/llms-full.txt +1 -1
- package/templates/default/public/sitemap.xml +10 -10
- package/templates/default/src/pages/404.astro +5 -5
- package/templates/default/src/pages/[slug]/[recordSlug].astro +27 -31
- package/templates/default/src/pages/[slug]/index.astro +8 -8
- package/templates/default/src/pages/about.astro +9 -9
- package/templates/default/src/pages/contributors.astro +8 -17
- package/templates/default/src/pages/submit.astro +23 -31
package/dist/theme.test.js
CHANGED
|
@@ -3,6 +3,11 @@ import { resolve } from "node:path";
|
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
4
|
const astroTheme = readFileSync(resolve(import.meta.dirname, "styles.css"), "utf8");
|
|
5
5
|
const scaffoldTheme = readFileSync(resolve(import.meta.dirname, "../templates/default/src/styles/global.css"), "utf8");
|
|
6
|
+
const tailwindMarkup = [
|
|
7
|
+
"components/ItemCard.astro",
|
|
8
|
+
"layouts/Header.astro",
|
|
9
|
+
"../templates/default/src/pages/submit.astro",
|
|
10
|
+
].map((file) => readFileSync(resolve(import.meta.dirname, file), "utf8")).join("\n");
|
|
6
11
|
describe("Astro theme contract", () => {
|
|
7
12
|
it("keeps Starlight's light and dark foundation values", () => {
|
|
8
13
|
expect(astroTheme).toContain("--grove-background: oklch(100% 0 0)");
|
|
@@ -37,5 +42,14 @@ describe("Astro theme contract", () => {
|
|
|
37
42
|
expect(scaffoldTheme).not.toContain("font-family:");
|
|
38
43
|
expect(scaffoldTheme).not.toContain("color-scheme:");
|
|
39
44
|
});
|
|
45
|
+
it("styles components in HTML with Starlight-aligned Tailwind utilities", () => {
|
|
46
|
+
expect(tailwindMarkup).toContain("rounded-[calc(var(--radius)+0.25rem)]");
|
|
47
|
+
expect(tailwindMarkup).toContain("rounded-full");
|
|
48
|
+
expect(tailwindMarkup).toContain("min-h-5");
|
|
49
|
+
expect(tailwindMarkup).toContain("h-8");
|
|
50
|
+
expect(tailwindMarkup).toContain("focus-visible:ring-3");
|
|
51
|
+
expect(astroTheme).not.toContain(".grove-card");
|
|
52
|
+
expect(astroTheme).not.toContain(".grove-btn");
|
|
53
|
+
});
|
|
40
54
|
});
|
|
41
55
|
//# sourceMappingURL=theme.test.js.map
|
package/dist/theme.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.test.js","sourceRoot":"","sources":["../src/theme.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,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,EAAE;QAC7E,MAAM,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,uCAAuC,CAAC,CAAC;QAC1E,MAAM,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QACjD,MAAM,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5C,MAAM,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACxC,MAAM,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;QACzD,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAChD,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -41,10 +41,10 @@ function buildHref(slug: string): string {
|
|
|
41
41
|
|
|
42
42
|
<section
|
|
43
43
|
id="categories"
|
|
44
|
-
class:list={["
|
|
44
|
+
class:list={["py-12 sm:py-16 scroll-mt-20 border-b border-ink-200 dark:border-ink-800", className]}
|
|
45
45
|
aria-labelledby={bare ? undefined : "grove-categorygrid-heading"}
|
|
46
46
|
>
|
|
47
|
-
<div class="
|
|
47
|
+
<div class="mx-auto w-full max-w-container px-5 sm:px-7">
|
|
48
48
|
{!bare && (
|
|
49
49
|
<header class="mb-6">
|
|
50
50
|
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
@@ -97,12 +97,3 @@ function buildHref(slug: string): string {
|
|
|
97
97
|
</div>
|
|
98
98
|
</div>
|
|
99
99
|
</section>
|
|
100
|
-
|
|
101
|
-
<style>
|
|
102
|
-
.line-clamp-2 {
|
|
103
|
-
display: -webkit-box;
|
|
104
|
-
-webkit-line-clamp: 2;
|
|
105
|
-
-webkit-box-orient: vertical;
|
|
106
|
-
overflow: hidden;
|
|
107
|
-
}
|
|
108
|
-
</style>
|
|
@@ -56,10 +56,10 @@ const visible = contributors
|
|
|
56
56
|
---
|
|
57
57
|
|
|
58
58
|
<section
|
|
59
|
-
class:list={["
|
|
59
|
+
class:list={["py-12 sm:py-16", className]}
|
|
60
60
|
aria-labelledby="grove-contributors-heading"
|
|
61
61
|
>
|
|
62
|
-
<div class="
|
|
62
|
+
<div class="mx-auto w-full max-w-container px-5 sm:px-7">
|
|
63
63
|
<header class="mb-6 flex flex-wrap items-end justify-between gap-3">
|
|
64
64
|
<div>
|
|
65
65
|
<h2
|
|
@@ -138,12 +138,3 @@ const visible = contributors
|
|
|
138
138
|
)}
|
|
139
139
|
</div>
|
|
140
140
|
</section>
|
|
141
|
-
|
|
142
|
-
<style>
|
|
143
|
-
.line-clamp-1 {
|
|
144
|
-
display: -webkit-box;
|
|
145
|
-
-webkit-line-clamp: 1;
|
|
146
|
-
-webkit-box-orient: vertical;
|
|
147
|
-
overflow: hidden;
|
|
148
|
-
}
|
|
149
|
-
</style>
|
|
@@ -26,7 +26,7 @@ const columns = [
|
|
|
26
26
|
aria-label="Curation notes"
|
|
27
27
|
>
|
|
28
28
|
{columns.map((column) => (
|
|
29
|
-
<div class="
|
|
29
|
+
<div class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors p-5">
|
|
30
30
|
<h3 class="m-0 text-sm font-semibold uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
31
31
|
{column.title}
|
|
32
32
|
</h3>
|
|
@@ -69,7 +69,7 @@ const cleanup = project?.health?.cleanupCandidate;
|
|
|
69
69
|
</td>
|
|
70
70
|
<td class="px-3 py-2 text-2xs">
|
|
71
71
|
{cleanup ? (
|
|
72
|
-
<span class="
|
|
72
|
+
<span class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground !bg-amber-50 !text-amber-800 dark:!bg-amber-950/80 dark:!text-amber-300">cleanup</span>
|
|
73
73
|
) : (
|
|
74
74
|
<span class="text-ink-400">—</span>
|
|
75
75
|
)}
|
|
@@ -34,8 +34,8 @@ function buildHref(slug: string): string {
|
|
|
34
34
|
}
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
-
<section class:list={["
|
|
38
|
-
<div class="
|
|
37
|
+
<section class:list={["py-10 sm:py-12", className]}>
|
|
38
|
+
<div class="mx-auto w-full max-w-wide px-5 sm:px-7">
|
|
39
39
|
<header class="mb-3 flex flex-col gap-1">
|
|
40
40
|
<h2 class="m-0 text-[1.125rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
41
41
|
{title}
|
|
@@ -51,7 +51,7 @@ function buildHref(slug: string): string {
|
|
|
51
51
|
<li>
|
|
52
52
|
<a
|
|
53
53
|
href={buildHref(c.slug)}
|
|
54
|
-
class="
|
|
54
|
+
class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground items-center gap-1.5 transition-colors hover:border-ink-400 dark:hover:border-ink-600"
|
|
55
55
|
data-event="explore_category_click"
|
|
56
56
|
data-event-source="explore_category"
|
|
57
57
|
>
|
|
@@ -40,8 +40,8 @@ function buildHref(slug: string): string {
|
|
|
40
40
|
}
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
-
<section class:list={["
|
|
44
|
-
<div class="
|
|
43
|
+
<section class:list={["py-10 sm:py-12", className]}>
|
|
44
|
+
<div class="mx-auto w-full max-w-wide px-5 sm:px-7">
|
|
45
45
|
<header class="mb-3 flex flex-col gap-1">
|
|
46
46
|
<h2 class="m-0 text-[1.125rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
47
47
|
{title}
|
|
@@ -57,7 +57,7 @@ function buildHref(slug: string): string {
|
|
|
57
57
|
<li>
|
|
58
58
|
<a
|
|
59
59
|
href={buildHref(s.slug)}
|
|
60
|
-
class="
|
|
60
|
+
class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground items-center gap-1.5 transition-colors hover:border-ink-400 dark:hover:border-ink-600"
|
|
61
61
|
data-event="explore_stack_click"
|
|
62
62
|
data-event-source="explore_stack"
|
|
63
63
|
>
|
|
@@ -25,10 +25,10 @@ const group = Astro.props;
|
|
|
25
25
|
<button
|
|
26
26
|
type="button"
|
|
27
27
|
class:list={[
|
|
28
|
-
"grove-filter-trigger inline-flex h-9 items-center gap-1.5 rounded-
|
|
28
|
+
"grove-filter-trigger inline-flex h-9 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-[0.8125rem] font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35",
|
|
29
29
|
group.active
|
|
30
|
-
? "
|
|
31
|
-
: "border-
|
|
30
|
+
? "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
31
|
+
: "border-border bg-secondary text-foreground hover:bg-accent",
|
|
32
32
|
]}
|
|
33
33
|
aria-haspopup="listbox"
|
|
34
34
|
aria-expanded="false"
|
|
@@ -39,13 +39,13 @@ const group = Astro.props;
|
|
|
39
39
|
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z"/>
|
|
40
40
|
</svg>
|
|
41
41
|
</button>
|
|
42
|
-
<div id={group.popoverId} class="grove-filter-popover absolute left-0 top-full z-40 mt-1 hidden w-72 max-w-[calc(100vw-2rem)]
|
|
42
|
+
<div id={group.popoverId} class="rounded-[calc(var(--radius)+0.25rem)] border border-border bg-popover text-popover-foreground shadow-xl grove-filter-popover absolute left-0 top-full z-40 mt-1 hidden w-72 max-w-[calc(100vw-2rem)] p-1.5" role="listbox" hidden>
|
|
43
43
|
<FilterOptions filterKey={group.filterKey} options={group.options} initial={group.initial} single={group.single} />
|
|
44
44
|
<div class="mt-1 flex items-center justify-between border-t border-ink-100 px-2 pt-1.5 dark:border-ink-900">
|
|
45
45
|
{group.active && (
|
|
46
46
|
<button type="button" class="grove-filter-clear text-2xs font-medium text-ink-500 hover:text-ink-900 dark:text-ink-400 dark:hover:text-ink-100">Clear {group.label.toLowerCase()}</button>
|
|
47
47
|
)}
|
|
48
|
-
<button type="button" class="grove-filter-apply
|
|
48
|
+
<button type="button" class="grove-filter-apply inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 bg-primary text-primary-foreground hover:bg-primary/90 ml-auto px-2.5 text-2xs">Apply</button>
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
@@ -214,7 +214,7 @@ const trustStats: { value: string; label: string }[] = [
|
|
|
214
214
|
</label>
|
|
215
215
|
<a
|
|
216
216
|
href={searchHref}
|
|
217
|
-
class="inline-flex h-
|
|
217
|
+
class="inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 border-border bg-secondary text-foreground hover:bg-accent h-10"
|
|
218
218
|
aria-label={`Browse all ${itemsLabel} with filters`}
|
|
219
219
|
>
|
|
220
220
|
<svg viewBox="0 0 16 16" width="13" height="13" aria-hidden="true" fill="currentColor">
|
|
@@ -224,7 +224,7 @@ const trustStats: { value: string; label: string }[] = [
|
|
|
224
224
|
</a>
|
|
225
225
|
<button
|
|
226
226
|
type="submit"
|
|
227
|
-
class="
|
|
227
|
+
class="inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4 sm:px-5"
|
|
228
228
|
>
|
|
229
229
|
Search
|
|
230
230
|
</button>
|
|
@@ -256,12 +256,12 @@ const trustStats: { value: string; label: string }[] = [
|
|
|
256
256
|
<a
|
|
257
257
|
href={cta.href}
|
|
258
258
|
class:list={[
|
|
259
|
-
"
|
|
259
|
+
"inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35",
|
|
260
260
|
cta.variant === "primary"
|
|
261
|
-
? "
|
|
261
|
+
? "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
262
262
|
: cta.variant === "ghost"
|
|
263
|
-
? "
|
|
264
|
-
: "
|
|
263
|
+
? "bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground"
|
|
264
|
+
: "border-border bg-secondary text-foreground hover:bg-accent",
|
|
265
265
|
]}
|
|
266
266
|
{...(cta.external
|
|
267
267
|
? { target: "_blank", rel: "noopener noreferrer" }
|
|
@@ -278,14 +278,14 @@ const trustStats: { value: string; label: string }[] = [
|
|
|
278
278
|
{/* Help debug the type system when callers forget to pass ctas. */}
|
|
279
279
|
{ctas.length === 0 && githubUrl && (
|
|
280
280
|
<div class="mt-5 flex flex-wrap items-center gap-2">
|
|
281
|
-
<a href={searchHref} class="
|
|
281
|
+
<a href={searchHref} class="inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 bg-primary text-primary-foreground hover:bg-primary/90">
|
|
282
282
|
Browse {itemsLabel}
|
|
283
283
|
</a>
|
|
284
284
|
<a
|
|
285
285
|
href={`${githubUrl}/blob/main/CONTRIBUTING.md`}
|
|
286
286
|
target="_blank"
|
|
287
287
|
rel="noopener noreferrer"
|
|
288
|
-
class="
|
|
288
|
+
class="inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 border-border bg-secondary text-foreground hover:bg-accent"
|
|
289
289
|
>
|
|
290
290
|
Submit via GitHub
|
|
291
291
|
</a>
|
|
@@ -135,7 +135,10 @@ const a11y: Record<string, string> = title
|
|
|
135
135
|
{
|
|
136
136
|
showFallback ? (
|
|
137
137
|
<span
|
|
138
|
-
class:list={[
|
|
138
|
+
class:list={[
|
|
139
|
+
"inline-flex shrink-0 select-none items-center justify-center rounded-sm bg-ink-100 align-middle font-semibold uppercase leading-none text-ink-700 dark:bg-ink-800 dark:text-ink-200",
|
|
140
|
+
className,
|
|
141
|
+
]}
|
|
139
142
|
style={`width:${size}px;height:${size}px;font-size:${Math.max(10, size - 6)}px;`}
|
|
140
143
|
{...a11y}
|
|
141
144
|
>
|
|
@@ -151,7 +154,7 @@ const a11y: Record<string, string> = title
|
|
|
151
154
|
width={size}
|
|
152
155
|
height={size}
|
|
153
156
|
alt=""
|
|
154
|
-
class:list={["
|
|
157
|
+
class:list={["inline-block shrink-0 align-middle", className]}
|
|
155
158
|
{...a11y}
|
|
156
159
|
/>
|
|
157
160
|
) : (
|
|
@@ -160,7 +163,7 @@ const a11y: Record<string, string> = title
|
|
|
160
163
|
width={size}
|
|
161
164
|
height={size}
|
|
162
165
|
alt=""
|
|
163
|
-
class:list={["
|
|
166
|
+
class:list={["inline-block shrink-0 align-middle", className]}
|
|
164
167
|
loading="lazy"
|
|
165
168
|
decoding="async"
|
|
166
169
|
{...a11y}
|
|
@@ -168,36 +171,6 @@ const a11y: Record<string, string> = title
|
|
|
168
171
|
)
|
|
169
172
|
}
|
|
170
173
|
|
|
171
|
-
<style>
|
|
172
|
-
.grove-icon {
|
|
173
|
-
display: inline-block;
|
|
174
|
-
vertical-align: middle;
|
|
175
|
-
flex-shrink: 0;
|
|
176
|
-
}
|
|
177
|
-
.grove-icon-themed {
|
|
178
|
-
/* Theme-aware: dark/light variants selected by the inline script
|
|
179
|
-
below based on `data-resolved-theme` set by BaseLayout's
|
|
180
|
-
THEME_INIT. Default to the light variant so the markup looks
|
|
181
|
-
correct even before the script runs. */
|
|
182
|
-
}
|
|
183
|
-
.grove-icon-fallback {
|
|
184
|
-
display: inline-flex;
|
|
185
|
-
align-items: center;
|
|
186
|
-
justify-content: center;
|
|
187
|
-
border-radius: 0.25rem;
|
|
188
|
-
background: var(--color-ink-100, oklch(97% 0 0));
|
|
189
|
-
color: var(--color-ink-700, oklch(37.1% 0 0));
|
|
190
|
-
font-weight: 600;
|
|
191
|
-
line-height: 1;
|
|
192
|
-
text-transform: uppercase;
|
|
193
|
-
user-select: none;
|
|
194
|
-
}
|
|
195
|
-
:global(.dark) .grove-icon-fallback {
|
|
196
|
-
background: var(--color-ink-800, oklch(26.9% 0 0));
|
|
197
|
-
color: var(--color-ink-200, oklch(92.2% 0 0));
|
|
198
|
-
}
|
|
199
|
-
</style>
|
|
200
|
-
|
|
201
174
|
{mode === "auto" && (
|
|
202
175
|
<script is:inline>
|
|
203
176
|
// Theme-aware icon swap. Runs after THEME_INIT (BaseLayout) so
|
|
@@ -32,7 +32,7 @@ const status = project?.health?.status;
|
|
|
32
32
|
const curated = Boolean(item.curation?.reviewed || (project && (project.bestFor.length || project.whyListed.length || project.caveats.length)));
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
<article class={`
|
|
35
|
+
<article class={`rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors hover:bg-secondary group relative flex flex-col gap-3 p-4 ${className}`}>
|
|
36
36
|
<header class="flex items-start gap-3">
|
|
37
37
|
<a href={detailHref} class="relative z-10 flex shrink-0" aria-label={`Open ${name} details`}>
|
|
38
38
|
{avatar ? (
|
|
@@ -76,13 +76,13 @@ const curated = Boolean(item.curation?.reviewed || (project && (project.bestFor.
|
|
|
76
76
|
|
|
77
77
|
{showChips && (platforms.length > 0 || stacks.length > 0) && (
|
|
78
78
|
<div class="flex flex-col gap-1.5">
|
|
79
|
-
<div class="flex flex-wrap gap-1.5">{platforms.slice(0, 4).map((platform) => <span class="inline-flex items-center gap-1 rounded-
|
|
80
|
-
<div class="flex flex-wrap gap-1.5">{stacks.slice(0, 4).map((stack) => <span class="inline-flex items-center gap-1 rounded-
|
|
79
|
+
<div class="flex flex-wrap gap-1.5">{platforms.slice(0, 4).map((platform) => <span class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground"><Icon name={platform} category="platform" size={11} />{platform}</span>)}</div>
|
|
80
|
+
<div class="flex flex-wrap gap-1.5">{stacks.slice(0, 4).map((stack) => <span class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground !bg-muted !text-muted-foreground"><Icon name={stack} category="stack" size={11} />{stack}</span>)}</div>
|
|
81
81
|
</div>
|
|
82
82
|
)}
|
|
83
83
|
|
|
84
84
|
<footer class="relative z-10 mt-1 flex items-center gap-2 border-t border-ink-100 pt-2 text-2xs dark:border-ink-900">
|
|
85
|
-
<a href={detailHref} class="inline-flex items-center gap-1 rounded-
|
|
86
|
-
{repoHref && <a href={repoHref} target="_blank" rel="noopener noreferrer" class="inline-flex items-center gap-1 rounded-
|
|
85
|
+
<a href={detailHref} class="inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 border-border bg-secondary text-foreground hover:bg-accent px-2 text-2xs">View details →</a>
|
|
86
|
+
{repoHref && <a href={repoHref} target="_blank" rel="noopener noreferrer" class="inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 border-border bg-secondary text-foreground hover:bg-accent px-2 text-2xs">GitHub</a>}
|
|
87
87
|
</footer>
|
|
88
88
|
</article>
|
|
@@ -150,7 +150,7 @@ const category = (item as { category?: string }).category;
|
|
|
150
150
|
---
|
|
151
151
|
|
|
152
152
|
<article
|
|
153
|
-
class={`
|
|
153
|
+
class={`rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors hover:bg-secondary group relative flex h-full flex-col gap-3 p-4 ${className}`}
|
|
154
154
|
>
|
|
155
155
|
{/* Top row: logo + name + (optional) status + curated mark. */}
|
|
156
156
|
<header class="relative z-10 flex items-start gap-3">
|
|
@@ -297,26 +297,26 @@ const category = (item as { category?: string }).category;
|
|
|
297
297
|
{visiblePlatforms.length > 0 && (
|
|
298
298
|
<div class="flex flex-wrap items-center gap-1.5">
|
|
299
299
|
{visiblePlatforms.map((p) => (
|
|
300
|
-
<span class="
|
|
300
|
+
<span class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground">
|
|
301
301
|
<Icon name={p} category="platform" size={11} />
|
|
302
302
|
<span>{p}</span>
|
|
303
303
|
</span>
|
|
304
304
|
))}
|
|
305
305
|
{platformOverflow > 0 && (
|
|
306
|
-
<span class="
|
|
306
|
+
<span class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground text-ink-400 dark:text-ink-500">+{platformOverflow}</span>
|
|
307
307
|
)}
|
|
308
308
|
</div>
|
|
309
309
|
)}
|
|
310
310
|
{visibleStacks.length > 0 && (
|
|
311
311
|
<div class="flex flex-wrap items-center gap-1.5">
|
|
312
312
|
{visibleStacks.map((s) => (
|
|
313
|
-
<span class="
|
|
313
|
+
<span class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground !bg-muted !text-muted-foreground">
|
|
314
314
|
<Icon name={s} category="stack" size={11} />
|
|
315
315
|
<span>{s}</span>
|
|
316
316
|
</span>
|
|
317
317
|
))}
|
|
318
318
|
{stackOverflow > 0 && (
|
|
319
|
-
<span class="
|
|
319
|
+
<span class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground !bg-muted !text-muted-foreground text-ink-400 dark:text-ink-500">+{stackOverflow}</span>
|
|
320
320
|
)}
|
|
321
321
|
</div>
|
|
322
322
|
)}
|
|
@@ -350,14 +350,3 @@ const category = (item as { category?: string }).category;
|
|
|
350
350
|
</a>
|
|
351
351
|
</footer>
|
|
352
352
|
</article>
|
|
353
|
-
|
|
354
|
-
<style>
|
|
355
|
-
@reference "../styles.css";
|
|
356
|
-
|
|
357
|
-
.chip {
|
|
358
|
-
@apply inline-flex items-center gap-1 rounded-md border border-ink-200 bg-white px-1.5 py-0.5 text-2xs font-medium text-ink-700 transition-colors dark:border-ink-200 dark:bg-ink-950 dark:text-ink-300;
|
|
359
|
-
}
|
|
360
|
-
.chip-stack {
|
|
361
|
-
@apply bg-ink-50 dark:bg-ink-900/60;
|
|
362
|
-
}
|
|
363
|
-
</style>
|
|
@@ -45,8 +45,8 @@ const defaultPoints: AboutPoint[] = [
|
|
|
45
45
|
const items = points && points.length > 0 ? points : defaultPoints;
|
|
46
46
|
---
|
|
47
47
|
|
|
48
|
-
<section class:list={["
|
|
49
|
-
<div class="
|
|
48
|
+
<section class:list={["py-12 sm:py-16", className]}>
|
|
49
|
+
<div class="mx-auto w-full max-w-narrow px-5 sm:px-7">
|
|
50
50
|
<header class="mb-6 flex flex-col gap-2">
|
|
51
51
|
<h2 class="m-0 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
52
52
|
{title}
|
|
@@ -51,10 +51,10 @@ const hasStats =
|
|
|
51
51
|
stats.contributors !== undefined;
|
|
52
52
|
---
|
|
53
53
|
|
|
54
|
-
<section class:list={["
|
|
55
|
-
<div class="
|
|
54
|
+
<section class:list={["py-12 sm:py-16", className]}>
|
|
55
|
+
<div class="mx-auto w-full max-w-container px-5 sm:px-7">
|
|
56
56
|
<div
|
|
57
|
-
class="
|
|
57
|
+
class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors flex flex-col gap-4 p-6 sm:flex-row sm:items-center sm:justify-between"
|
|
58
58
|
>
|
|
59
59
|
<div class="flex flex-col gap-2">
|
|
60
60
|
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
@@ -104,7 +104,7 @@ const hasStats =
|
|
|
104
104
|
href={repoUrl}
|
|
105
105
|
target="_blank"
|
|
106
106
|
rel="noopener noreferrer"
|
|
107
|
-
class="
|
|
107
|
+
class="inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 bg-primary text-primary-foreground hover:bg-primary/90"
|
|
108
108
|
data-event="original_collection_click"
|
|
109
109
|
data-event-source="original_collection"
|
|
110
110
|
>
|
|
@@ -23,7 +23,7 @@ function pageList(active: number, count: number): Array<number | "ellipsis"> {
|
|
|
23
23
|
|
|
24
24
|
const pages = pageList(current, total);
|
|
25
25
|
const linkClass =
|
|
26
|
-
"
|
|
26
|
+
"inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 border-border bg-secondary text-foreground hover:bg-accent min-w-9 px-2 py-1.5 text-2xs";
|
|
27
27
|
---
|
|
28
28
|
|
|
29
29
|
{total > 1 && (
|
|
@@ -45,7 +45,7 @@ const linkClass =
|
|
|
45
45
|
href={hrefFor(page)}
|
|
46
46
|
class:list={[
|
|
47
47
|
linkClass,
|
|
48
|
-
page === current && "
|
|
48
|
+
page === current && "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
49
49
|
]}
|
|
50
50
|
aria-current={page === current ? "page" : undefined}
|
|
51
51
|
>
|
|
@@ -104,7 +104,7 @@ const groups: RenderedFilterGroup[] = baseGroups
|
|
|
104
104
|
{!hide.includes("sort") && (
|
|
105
105
|
<label class="relative">
|
|
106
106
|
<span class="sr-only">Sort items</span>
|
|
107
|
-
<select name="sort" class="h-9 cursor-pointer appearance-none
|
|
107
|
+
<select name="sort" class="h-9 cursor-pointer appearance-none border py-1.5 pl-3 pr-8 text-[0.8125rem] font-medium">
|
|
108
108
|
{SORT_OPTIONS.map((option) => <option value={option.value} selected={(initial.sort ?? "recently-updated") === option.value}>{option.label}</option>)}
|
|
109
109
|
</select>
|
|
110
110
|
<svg viewBox="0 0 16 16" width="11" height="11" aria-hidden="true" class="pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-ink-400" fill="currentColor">
|
|
@@ -55,10 +55,10 @@ const lenses =
|
|
|
55
55
|
<a
|
|
56
56
|
href={hrefForLens(lens.id, currentParams, pathPrefix)}
|
|
57
57
|
class:list={[
|
|
58
|
-
"
|
|
58
|
+
"inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-2xs font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35",
|
|
59
59
|
active
|
|
60
|
-
? "
|
|
61
|
-
: "
|
|
60
|
+
? "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
61
|
+
: "border-border bg-secondary text-foreground hover:bg-accent",
|
|
62
62
|
]}
|
|
63
63
|
aria-current={active ? "page" : undefined}
|
|
64
64
|
data-event="lens_tab_click"
|
|
@@ -64,10 +64,10 @@ function statusLabel(s: StackEntry["status"]): string | null {
|
|
|
64
64
|
|
|
65
65
|
<section
|
|
66
66
|
id="stacks"
|
|
67
|
-
class:list={["
|
|
67
|
+
class:list={["py-12 sm:py-16 scroll-mt-20 border-b border-ink-200 dark:border-ink-800", className]}
|
|
68
68
|
aria-labelledby={bare ? undefined : "grove-stackgrid-heading"}
|
|
69
69
|
>
|
|
70
|
-
<div class="
|
|
70
|
+
<div class="mx-auto w-full max-w-container px-5 sm:px-7">
|
|
71
71
|
{!bare && (
|
|
72
72
|
<header class="mb-6">
|
|
73
73
|
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
@@ -89,7 +89,7 @@ function statusLabel(s: StackEntry["status"]): string | null {
|
|
|
89
89
|
{stacks.map((s) => (
|
|
90
90
|
<a
|
|
91
91
|
href={buildHref(s.slug)}
|
|
92
|
-
class="
|
|
92
|
+
class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors hover:bg-secondary group flex h-full items-center gap-3 p-3.5 no-underline"
|
|
93
93
|
data-event="stack_grid_click"
|
|
94
94
|
data-event-source="stack_grid"
|
|
95
95
|
>
|
|
@@ -115,10 +115,10 @@ function statusLabel(s: StackEntry["status"]): string | null {
|
|
|
115
115
|
class:list={[
|
|
116
116
|
"shrink-0 inline-flex items-center rounded-md border px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider",
|
|
117
117
|
s.status === "live"
|
|
118
|
-
? "
|
|
118
|
+
? "!bg-emerald-50 !text-emerald-700 dark:!bg-emerald-950/80 dark:!text-emerald-300"
|
|
119
119
|
: s.status === "expanding"
|
|
120
|
-
? "
|
|
121
|
-
: "
|
|
120
|
+
? "!bg-blue-50 !text-blue-700 dark:!bg-blue-950/80 dark:!text-blue-300"
|
|
121
|
+
: "!bg-amber-50 !text-amber-800 dark:!bg-amber-950/80 dark:!text-amber-300",
|
|
122
122
|
]}
|
|
123
123
|
>
|
|
124
124
|
{statusLabel(s.status)}
|
|
@@ -129,12 +129,3 @@ function statusLabel(s: StackEntry["status"]): string | null {
|
|
|
129
129
|
</div>
|
|
130
130
|
</div>
|
|
131
131
|
</section>
|
|
132
|
-
|
|
133
|
-
<style>
|
|
134
|
-
.line-clamp-2 {
|
|
135
|
-
display: -webkit-box;
|
|
136
|
-
-webkit-line-clamp: 2;
|
|
137
|
-
-webkit-box-orient: vertical;
|
|
138
|
-
overflow: hidden;
|
|
139
|
-
}
|
|
140
|
-
</style>
|
|
@@ -56,10 +56,10 @@ const items = points && points.length > 0 ? points : defaultPoints;
|
|
|
56
56
|
|
|
57
57
|
<section
|
|
58
58
|
id="about"
|
|
59
|
-
class:list={["
|
|
59
|
+
class:list={["py-12 sm:py-16 scroll-mt-20 border-b border-ink-200 dark:border-ink-800", className]}
|
|
60
60
|
aria-labelledby="grove-why-heading"
|
|
61
61
|
>
|
|
62
|
-
<div class="
|
|
62
|
+
<div class="mx-auto w-full max-w-container px-5 sm:px-7">
|
|
63
63
|
<header class="flex flex-col gap-2">
|
|
64
64
|
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
65
65
|
{eyebrow}
|
|
@@ -82,7 +82,7 @@ const items = points && points.length > 0 ? points : defaultPoints;
|
|
|
82
82
|
aria-label="Why this directory"
|
|
83
83
|
>
|
|
84
84
|
{items.map((p) => (
|
|
85
|
-
<li class="
|
|
85
|
+
<li class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors p-4">
|
|
86
86
|
<div
|
|
87
87
|
aria-hidden="true"
|
|
88
88
|
class="mb-3 flex h-8 w-8 items-center justify-center rounded-md border border-ink-200 bg-white text-ink-700 dark:border-ink-800 dark:bg-ink-950 dark:text-ink-300"
|
|
@@ -7,12 +7,12 @@ interface Props {
|
|
|
7
7
|
const { size = "default", class: className = "" } = Astro.props;
|
|
8
8
|
const sizeClass =
|
|
9
9
|
size === "wide"
|
|
10
|
-
? "
|
|
10
|
+
? "mx-auto w-full max-w-wide"
|
|
11
11
|
: size === "narrow"
|
|
12
|
-
? "
|
|
13
|
-
: "
|
|
12
|
+
? "mx-auto w-full max-w-narrow"
|
|
13
|
+
: "mx-auto w-full max-w-container";
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
<div class={`${sizeClass}
|
|
16
|
+
<div class={`${sizeClass} px-5 sm:px-7 ${className}`}>
|
|
17
17
|
<slot />
|
|
18
18
|
</div>
|
package/src/layouts/Footer.astro
CHANGED
|
@@ -104,12 +104,12 @@ const projectItems = project.items.length ? project.items : defaultProject;
|
|
|
104
104
|
|
|
105
105
|
<footer
|
|
106
106
|
class:list={[
|
|
107
|
-
"
|
|
107
|
+
"border-border bg-background mt-16 border-t text-ink-500 dark:text-ink-400",
|
|
108
108
|
className,
|
|
109
109
|
]}
|
|
110
110
|
>
|
|
111
111
|
<div
|
|
112
|
-
class="
|
|
112
|
+
class="mx-auto grid w-full max-w-wide grid-cols-2 gap-8 px-5 py-12 md:grid-cols-4 sm:px-7"
|
|
113
113
|
>
|
|
114
114
|
<div class="col-span-2 md:col-span-1">
|
|
115
115
|
<div
|
|
@@ -225,7 +225,7 @@ const projectItems = project.items.length ? project.items : defaultProject;
|
|
|
225
225
|
|
|
226
226
|
<div class="border-t border-ink-200 dark:border-ink-800">
|
|
227
227
|
<div
|
|
228
|
-
class="
|
|
228
|
+
class="mx-auto flex w-full max-w-wide flex-wrap items-center gap-3 px-5 py-4 text-2xs text-ink-500 sm:px-7 dark:text-ink-400"
|
|
229
229
|
>
|
|
230
230
|
<span>© {year} {holder}{licenseLine ? `. ${licenseLine}` : "."}</span>
|
|
231
231
|
{gh && (
|