Improve homepage (#245)

* Improve how generators are listed on home

* Add some icons for generators

* Remove debug

* Refactor cachedFetch and use generated changelogs

* Add limit to how many changes are shown by default

* Add more generator icons

* Refactor cards

* Fix generator icons for light theme

* Add more worldgen icons

* Add remaining generator icons

* Refactor navigation and badges style

* Group on homepage for guides and tools

* Fix header button style

* Add versions and technical changelog to homepage

* Make it clear that not all changes could be documented
This commit is contained in:
Misode
2022-07-01 23:48:38 +02:00
committed by GitHub
parent 29031bb375
commit d0bae089d1
40 changed files with 791 additions and 460 deletions

View File

@@ -1,15 +1,8 @@
import { Footer, ToolCard } from '../components/index.js'
import config from '../Config.js'
import { Footer, GeneratorList } from '../components/index.js'
import { useLocale, useTitle } from '../contexts/index.js'
import { cleanUrl } from '../Utils.js'
const partners = [...new Set(config.generators
.filter(g => g.partner !== undefined)
.map(g => g.partner as string)
)]
interface Props {
path?: string,
path?: string
}
export function Partners({}: Props) {
const { locale } = useLocale()
@@ -17,11 +10,7 @@ export function Partners({}: Props) {
return <main>
<div class="container">
{partners.map(p => <ToolCard title={locale(`partner.${p}`)}>
{config.generators.filter(g => g.partner === p).map(g =>
<ToolCard title={locale(`partner.${p}.${g.id}`)} link={cleanUrl(g.url)} />
)}
</ToolCard>)}
<GeneratorList predicate={gen => gen.partner !== undefined} />
</div>
<Footer donate={false} />
</main>