mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Projects (#192)
* Add file save UI and drafts project * Fix build * Create SearchList component as abstraction * Add project page and file tree view * Create Locale context * Create Theme context * Create Version context * Create Title context * Create Project context * Store current file in project context * Fix issues when renaming file and implement deleting * Style improvements * Make all project strings translatable * Fix z-index
This commit is contained in:
@@ -1,27 +1,25 @@
|
||||
import config from '../../config.json'
|
||||
import { ToolCard } from '../components'
|
||||
import { locale } from '../Locales'
|
||||
import { useLocale, useTitle } from '../contexts'
|
||||
import { cleanUrl } from '../Utils'
|
||||
|
||||
type HomeProps = {
|
||||
lang: string,
|
||||
changeTitle: (title: string) => unknown,
|
||||
interface Props {
|
||||
path?: string,
|
||||
}
|
||||
export function Home({ lang, changeTitle }: HomeProps) {
|
||||
const loc = locale.bind(null, lang)
|
||||
changeTitle(loc('title.home'))
|
||||
export function Home({}: Props) {
|
||||
const { locale } = useLocale()
|
||||
useTitle(locale('title.home'))
|
||||
return <main>
|
||||
<div class="home">
|
||||
<ToolCard title="Data packs">
|
||||
{config.generators.filter(g => !g.category).map(g =>
|
||||
<ToolCard title={loc(g.id)} link={cleanUrl(g.url)} />
|
||||
<ToolCard title={locale(g.id)} link={cleanUrl(g.url)} />
|
||||
)}
|
||||
<ToolCard title={loc('worldgen')} link="/worldgen/" />
|
||||
<ToolCard title={locale('worldgen')} link="/worldgen/" />
|
||||
</ToolCard>
|
||||
<ToolCard title="Resource packs">
|
||||
{config.generators.filter(g => g.category === 'assets').map(g =>
|
||||
<ToolCard title={loc(g.id)} link={cleanUrl(g.url)} />
|
||||
<ToolCard title={locale(g.id)} link={cleanUrl(g.url)} />
|
||||
)}
|
||||
</ToolCard>
|
||||
<ToolCard title="Report Inspector" icon="report"
|
||||
|
||||
Reference in New Issue
Block a user