Add resource pack generators: blockstates and model

This commit is contained in:
Misode
2021-11-05 01:22:23 +01:00
parent 6d8829ecde
commit fba80da273
11 changed files with 115 additions and 38 deletions

View File

@@ -4,16 +4,17 @@ import { locale } from '../Locales'
import { cleanUrl } from '../Utils'
type WorldgenProps = {
category: string,
lang: string,
changeTitle: (title: string) => unknown,
path?: string,
}
export function Worldgen({ lang, changeTitle }: WorldgenProps) {
export function Category({ category, lang, changeTitle }: WorldgenProps) {
const loc = locale.bind(null, lang)
changeTitle(loc('title.generator_category', loc('worldgen')))
changeTitle(loc('title.generator_category', loc(category)))
return <main>
<div class="home">
{config.generators.filter(g => g.category === 'worldgen').map(g =>
{config.generators.filter(g => g.category === category).map(g =>
<ToolCard title={loc(g.id)} link={cleanUrl(g.url)} />
)}
</div>

View File

@@ -18,6 +18,8 @@ export function Home({ lang, changeTitle }: HomeProps) {
)}
<ToolCard title={loc('worldgen')} link="/worldgen/" />
<hr />
<ToolCard title={loc('assets')} link="/assets/" />
<hr />
<ToolCard title="Report Inspector" icon="report" link="https://misode.github.io/report/">
<p>Analyse your performance reports</p>
</ToolCard>

View File

@@ -1,5 +1,5 @@
export * from './Category'
export * from './Changelog'
export * from './Generator'
export * from './Home'
export * from './Sounds'
export * from './Worldgen'