Skip to content

Commit 0138b54

Browse files
committed
Only show the top supporters on hompage
I no longer have time to maintain the full contributors list unfortunately
1 parent b8c65ed commit 0138b54

File tree

3 files changed

+123
-1037
lines changed

3 files changed

+123
-1037
lines changed

src/app/pages/Home.tsx

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { useMemo } from 'preact/hooks'
2-
import contributors from '../../contributors.json'
2+
import supporters from '../../supporters.json'
33
import { Card, ChangelogEntry, Footer, GeneratorCard, Giscus, ToolCard, ToolGroup } from '../components/index.js'
44
import { WhatsNewTime } from '../components/whatsnew/WhatsNewTime.jsx'
55
import { useLocale, useTitle } from '../contexts/index.js'
66
import { useAsync } from '../hooks/useAsync.js'
77
import { useMediaQuery } from '../hooks/useMediaQuery.js'
88
import { fetchChangelogs, fetchVersions, fetchWhatsNew } from '../services/DataFetcher.js'
99
import { Store } from '../Store.js'
10-
import { shuffle } from '../Utils.js'
1110

1211
const MIN_FAVORITES = 2
1312
const MAX_FAVORITES = 5
@@ -153,32 +152,20 @@ function WhatsNew() {
153152
}
154153

155154
function Contributors() {
156-
const supporters = useMemo(() => {
157-
return contributors.filter(c => c.types.includes('support') || c.types.includes('infrastructure'))
158-
}, [])
159-
160-
const otherContributors = useMemo(() => {
161-
return shuffle(contributors.filter(c => !supporters.includes(c)))
162-
}, [])
163-
164155
return <div class="contributors">
165156
<h3>Supporters</h3>
166157
<ContributorsList list={supporters} large />
167-
<h3>Contributors</h3>
168-
<ContributorsList list={otherContributors} />
169158
</div>
170159
}
171160

172161
interface ContributorsListProps {
173-
list: typeof contributors
162+
list: typeof supporters
174163
large?: boolean
175164
}
176165
function ContributorsList({ list, large }: ContributorsListProps) {
177-
const { locale } = useLocale()
178-
179166
return <div class={`contributors-list ${large ? 'contributors-large' : ''}`}>
180167
{list.map((c) =>
181-
<a class="tooltipped tip-se" href={c.url} target="_blank" aria-label={`${c.name}\n${c.types.map(t => `• ${locale('contributor.' + t)}`).join('\n')}`}>
168+
<a class="tooltipped tip-se" href={c.url} target="_blank" aria-label={c.name}>
182169
<img width={large ? 48 : 32} height={large ? 48 : 32} src={c.avatar} alt={c.name} loading="lazy" />
183170
</a>
184171
)}

0 commit comments

Comments
 (0)