mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Fix page titles and remove field settings page
This commit is contained in:
@@ -8,7 +8,7 @@ import '../styles/nodes.css'
|
||||
import { Analytics } from './Analytics'
|
||||
import { Header } from './components'
|
||||
import { loadLocale, locale, Locales } from './Locales'
|
||||
import { FieldSettings, Generator, Home, Worldgen } from './pages'
|
||||
import { Generator, Home, Worldgen } from './pages'
|
||||
import type { VersionId } from './Schemas'
|
||||
import { Store } from './Store'
|
||||
import { cleanUrl } from './Utils'
|
||||
@@ -70,7 +70,6 @@ function Main() {
|
||||
<Header {...{lang, title, version, theme, language: lang, changeLanguage, changeTheme}} />
|
||||
<Router onChange={changeRoute}>
|
||||
<Home path="/" {...{lang, changeTitle}} />
|
||||
<FieldSettings path="/settings/fields" {...{lang, changeTitle}} />
|
||||
<Worldgen path="/worldgen" {...{lang, changeTitle}} />
|
||||
<Generator default {...{lang, version, changeTitle}} onChangeVersion={changeVersion} />
|
||||
</Router>
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import { locale } from '../Locales'
|
||||
|
||||
type FieldSettingsProps = {
|
||||
lang: string,
|
||||
path?: string,
|
||||
}
|
||||
export function FieldSettings({ lang }: FieldSettingsProps) {
|
||||
const loc = locale.bind(null, lang)
|
||||
return <main>
|
||||
<div class="settings">
|
||||
<p>{loc('settings.fields.description')}</p>
|
||||
<ul class="field-list">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</main>
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
export * from './FieldSettings'
|
||||
export * from './Generator'
|
||||
export * from './Home'
|
||||
export * from './Worldgen'
|
||||
|
||||
@@ -4,6 +4,7 @@ import html from '@rollup/plugin-html'
|
||||
import config from './src/config.json'
|
||||
import { env } from 'process'
|
||||
import copy from 'rollup-plugin-copy'
|
||||
import English from './src/locales/en.json'
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
@@ -41,8 +42,9 @@ export default defineConfig({
|
||||
|
||||
function getTitle(m) {
|
||||
const minVersion = Math.max(0, config.versions.findIndex(v => m.minVersion === v.id))
|
||||
const versions = config.versions.slice(minVersion).map(v => v.id).join(', ')
|
||||
return `${m.name} Generator${m.category === true ? 's' : ''} Minecraft ${versions}`
|
||||
const versions = config.versions.slice(minVersion).map(v => v.id)
|
||||
versions.splice(0, versions.length - 3)
|
||||
return `${English[m.id] ?? ''} Generator${m.category === true ? 's' : ''} Minecraft ${versions.join(', ')}`
|
||||
}
|
||||
|
||||
function template({ files, title }) {
|
||||
|
||||
Reference in New Issue
Block a user