Rebuild the site on the stack the other converted sites share: Vite 8, React 19, TypeScript 7, react-router 8, Biome and sanitize.css, with the site data moved out of the bundle into static-contents/. - base the database code on cerebellum.neuroinf.jp and keep the pupil platform's table layout, about page and menu - load the Flickr badge feed as JSONP without extra libraries - serve the XooNIps data from modules/xoonips/, redirecting the old download and /database/file URLs - restate the column widths as border-box totals and keep form controls on white - track page views with GA4
49 lines
2.2 KiB
TypeScript
49 lines
2.2 KiB
TypeScript
import { Helmet } from '@dr.pogodin/react-helmet';
|
|
import { Route, Routes } from 'react-router';
|
|
import PageNotFound from '../common/lib/PageNotFound';
|
|
import type { MultiLang } from '../config';
|
|
import Functions from '../functions';
|
|
import styles from './Database.module.css';
|
|
import DatabaseAdvancedSearch from './DatabaseAdvancedSearch';
|
|
import DatabaseDetailItem from './DatabaseDetailItem';
|
|
import DatabaseSearchByAdvancedKeyword from './DatabaseSearchByAdvancedKeyword';
|
|
import DatabaseSearchByIndexId from './DatabaseSearchByIndexId';
|
|
import DatabaseSearchByItemType from './DatabaseSearchByItemType';
|
|
import DatabaseSearchByKeyword from './DatabaseSearchByKeyword';
|
|
import DatabaseTop from './DatabaseTop';
|
|
|
|
interface Props {
|
|
lang: MultiLang;
|
|
}
|
|
|
|
const Database = (props: Props) => {
|
|
const { lang } = props;
|
|
return (
|
|
<div className={styles.database}>
|
|
<Helmet>
|
|
<title>
|
|
{Functions.mlang('[en]Database[/en][ja]データベース[/ja]', lang)} - {Functions.siteTitle(lang)}
|
|
</title>
|
|
</Helmet>
|
|
<Routes>
|
|
<Route index element={<DatabaseTop lang={lang} />} />
|
|
<Route path="item/:id" element={<DatabaseDetailItem lang={lang} />} />
|
|
<Route path="item/id/:doi" element={<DatabaseDetailItem lang={lang} />} />
|
|
<Route path="advanced" element={<DatabaseAdvancedSearch lang={lang} />} />
|
|
<Route path="list" element={<DatabaseSearchByIndexId lang={lang} />} />
|
|
<Route path="list/:id" element={<DatabaseSearchByIndexId lang={lang} />} />
|
|
<Route path="search" element={<DatabaseSearchByKeyword lang={lang} />} />
|
|
<Route path="search/advanced" element={<DatabaseSearchByAdvancedKeyword lang={lang} />} />
|
|
<Route path="search/itemtype/:itemType" element={<DatabaseSearchByItemType lang={lang} />} />
|
|
<Route
|
|
path="search/itemtype/:itemType/:subItemType"
|
|
element={<DatabaseSearchByItemType lang={lang} />}
|
|
/>
|
|
<Route path="*" element={<PageNotFound lang={lang} />} />
|
|
</Routes>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Database;
|