@grove-dev/astro 0.2.20 → 0.3.2
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/LICENSE +21 -0
- package/README.md +9 -75
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/display.d.ts +1 -26
- package/dist/lib/display.d.ts.map +1 -1
- package/dist/lib/display.js +1 -103
- package/dist/lib/display.js.map +1 -1
- package/dist/lib/format.d.ts +1 -28
- package/dist/lib/format.d.ts.map +1 -1
- package/dist/lib/format.js +1 -71
- package/dist/lib/format.js.map +1 -1
- package/dist/lib/lenses.d.ts +1 -57
- package/dist/lib/lenses.d.ts.map +1 -1
- package/dist/lib/lenses.js +1 -198
- package/dist/lib/lenses.js.map +1 -1
- package/dist/lib/repo.d.ts +1 -19
- package/dist/lib/repo.d.ts.map +1 -1
- package/dist/lib/repo.js +1 -30
- package/dist/lib/repo.js.map +1 -1
- package/dist/lib/scores.d.ts +1 -36
- package/dist/lib/scores.d.ts.map +1 -1
- package/dist/lib/scores.js +1 -75
- package/dist/lib/scores.js.map +1 -1
- package/dist/lib/search.d.ts +1 -113
- package/dist/lib/search.d.ts.map +1 -1
- package/dist/lib/search.js +1 -379
- package/dist/lib/search.js.map +1 -1
- package/dist/lib/taxonomy-counts.d.ts +1 -10
- package/dist/lib/taxonomy-counts.d.ts.map +1 -1
- package/dist/lib/taxonomy-counts.js +1 -21
- package/dist/lib/taxonomy-counts.js.map +1 -1
- package/package.json +22 -10
- package/src/components/ContributorsGrid.astro +3 -3
- package/src/components/CurationGrid.astro +2 -2
- package/src/components/DirectoryIndexClient.astro +240 -0
- package/src/components/FilterGroupMenu.astro +8 -4
- package/src/components/FinalCta.astro +41 -0
- package/src/components/Hero.astro +15 -18
- package/src/components/Icon.astro +99 -27
- package/src/components/RefinePanel.astro +7 -7
- package/src/components/SmartLensTabs.astro +5 -4
- package/src/components/StackGrid.astro +1 -1
- package/src/components/SubmissionClient.astro +133 -0
- package/src/index.ts +11 -1
- package/src/layouts/BaseLayout.astro +19 -1
- package/src/layouts/Footer.astro +25 -56
- package/src/layouts/Header.astro +33 -15
- package/src/layouts/ThemeToggle.astro +7 -3
- package/src/lib/display.ts +1 -111
- package/src/lib/format.ts +1 -64
- package/src/lib/lenses.ts +1 -220
- package/src/lib/repo.ts +1 -32
- package/src/lib/scores.ts +1 -90
- package/src/lib/search.ts +1 -418
- package/src/lib/taxonomy-counts.ts +1 -26
- package/{templates/default/src/data/records.ts → src/server/directory.ts} +90 -8
- package/src/server/index.ts +2 -0
- package/src/server/models.ts +432 -0
- package/dist/theme.test.d.ts +0 -2
- package/dist/theme.test.d.ts.map +0 -1
- package/dist/theme.test.js +0 -55
- package/dist/theme.test.js.map +0 -1
- package/src/theme.test.ts +0 -67
- package/templates/default/.github/ISSUE_TEMPLATE/bug_report.md +0 -33
- package/templates/default/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/templates/default/.github/ISSUE_TEMPLATE/record_submission.md +0 -48
- package/templates/default/.github/pull_request_template.md +0 -27
- package/templates/default/.github/workflows/build.yml +0 -55
- package/templates/default/.github/workflows/cleanup-stale-records.yml +0 -48
- package/templates/default/.github/workflows/daily-refresh.yml +0 -53
- package/templates/default/.github/workflows/sync-contributors.yml +0 -53
- package/templates/default/.github/workflows/sync-github-metadata.yml +0 -58
- package/templates/default/.github/workflows/validate-data.yml +0 -35
- package/templates/default/astro.config.mjs +0 -25
- package/templates/default/content/pages/about.md +0 -66
- package/templates/default/content/pages/methodology.md +0 -103
- package/templates/default/data/records/.gitkeep +0 -0
- package/templates/default/data/records/coolify.yml +0 -46
- package/templates/default/data/records/gitea.yml +0 -46
- package/templates/default/data/records/hoppscotch.yml +0 -47
- package/templates/default/data/records/inventree.yml +0 -47
- package/templates/default/data/records/label-studio.yml +0 -46
- package/templates/default/data/records/logseq.yml +0 -48
- package/templates/default/data/records/private-gpt.yml +0 -47
- package/templates/default/data/records/wakapi.yml +0 -44
- package/templates/default/data/taxonomy/categories.yml +0 -47
- package/templates/default/data/taxonomy/distribution-channels.yml +0 -43
- package/templates/default/data/taxonomy/platforms.yml +0 -27
- package/templates/default/data/taxonomy/stacks.yml +0 -41
- package/templates/default/grove.config.ts +0 -36
- package/templates/default/package.json +0 -38
- package/templates/default/public/icons/platforms/android.svg +0 -1
- package/templates/default/public/icons/platforms/apple-dark.svg +0 -1
- package/templates/default/public/icons/platforms/apple-light.svg +0 -1
- package/templates/default/public/icons/platforms/chrome.svg +0 -1
- package/templates/default/public/icons/platforms/chromeos.svg +0 -5
- package/templates/default/public/icons/platforms/desktop.svg +0 -4
- package/templates/default/public/icons/platforms/embedded.svg +0 -5
- package/templates/default/public/icons/platforms/ios.svg +0 -1
- package/templates/default/public/icons/platforms/linux.svg +0 -1
- package/templates/default/public/icons/platforms/macos.svg +0 -1
- package/templates/default/public/icons/platforms/ubuntu.svg +0 -1
- package/templates/default/public/icons/platforms/web.svg +0 -5
- package/templates/default/public/icons/platforms/windows.svg +0 -6
- package/templates/default/public/icons/stacks/android.svg +0 -1
- package/templates/default/public/icons/stacks/apple-dark.svg +0 -1
- package/templates/default/public/icons/stacks/apple-light.svg +0 -1
- package/templates/default/public/icons/stacks/bun.svg +0 -1
- package/templates/default/public/icons/stacks/capacitor.svg +0 -14
- package/templates/default/public/icons/stacks/clojure.svg +0 -1
- package/templates/default/public/icons/stacks/clojurescript.svg +0 -1
- package/templates/default/public/icons/stacks/dart.svg +0 -1
- package/templates/default/public/icons/stacks/deno.svg +0 -1
- package/templates/default/public/icons/stacks/django.svg +0 -1
- package/templates/default/public/icons/stacks/docker.svg +0 -1
- package/templates/default/public/icons/stacks/firebase.svg +0 -1
- package/templates/default/public/icons/stacks/flutter.svg +0 -1
- package/templates/default/public/icons/stacks/go.svg +0 -1
- package/templates/default/public/icons/stacks/graphql.svg +0 -1
- package/templates/default/public/icons/stacks/ionic.svg +0 -4
- package/templates/default/public/icons/stacks/java.svg +0 -1
- package/templates/default/public/icons/stacks/javascript.svg +0 -1
- package/templates/default/public/icons/stacks/kotlin.svg +0 -1
- package/templates/default/public/icons/stacks/llm.svg +0 -1
- package/templates/default/public/icons/stacks/mongodb.svg +0 -1
- package/templates/default/public/icons/stacks/node.js.svg +0 -1
- package/templates/default/public/icons/stacks/nodejs.svg +0 -1
- package/templates/default/public/icons/stacks/python.svg +0 -1
- package/templates/default/public/icons/stacks/rag.svg +0 -7
- package/templates/default/public/icons/stacks/react-native.svg +0 -1
- package/templates/default/public/icons/stacks/react.svg +0 -1
- package/templates/default/public/icons/stacks/rust.svg +0 -1
- package/templates/default/public/icons/stacks/solidity.svg +0 -1
- package/templates/default/public/icons/stacks/sveltekit.svg +0 -1
- package/templates/default/public/icons/stacks/swift.svg +0 -1
- package/templates/default/public/icons/stacks/tensorflow.svg +0 -1
- package/templates/default/public/icons/stacks/typescript.svg +0 -1
- package/templates/default/public/icons/stacks/vue.svg +0 -1
- package/templates/default/public/llms-full.txt +0 -206
- package/templates/default/public/llms.txt +0 -112
- package/templates/default/public/og-image.svg +0 -48
- package/templates/default/public/robots.txt +0 -53
- package/templates/default/public/sitemap.xml +0 -63
- package/templates/default/scripts/build-llms.mjs +0 -123
- package/templates/default/scripts/build-records-json.mjs +0 -27
- package/templates/default/scripts/build-sitemap.mjs +0 -20
- package/templates/default/scripts/cleanup-stale-records.mjs +0 -20
- package/templates/default/scripts/enrich-github-metadata.mjs +0 -99
- package/templates/default/scripts/fetch-icons.mjs +0 -137
- package/templates/default/scripts/migrate-legacy-to-schema-v1.mjs +0 -86
- package/templates/default/scripts/parse-legacy-readme.mjs +0 -59
- package/templates/default/scripts/refresh-records-activity.mjs +0 -24
- package/templates/default/scripts/repair-license-format.mjs +0 -72
- package/templates/default/scripts/report-cleanup-candidates.mjs +0 -21
- package/templates/default/scripts/seed-from-github.mjs +0 -62
- package/templates/default/scripts/sync-contributors.mjs +0 -145
- package/templates/default/scripts/sync-github-metadata.mjs +0 -28
- package/templates/default/scripts/validate-records.mjs +0 -27
- package/templates/default/src/pages/404.astro +0 -64
- package/templates/default/src/pages/[slug]/[recordSlug].astro +0 -689
- package/templates/default/src/pages/[slug]/index.astro +0 -278
- package/templates/default/src/pages/about.astro +0 -182
- package/templates/default/src/pages/apps/[recordSlug].astro +0 -33
- package/templates/default/src/pages/contributors.astro +0 -175
- package/templates/default/src/pages/index.astro +0 -225
- package/templates/default/src/pages/sitemap.xml.ts +0 -89
- package/templates/default/src/pages/submit.astro +0 -281
- package/templates/default/src/styles/global.css +0 -33
- package/templates/default/wrangler.jsonc +0 -28
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
/**
|
|
3
|
-
* List page — the discovery / browse page.
|
|
4
|
-
*
|
|
5
|
-
* Mirrors the openapps list structure:
|
|
6
|
-
* - SmartLensTabs (All / Trending / Recently added / Established / Featured)
|
|
7
|
-
* - RefinePanel (Stack / Platform / Category / License / Sort)
|
|
8
|
-
* - RecordSection rows (full record cards; the `ItemSection` V0
|
|
9
|
-
* name was renamed to `RecordSection` in V1)
|
|
10
|
-
*
|
|
11
|
-
* Generic: the URL slug (e.g. `/projects/`, `/resources/`,
|
|
12
|
-
* `/entities/`) is derived from the blueprint via `getStaticPaths`,
|
|
13
|
-
* so the same page works for every blueprint without per-blueprint
|
|
14
|
-
* forks.
|
|
15
|
-
*
|
|
16
|
-
* Navigation model: full-page render. The form posts via `method="get"`
|
|
17
|
-
* so the browser navigates to `?q=...&sort=...&stack=...`, and the
|
|
18
|
-
* server re-runs `filterRecords` / `applySort` / `paginate` from
|
|
19
|
-
* those query params. No client-side filter shim, no duplicated
|
|
20
|
-
* logic. The URL stays the single source of truth for filter state.
|
|
21
|
-
*/
|
|
22
|
-
import siteConfig from "../../../data/generated/site-config.json";
|
|
23
|
-
import { items, itemLabel, itemLabelPlural } from "../../data/records";
|
|
24
|
-
import type { IndexFilters } from "@grove-dev/astro";
|
|
25
|
-
import BaseLayout from "@grove-dev/astro/layouts/BaseLayout.astro";
|
|
26
|
-
import SmartLensTabs from "@grove-dev/astro/components/SmartLensTabs.astro";
|
|
27
|
-
import RefinePanel from "@grove-dev/astro/components/RefinePanel.astro";
|
|
28
|
-
import IndexRow from "@grove-dev/astro/components/IndexRow.astro";
|
|
29
|
-
import Pagination from "@grove-dev/astro/components/Pagination.astro";
|
|
30
|
-
import {
|
|
31
|
-
activeFilterChips,
|
|
32
|
-
applySort,
|
|
33
|
-
buildFacets,
|
|
34
|
-
effectivePage,
|
|
35
|
-
effectiveSort,
|
|
36
|
-
filterRecords,
|
|
37
|
-
filtersFromSearchParams,
|
|
38
|
-
searchParamsFromFilters,
|
|
39
|
-
sortDisplay,
|
|
40
|
-
SORT_OPTIONS,
|
|
41
|
-
totalPages,
|
|
42
|
-
} from "@grove-dev/astro";
|
|
43
|
-
|
|
44
|
-
// This template ships with the `project-directory` blueprint, so the
|
|
45
|
-
// only directory slug it ever needs is `projects`. While it ships
|
|
46
|
-
// as the project directory, pre-generate the single path the build
|
|
47
|
-
// actually needs. Swapping in a different blueprint is a one-config
|
|
48
|
-
// change that flows through the static import at the top.
|
|
49
|
-
export function getStaticPaths() {
|
|
50
|
-
return [{ params: { slug: "projects" } }];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const slug = Astro.params.slug as string;
|
|
54
|
-
const total = items.length;
|
|
55
|
-
const filters = filtersFromSearchParams(Astro.url.searchParams);
|
|
56
|
-
const facets = buildFacets(items);
|
|
57
|
-
const sort = effectiveSort(filters);
|
|
58
|
-
const requestedPage = effectivePage(filters);
|
|
59
|
-
const filtered = filterRecords(items, filters);
|
|
60
|
-
const sorted = applySort(filtered, sort);
|
|
61
|
-
const pages = totalPages(sorted.length);
|
|
62
|
-
const page = Math.min(requestedPage, pages);
|
|
63
|
-
const chips = activeFilterChips(filters);
|
|
64
|
-
|
|
65
|
-
const title = `Browse ${slug} — ${siteConfig.name}`;
|
|
66
|
-
const description = `A searchable directory of ${itemLabelPlural()} for ${siteConfig.name}.`;
|
|
67
|
-
|
|
68
|
-
function hrefForPage(target: number): string {
|
|
69
|
-
const next: IndexFilters = { ...filters, page: target };
|
|
70
|
-
const query = searchParamsFromFilters(next).toString();
|
|
71
|
-
return query ? `/${slug}?${query}` : `/${slug}`;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function hrefForRemove(key: keyof IndexFilters, value: string): string {
|
|
75
|
-
const params = new URLSearchParams();
|
|
76
|
-
const next: IndexFilters = { ...filters, page: 1 };
|
|
77
|
-
const urlKey: Partial<Record<keyof IndexFilters, string>> = {
|
|
78
|
-
stacks: "stack",
|
|
79
|
-
platforms: "platform",
|
|
80
|
-
categories: "category",
|
|
81
|
-
labels: "label",
|
|
82
|
-
licenses: "license",
|
|
83
|
-
statuses: "status",
|
|
84
|
-
lens: "lens",
|
|
85
|
-
q: "q",
|
|
86
|
-
};
|
|
87
|
-
const target = urlKey[key];
|
|
88
|
-
if (target === "status") {
|
|
89
|
-
const next = (params.get("status") ?? "")
|
|
90
|
-
.split(",")
|
|
91
|
-
.filter(Boolean)
|
|
92
|
-
.filter((entry) => entry !== value);
|
|
93
|
-
params.delete("status");
|
|
94
|
-
if (next.length) params.set("status", next.join(","));
|
|
95
|
-
} else if (target) {
|
|
96
|
-
const values = params.getAll(target).filter((entry) => entry !== value);
|
|
97
|
-
params.delete(target);
|
|
98
|
-
for (const entry of values) params.append(target, entry);
|
|
99
|
-
}
|
|
100
|
-
const query = params.toString();
|
|
101
|
-
return query ? `/${slug}?${query}` : `/${slug}`;
|
|
102
|
-
}
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
<BaseLayout
|
|
106
|
-
title={title}
|
|
107
|
-
description={description}
|
|
108
|
-
site={siteConfig}
|
|
109
|
-
submitHref="/submit"
|
|
110
|
-
submitLabel={`Submit ${itemLabel()}`}
|
|
111
|
-
>
|
|
112
|
-
<section class="border-b border-ink-200 bg-white dark:border-ink-800 dark:bg-ink-950">
|
|
113
|
-
<div class="mx-auto w-full max-w-wide px-5 pt-10 sm:px-7 sm:pt-12">
|
|
114
|
-
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
115
|
-
{slug}
|
|
116
|
-
</span>
|
|
117
|
-
<h1 class="m-0 mt-1 text-[1.875rem] sm:text-[2.125rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
118
|
-
Browse {slug}
|
|
119
|
-
</h1>
|
|
120
|
-
<p class="m-0 mt-2 max-w-[64ch] text-[0.9375rem] text-ink-500 dark:text-ink-400">
|
|
121
|
-
Search, filter, and explore {total} {itemLabel()}{total === 1 ? "" : "s"} in this directory.
|
|
122
|
-
</p>
|
|
123
|
-
|
|
124
|
-
<form
|
|
125
|
-
method="get"
|
|
126
|
-
action={`/${slug}`}
|
|
127
|
-
id="search-form"
|
|
128
|
-
class="mt-6 flex flex-col gap-2 sm:flex-row"
|
|
129
|
-
role="search"
|
|
130
|
-
>
|
|
131
|
-
<label class="relative flex-1">
|
|
132
|
-
<span class="sr-only">{`Search ${itemLabelPlural()}`}</span>
|
|
133
|
-
<svg
|
|
134
|
-
viewBox="0 0 16 16"
|
|
135
|
-
width="16"
|
|
136
|
-
height="16"
|
|
137
|
-
aria-hidden="true"
|
|
138
|
-
class="pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-ink-400"
|
|
139
|
-
fill="currentColor"
|
|
140
|
-
>
|
|
141
|
-
<path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0Z" />
|
|
142
|
-
</svg>
|
|
143
|
-
<input
|
|
144
|
-
id="search-input"
|
|
145
|
-
type="search"
|
|
146
|
-
name="q"
|
|
147
|
-
value={filters.q ?? ""}
|
|
148
|
-
placeholder={`Search ${itemLabelPlural()}, stacks, categories, platforms, licenses...`}
|
|
149
|
-
class="h-10 w-full rounded-md border border-ink-200 bg-white py-2 pl-9 pr-3 text-sm text-ink-900 placeholder:text-ink-400 focus:border-ink-900 focus:outline-none focus:ring-2 focus:ring-ink-900/10 dark:border-ink-800 dark:bg-ink-950 dark:text-ink-100"
|
|
150
|
-
/>
|
|
151
|
-
</label>
|
|
152
|
-
<label class="relative">
|
|
153
|
-
<span class="sr-only">{`Sort ${itemLabelPlural()}`}</span>
|
|
154
|
-
<select
|
|
155
|
-
id="sort-select"
|
|
156
|
-
name="sort"
|
|
157
|
-
class="h-10 cursor-pointer appearance-none rounded-md border border-ink-200 bg-white py-1.5 pl-3 pr-8 text-sm font-medium text-ink-700 transition-colors hover:border-ink-300 focus:border-ink-900 focus:outline-none focus:ring-2 focus:ring-ink-900/10 dark:border-ink-800 dark:bg-ink-950 dark:text-ink-300 dark:hover:border-ink-700 dark:focus:border-ink-100 dark:focus:ring-ink-100/15"
|
|
158
|
-
>
|
|
159
|
-
{SORT_OPTIONS.map((o) => (
|
|
160
|
-
<option value={o.value} selected={o.value === sort}>{o.label}</option>
|
|
161
|
-
))}
|
|
162
|
-
</select>
|
|
163
|
-
<svg
|
|
164
|
-
viewBox="0 0 16 16"
|
|
165
|
-
width="11"
|
|
166
|
-
height="11"
|
|
167
|
-
aria-hidden="true"
|
|
168
|
-
class="pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-ink-400"
|
|
169
|
-
fill="currentColor"
|
|
170
|
-
>
|
|
171
|
-
<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" />
|
|
172
|
-
</svg>
|
|
173
|
-
</label>
|
|
174
|
-
<button type="submit" 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">Search</button>
|
|
175
|
-
</form>
|
|
176
|
-
|
|
177
|
-
<div class="mt-4">
|
|
178
|
-
<SmartLensTabs
|
|
179
|
-
currentParams={Astro.url.searchParams}
|
|
180
|
-
pathPrefix={`/${slug}`}
|
|
181
|
-
lensIds={["all", "new", "hot", "mature", "production-like", "good-to-learn"]}
|
|
182
|
-
/>
|
|
183
|
-
</div>
|
|
184
|
-
|
|
185
|
-
<div class="mt-3 pb-6">
|
|
186
|
-
<RefinePanel
|
|
187
|
-
facets={facets}
|
|
188
|
-
initial={filters}
|
|
189
|
-
pathPrefix={`/${slug}`}
|
|
190
|
-
/>
|
|
191
|
-
</div>
|
|
192
|
-
</div>
|
|
193
|
-
</section>
|
|
194
|
-
|
|
195
|
-
<section class="py-10 sm:py-12">
|
|
196
|
-
<div class="mx-auto w-full max-w-wide px-5 sm:px-7">
|
|
197
|
-
<header class="mb-6">
|
|
198
|
-
<h2 class="m-0 text-[1.5rem] sm:text-[1.625rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
199
|
-
{`All ${itemLabelPlural()}`}
|
|
200
|
-
</h2>
|
|
201
|
-
<p class="m-0 mt-1 max-w-[60ch] text-[0.9375rem] text-ink-500 dark:text-ink-400">
|
|
202
|
-
{`Every ${itemLabel()} in the directory.`}
|
|
203
|
-
</p>
|
|
204
|
-
</header>
|
|
205
|
-
<div class="mb-5 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
|
|
206
|
-
<p class="m-0 text-2xs text-ink-500 dark:text-ink-400">
|
|
207
|
-
<span id="results-count" class="font-mono text-ink-900 dark:text-ink-100">
|
|
208
|
-
{sorted.length} {sorted.length === 1 ? itemLabel() : itemLabelPlural()}
|
|
209
|
-
</span>
|
|
210
|
-
<span id="results-sort">{` · sorted by ${sortDisplay(sort)}`}</span>
|
|
211
|
-
<span id="results-page">{pages > 1 ? ` · page ${page} of ${pages}` : ""}</span>
|
|
212
|
-
</p>
|
|
213
|
-
<div
|
|
214
|
-
id="active-filters"
|
|
215
|
-
class:list={["flex flex-wrap items-center gap-1.5", chips.length === 0 && "hidden"]}
|
|
216
|
-
aria-label="Active filters"
|
|
217
|
-
>
|
|
218
|
-
{chips.length > 0 && (
|
|
219
|
-
<>
|
|
220
|
-
{chips.map((chip) => (
|
|
221
|
-
<a
|
|
222
|
-
href={hrefForRemove(chip.key, chip.value)}
|
|
223
|
-
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 transition-colors hover:border-ink-400"
|
|
224
|
-
>
|
|
225
|
-
{chip.label} <span aria-hidden="true">x</span>
|
|
226
|
-
</a>
|
|
227
|
-
))}
|
|
228
|
-
<a href={`/${slug}`} class="text-2xs font-medium text-ink-500 hover:text-ink-900">
|
|
229
|
-
Clear all
|
|
230
|
-
</a>
|
|
231
|
-
</>
|
|
232
|
-
)}
|
|
233
|
-
</div>
|
|
234
|
-
</div>
|
|
235
|
-
|
|
236
|
-
<ul id="results-list" class="m-0 flex list-none flex-col gap-3 p-0">
|
|
237
|
-
{sorted.map((item, i) => (
|
|
238
|
-
<li class="m-0 p-0" data-record-slug={item.slug}>
|
|
239
|
-
<IndexRow
|
|
240
|
-
record={item as Parameters<typeof IndexRow>[0]["record"]}
|
|
241
|
-
detailHref={`/${slug}/${item.slug}`}
|
|
242
|
-
eager={i < 2}
|
|
243
|
-
/>
|
|
244
|
-
</li>
|
|
245
|
-
))}
|
|
246
|
-
</ul>
|
|
247
|
-
<div id="empty-state" class:list={["py-12 text-center", sorted.length > 0 && "hidden"]}>
|
|
248
|
-
<p class="m-0 text-sm font-medium text-ink-700 dark:text-ink-200">
|
|
249
|
-
{`No ${itemLabel()}s match these filters.`}
|
|
250
|
-
</p>
|
|
251
|
-
<a href={`/${slug}`} 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 mt-4">Clear filters</a>
|
|
252
|
-
</div>
|
|
253
|
-
<nav class="mt-8 flex flex-wrap items-center justify-center gap-1.5" aria-label="Pagination">
|
|
254
|
-
<Pagination current={page} total={pages} hrefFor={hrefForPage} />
|
|
255
|
-
</nav>
|
|
256
|
-
</div>
|
|
257
|
-
</section>
|
|
258
|
-
|
|
259
|
-
<section class="border-t border-ink-200 dark:border-ink-800">
|
|
260
|
-
<div class="mx-auto w-full max-w-wide px-5 sm:px-7">
|
|
261
|
-
<div class="flex flex-col items-center gap-3 py-12 text-center">
|
|
262
|
-
<h2 class="m-0 text-xl font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
263
|
-
{`Know a real ${itemLabel()} that belongs here?`}
|
|
264
|
-
</h2>
|
|
265
|
-
<p class="m-0 max-w-2xl text-sm text-ink-500 dark:text-ink-400">
|
|
266
|
-
{`Open a pull request with a YAML file. We review every submission against the bar — no marketing, no tutorials.`}
|
|
267
|
-
</p>
|
|
268
|
-
<a
|
|
269
|
-
href={siteConfig.submitUrl ?? "/submit"}
|
|
270
|
-
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 mt-2"
|
|
271
|
-
>
|
|
272
|
-
{`Submit ${itemLabel()}`}
|
|
273
|
-
</a>
|
|
274
|
-
|
|
275
|
-
</div>
|
|
276
|
-
</div>
|
|
277
|
-
</section>
|
|
278
|
-
</BaseLayout>
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
/**
|
|
3
|
-
* About page — generic.
|
|
4
|
-
*
|
|
5
|
-
* Mirrors the openapps section structure: breadcrumb, header with
|
|
6
|
-
* two-line intro, then a stack of cards (Why, Value, Data, Generic)
|
|
7
|
-
* followed by a CTA row. The copy is generic — references "directory",
|
|
8
|
-
* "record", "framework" — so it works for any blueprint.
|
|
9
|
-
*
|
|
10
|
-
* Side-by-side comparison with the older "Why" copy:
|
|
11
|
-
* - Old: "A directory of real open-source apps. Started from
|
|
12
|
-
* the Open Source Flutter Apps collection…"
|
|
13
|
-
* - New: "A growing community knowledge site. A curated, health-
|
|
14
|
-
* aware developer directory…"
|
|
15
|
-
*
|
|
16
|
-
* The Tailwind card and button utilities match the
|
|
17
|
-
* rest of the framework, and the data fields it references
|
|
18
|
-
* (`siteConfig.tagline`, `siteConfig.repoUrl`) all flow from the
|
|
19
|
-
* site config — no hardcoded brand or copy.
|
|
20
|
-
*/
|
|
21
|
-
import BaseLayout from "@grove-dev/astro/layouts/BaseLayout.astro";
|
|
22
|
-
import Container from "@grove-dev/astro/layouts/Container.astro";
|
|
23
|
-
import siteConfig from "../../data/generated/site-config.json";
|
|
24
|
-
import { indexSlug, itemLabel } from "../data/records";
|
|
25
|
-
|
|
26
|
-
const githubUrl = siteConfig.repoUrl;
|
|
27
|
-
const title = `About — ${siteConfig.name}`;
|
|
28
|
-
const description = `${siteConfig.tagline} Built with Grove.`;
|
|
29
|
-
const slug = indexSlug();
|
|
30
|
-
const item = itemLabel();
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
<BaseLayout title={title} description={description} site={siteConfig}>
|
|
34
|
-
<Container size="narrow">
|
|
35
|
-
<article class="py-12 sm:py-16">
|
|
36
|
-
<nav class="text-2xs text-ink-500 dark:text-ink-400" aria-label="Breadcrumb">
|
|
37
|
-
<a href="/" class="hover:text-ink-900 dark:hover:text-ink-100">Home</a>
|
|
38
|
-
<span class="mx-1.5 text-ink-300 dark:text-ink-700">/</span>
|
|
39
|
-
<span class="text-ink-700 dark:text-ink-300">About</span>
|
|
40
|
-
</nav>
|
|
41
|
-
|
|
42
|
-
<header class="mt-5">
|
|
43
|
-
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
44
|
-
About
|
|
45
|
-
</span>
|
|
46
|
-
<h1 class="mt-1 m-0 text-[1.75rem] sm:text-[2.25rem] font-semibold tracking-[-0.02em] leading-[1.1] text-ink-900 dark:text-ink-100">
|
|
47
|
-
A growing community knowledge site.
|
|
48
|
-
</h1>
|
|
49
|
-
<p class="mt-4 m-0 text-[1rem] sm:text-[1.0625rem] leading-relaxed text-ink-700 dark:text-ink-200 max-w-[62ch]">
|
|
50
|
-
{siteConfig.name} is a curated, health-aware developer directory —
|
|
51
|
-
built so you can find, compare, run, study, and contribute to
|
|
52
|
-
open-source {item}s.
|
|
53
|
-
</p>
|
|
54
|
-
<p class="mt-3 m-0 text-[0.9375rem] leading-relaxed text-ink-500 dark:text-ink-400 max-w-[62ch]">
|
|
55
|
-
A growing list, forked from the original. Same shape, same
|
|
56
|
-
spirit, fresh data.
|
|
57
|
-
</p>
|
|
58
|
-
</header>
|
|
59
|
-
|
|
60
|
-
<section class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors mt-8 p-5 sm:p-6">
|
|
61
|
-
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
62
|
-
Why
|
|
63
|
-
</span>
|
|
64
|
-
<h2 class="mt-1 m-0 text-[1.125rem] sm:text-[1.25rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
65
|
-
A curated starting point
|
|
66
|
-
</h2>
|
|
67
|
-
<p class="mt-3 m-0 text-[0.9375rem] leading-relaxed text-ink-700 dark:text-ink-200">
|
|
68
|
-
GitHub search and README lists optimize for the repository
|
|
69
|
-
name and description. They rarely tell you whether a project
|
|
70
|
-
is a real {item} or a demo, which stack it uses beyond the
|
|
71
|
-
headline, how active it really is, or whether it has a clear
|
|
72
|
-
license.
|
|
73
|
-
</p>
|
|
74
|
-
<p class="mt-3 m-0 text-[0.9375rem] leading-relaxed text-ink-700 dark:text-ink-200">
|
|
75
|
-
{siteConfig.name} turns that flat list into a structured,
|
|
76
|
-
health-aware index. Each entry carries the metadata a developer
|
|
77
|
-
actually needs to decide whether to open the repo.
|
|
78
|
-
</p>
|
|
79
|
-
</section>
|
|
80
|
-
|
|
81
|
-
<section class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors mt-4 p-5 sm:p-6">
|
|
82
|
-
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
83
|
-
Why real {item}s
|
|
84
|
-
</span>
|
|
85
|
-
<h2 class="mt-1 m-0 text-[1.125rem] sm:text-[1.25rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
86
|
-
Real, runnable source
|
|
87
|
-
</h2>
|
|
88
|
-
<p class="mt-3 m-0 text-[0.9375rem] leading-relaxed text-ink-700 dark:text-ink-200">
|
|
89
|
-
Every {item} links back to its source. Skim, fork, learn — no
|
|
90
|
-
paywalls, no broken download links.
|
|
91
|
-
</p>
|
|
92
|
-
<p class="mt-3 m-0 text-[0.9375rem] leading-relaxed text-ink-700 dark:text-ink-200">
|
|
93
|
-
The directory is hand-curated — no SEO spam, no affiliate
|
|
94
|
-
farms, no broken links.
|
|
95
|
-
</p>
|
|
96
|
-
</section>
|
|
97
|
-
|
|
98
|
-
<section class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors mt-4 p-5 sm:p-6">
|
|
99
|
-
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
100
|
-
What you get
|
|
101
|
-
</span>
|
|
102
|
-
<h2 class="mt-1 m-0 text-[1.125rem] sm:text-[1.25rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
103
|
-
What every page gives you
|
|
104
|
-
</h2>
|
|
105
|
-
<ul class="m-0 mt-3 list-none space-y-1.5 p-0 text-[0.9375rem] text-ink-700 dark:text-ink-200">
|
|
106
|
-
<li class="flex items-baseline gap-2">
|
|
107
|
-
<span aria-hidden="true" class="text-ink-400 dark:text-ink-500">—</span>
|
|
108
|
-
<span>Stack, category, and architecture at a glance</span>
|
|
109
|
-
</li>
|
|
110
|
-
<li class="flex items-baseline gap-2">
|
|
111
|
-
<span aria-hidden="true" class="text-ink-400 dark:text-ink-500">—</span>
|
|
112
|
-
<span>Supported platforms and license</span>
|
|
113
|
-
</li>
|
|
114
|
-
<li class="flex items-baseline gap-2">
|
|
115
|
-
<span aria-hidden="true" class="text-ink-400 dark:text-ink-500">—</span>
|
|
116
|
-
<span>Activity and status — last commit, monthly history, health signals</span>
|
|
117
|
-
</li>
|
|
118
|
-
<li class="flex items-baseline gap-2">
|
|
119
|
-
<span aria-hidden="true" class="text-ink-400 dark:text-ink-500">—</span>
|
|
120
|
-
<span>License, stars, and curation tier</span>
|
|
121
|
-
</li>
|
|
122
|
-
<li class="flex items-baseline gap-2">
|
|
123
|
-
<span aria-hidden="true" class="text-ink-400 dark:text-ink-500">—</span>
|
|
124
|
-
<span>Curated notes: best for, why listed, caveats</span>
|
|
125
|
-
</li>
|
|
126
|
-
<li class="flex items-baseline gap-2">
|
|
127
|
-
<span aria-hidden="true" class="text-ink-400 dark:text-ink-500">—</span>
|
|
128
|
-
<span>Filters that respect you — search by stack, platform, license, or status</span>
|
|
129
|
-
</li>
|
|
130
|
-
</ul>
|
|
131
|
-
</section>
|
|
132
|
-
|
|
133
|
-
<section class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors mt-4 p-5 sm:p-6">
|
|
134
|
-
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
135
|
-
Generic by design
|
|
136
|
-
</span>
|
|
137
|
-
<h2 class="mt-1 m-0 text-[1.125rem] sm:text-[1.25rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
138
|
-
Generic by design
|
|
139
|
-
</h2>
|
|
140
|
-
<p class="mt-3 m-0 text-[0.9375rem] leading-relaxed text-ink-700 dark:text-ink-200">
|
|
141
|
-
The framework supports three blueprints: project-directory,
|
|
142
|
-
resource-hub, and ecosystem-map. Each can be configured
|
|
143
|
-
without touching the components — pages, schema, and
|
|
144
|
-
routes all derive from <code class="font-mono">grove.config.ts</code>.
|
|
145
|
-
</p>
|
|
146
|
-
</section>
|
|
147
|
-
|
|
148
|
-
<section class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors mt-4 p-5 sm:p-6">
|
|
149
|
-
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
150
|
-
Free to fork, free to extend
|
|
151
|
-
</span>
|
|
152
|
-
<h2 class="mt-1 m-0 text-[1.125rem] sm:text-[1.25rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
|
|
153
|
-
Free to fork, free to extend
|
|
154
|
-
</h2>
|
|
155
|
-
<p class="mt-3 m-0 text-[0.9375rem] leading-relaxed text-ink-700 dark:text-ink-200">
|
|
156
|
-
The full data lives in this repository as plain YAML. The
|
|
157
|
-
static output is plain HTML. No database, no JavaScript
|
|
158
|
-
framework, no CDN with sticky sessions.
|
|
159
|
-
</p>
|
|
160
|
-
<p class="mt-3 m-0 text-[0.9375rem] leading-relaxed text-ink-700 dark:text-ink-200">
|
|
161
|
-
Anyone can suggest a new {item}, fix a typo, or improve the
|
|
162
|
-
metadata through a pull request.
|
|
163
|
-
</p>
|
|
164
|
-
</section>
|
|
165
|
-
|
|
166
|
-
<section class="mt-8 flex flex-wrap items-center gap-3">
|
|
167
|
-
<a href={`/${slug}`} 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">Browse the directory</a>
|
|
168
|
-
{githubUrl && (
|
|
169
|
-
<a
|
|
170
|
-
href={githubUrl}
|
|
171
|
-
target="_blank"
|
|
172
|
-
rel="noopener noreferrer"
|
|
173
|
-
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"
|
|
174
|
-
>
|
|
175
|
-
View on GitHub
|
|
176
|
-
</a>
|
|
177
|
-
)}
|
|
178
|
-
<a href="/submit" 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-transparent text-foreground hover:bg-accent hover:text-accent-foreground">Submit a {item} →</a>
|
|
179
|
-
</section>
|
|
180
|
-
</article>
|
|
181
|
-
</Container>
|
|
182
|
-
</BaseLayout>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
/**
|
|
3
|
-
* /apps/<slug> — V0-published alias URL → V1 canonical.
|
|
4
|
-
*
|
|
5
|
-
* The canonical V1 detail URL is `/<blueprint>/<recordSlug>` (e.g.
|
|
6
|
-
* `/projects/coolify`). The V0 published Astro template exposed
|
|
7
|
-
* `/apps/<slug>` as a static alias to keep the openapps-style URL
|
|
8
|
-
* working for project-directory blueprints. Now that the V1
|
|
9
|
-
* template uses the blueprint-aware dynamic route everywhere,
|
|
10
|
-
* this page is a pure redirect: any `/apps/<slug>` request is
|
|
11
|
-
* sent to the blueprint-canonical path.
|
|
12
|
-
*/
|
|
13
|
-
import { indexSlug, fullRecords, projectBySlug, recordBySlug } from "../../data/records";
|
|
14
|
-
|
|
15
|
-
export async function getStaticPaths() {
|
|
16
|
-
return fullRecords.map((r) => ({ params: { recordSlug: r.slug } }));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const slug = indexSlug();
|
|
20
|
-
const recordSlug = Astro.params.recordSlug ?? "";
|
|
21
|
-
|
|
22
|
-
if (slug !== "projects") {
|
|
23
|
-
return Astro.redirect(`/${slug}/${recordSlug}`);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const record = recordBySlug(recordSlug);
|
|
27
|
-
if (!record) {
|
|
28
|
-
return Astro.redirect(`/${slug}`);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Canonical V1 URL.
|
|
32
|
-
return Astro.redirect(`/${slug}/${recordSlug}`, 301);
|
|
33
|
-
---
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
/**
|
|
3
|
-
* Contributors page — full list with per-user contribution counts.
|
|
4
|
-
*
|
|
5
|
-
* Generic: works for any blueprint (project-directory, resource-hub,
|
|
6
|
-
* ecosystem-map) and any source of contributors. Reads from
|
|
7
|
-
* `data/generated/contributors.json` if present, otherwise renders
|
|
8
|
-
* a graceful empty state. The file is produced by the
|
|
9
|
-
* `sync-contributors` GitHub Action (see `.github/workflows/`).
|
|
10
|
-
*
|
|
11
|
-
* Falls back to deriving contributors from the records themselves
|
|
12
|
-
* (record.github.fullName → owner handle) when no JSON file exists,
|
|
13
|
-
* so a fresh scaffold still shows something useful.
|
|
14
|
-
*/
|
|
15
|
-
import siteConfig from "../../data/generated/site-config.json";
|
|
16
|
-
import BaseLayout from "@grove-dev/astro/layouts/BaseLayout.astro";
|
|
17
|
-
import { projects } from "../data/records";
|
|
18
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
19
|
-
import { fileURLToPath } from "node:url";
|
|
20
|
-
import { dirname, resolve } from "node:path";
|
|
21
|
-
|
|
22
|
-
interface Contributor {
|
|
23
|
-
username: string;
|
|
24
|
-
name?: string;
|
|
25
|
-
avatarUrl?: string;
|
|
26
|
-
profileUrl?: string;
|
|
27
|
-
contributions?: number;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const here = dirname(fileURLToPath(import.meta.url));
|
|
31
|
-
const contributorsPath = [
|
|
32
|
-
resolve(here, "..", "..", "data", "generated", "contributors.json"),
|
|
33
|
-
resolve(process.cwd(), "data", "generated", "contributors.json"),
|
|
34
|
-
].find((p) => existsSync(p));
|
|
35
|
-
|
|
36
|
-
let contributors: Contributor[] = [];
|
|
37
|
-
if (contributorsPath) {
|
|
38
|
-
try {
|
|
39
|
-
const parsed = JSON.parse(readFileSync(contributorsPath, "utf8")) as {
|
|
40
|
-
contributors?: Contributor[];
|
|
41
|
-
};
|
|
42
|
-
contributors = parsed.contributors ?? [];
|
|
43
|
-
} catch {
|
|
44
|
-
contributors = [];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Fallback: derive owners from record.github.fullName when no JSON
|
|
49
|
-
// is present (fresh scaffold before the first sync run).
|
|
50
|
-
if (contributors.length === 0) {
|
|
51
|
-
const seen = new Map<string, Contributor>();
|
|
52
|
-
for (const r of projects) {
|
|
53
|
-
const full = r.github?.fullName;
|
|
54
|
-
if (!full || !full.includes("/")) continue;
|
|
55
|
-
const username = full.split("/")[0];
|
|
56
|
-
if (seen.has(username)) continue;
|
|
57
|
-
seen.set(username, {
|
|
58
|
-
username,
|
|
59
|
-
avatarUrl: `https://avatars.githubusercontent.com/${username}?v=4&s=80`,
|
|
60
|
-
profileUrl: `https://github.com/${username}`,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
contributors = [...seen.values()].sort((a, b) =>
|
|
64
|
-
a.username.localeCompare(b.username),
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const total = contributors.length;
|
|
69
|
-
const sorted = [...contributors].sort((a, b) => {
|
|
70
|
-
const ac = a.contributions ?? 0;
|
|
71
|
-
const bc = b.contributions ?? 0;
|
|
72
|
-
if (bc !== ac) return bc - ac;
|
|
73
|
-
return a.username.localeCompare(b.username);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
const title = `Contributors — ${siteConfig.name}`;
|
|
77
|
-
const description =
|
|
78
|
-
`Every person who has helped build ${siteConfig.name} — from a single line to long-running stewardship.`;
|
|
79
|
-
|
|
80
|
-
const repoUrl = siteConfig.repoUrl;
|
|
81
|
-
const contributorsGraphHref = repoUrl ? `${repoUrl.replace(/\/$/, "")}/graphs/contributors` : null;
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
<BaseLayout title={title} description={description} site={siteConfig}>
|
|
85
|
-
<section class="py-12 sm:py-16">
|
|
86
|
-
<div class="mx-auto w-full max-w-wide px-5 py-12 sm:px-7 sm:py-16">
|
|
87
|
-
<span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
|
|
88
|
-
Contributors
|
|
89
|
-
</span>
|
|
90
|
-
<h1 class="m-0 mt-2 text-[2rem] sm:text-[2.5rem] font-semibold leading-[1.05] tracking-tight text-ink-900 dark:text-ink-100">
|
|
91
|
-
{total > 0 ? `Showing all ${total} contributors` : "Contributors"}
|
|
92
|
-
</h1>
|
|
93
|
-
<p class="m-0 mt-3 max-w-2xl text-base leading-relaxed text-ink-700 dark:text-ink-200">
|
|
94
|
-
{total > 0
|
|
95
|
-
? `Every person who has helped build ${siteConfig.name} — from a single line to long-running stewardship.`
|
|
96
|
-
: `Contributors will appear here once ${siteConfig.name} syncs its first set of GitHub metadata. The list is auto-generated from ${repoUrl ? repoUrl : "the project's source repository"}.`}
|
|
97
|
-
</p>
|
|
98
|
-
|
|
99
|
-
{contributorsGraphHref && (
|
|
100
|
-
<p class="m-0 mt-3 text-sm text-ink-500 dark:text-ink-400">
|
|
101
|
-
<a
|
|
102
|
-
href={contributorsGraphHref}
|
|
103
|
-
target="_blank"
|
|
104
|
-
rel="noopener noreferrer"
|
|
105
|
-
class="font-medium underline decoration-ink-300 underline-offset-2 hover:decoration-ink-500 dark:decoration-ink-700 dark:hover:decoration-ink-400"
|
|
106
|
-
>
|
|
107
|
-
GitHub contributors graph →
|
|
108
|
-
</a>
|
|
109
|
-
</p>
|
|
110
|
-
)}
|
|
111
|
-
</div>
|
|
112
|
-
</section>
|
|
113
|
-
|
|
114
|
-
{sorted.length === 0 ? (
|
|
115
|
-
<section class="py-12 sm:py-16">
|
|
116
|
-
<div class="mx-auto w-full max-w-container px-5 pb-16 sm:px-7">
|
|
117
|
-
<div class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors flex flex-col items-center gap-3 p-8 text-center">
|
|
118
|
-
<p class="m-0 text-sm text-ink-500 dark:text-ink-400">
|
|
119
|
-
No contributors synced yet. Once the first sync runs, every
|
|
120
|
-
contributor avatar lands here.
|
|
121
|
-
</p>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
</section>
|
|
125
|
-
) : (
|
|
126
|
-
<section class="py-12 sm:py-16" aria-label="Contributors list">
|
|
127
|
-
<div class="mx-auto w-full max-w-wide px-5 pb-16 sm:px-7">
|
|
128
|
-
<ul
|
|
129
|
-
class="m-0 grid list-none grid-cols-2 gap-3 p-0 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6"
|
|
130
|
-
aria-label="Contributors"
|
|
131
|
-
>
|
|
132
|
-
{sorted.map((c) => {
|
|
133
|
-
const href = c.profileUrl ?? `https://github.com/${c.username}`;
|
|
134
|
-
const avatar =
|
|
135
|
-
c.avatarUrl ??
|
|
136
|
-
`https://avatars.githubusercontent.com/${c.username}?v=4&s=80`;
|
|
137
|
-
return (
|
|
138
|
-
<li class="m-0 p-0">
|
|
139
|
-
<a
|
|
140
|
-
href={href}
|
|
141
|
-
target="_blank"
|
|
142
|
-
rel="noopener noreferrer"
|
|
143
|
-
class="group rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors flex flex-col items-center gap-2 p-3 text-center no-underline hover:border-ink-300 dark:hover:border-ink-700"
|
|
144
|
-
data-event="contributor_click"
|
|
145
|
-
data-event-source="contributors_page"
|
|
146
|
-
>
|
|
147
|
-
<img
|
|
148
|
-
src={avatar}
|
|
149
|
-
alt={c.name ?? c.username}
|
|
150
|
-
width="56"
|
|
151
|
-
height="56"
|
|
152
|
-
loading="lazy"
|
|
153
|
-
decoding="async"
|
|
154
|
-
class="h-14 w-14 rounded-full border border-ink-200 object-cover dark:border-ink-800"
|
|
155
|
-
/>
|
|
156
|
-
<span class="line-clamp-1 text-sm font-medium text-ink-700 group-hover:text-ink-900 dark:text-ink-300 dark:group-hover:text-ink-100">
|
|
157
|
-
{c.name ?? c.username}
|
|
158
|
-
</span>
|
|
159
|
-
<span class="text-2xs text-ink-500 dark:text-ink-400">
|
|
160
|
-
@{c.username}
|
|
161
|
-
</span>
|
|
162
|
-
{typeof c.contributions === "number" && (
|
|
163
|
-
<span class="font-mono text-2xs text-ink-400">
|
|
164
|
-
{c.contributions.toLocaleString()} contributions
|
|
165
|
-
</span>
|
|
166
|
-
)}
|
|
167
|
-
</a>
|
|
168
|
-
</li>
|
|
169
|
-
);
|
|
170
|
-
})}
|
|
171
|
-
</ul>
|
|
172
|
-
</div>
|
|
173
|
-
</section>
|
|
174
|
-
)}
|
|
175
|
-
</BaseLayout>
|