diff --git a/website/src/pages/organism-selector/[redirectTo].astro b/website/src/pages/organism-selector/[redirectTo].astro new file mode 100644 index 000000000..c2e3a17b7 --- /dev/null +++ b/website/src/pages/organism-selector/[redirectTo].astro @@ -0,0 +1,45 @@ +--- +import { getConfiguredOrganisms } from '../../config'; +import BaseLayout from '../../layouts/BaseLayout.astro'; +import { routes } from '../../routes'; +const redirectTo = Astro.params.redirectTo; + +const purposes: { [key: string]: string } = { + submit: 'for which you want to submit data', + search: 'for which you want to browse data', +}; + +interface Routes { + [key: string]: (organism: string) => string; +} + +const myRoutes: Routes = { + submit: routes.submitPage, + search: routes.searchPage, +}; + +const purpose = purposes[redirectTo!]; +--- + + +
+

+ Please select an organism {purpose}. +

+ +
+ { + getConfiguredOrganisms().map(({ key, displayName, image, description }) => ( + + {image !== undefined && {displayName}} +

{displayName}

+

{description}

+
+ )) + } +
+
+
diff --git a/website/src/routes.ts b/website/src/routes.ts index 3996b037c..fbbc18f93 100644 --- a/website/src/routes.ts +++ b/website/src/routes.ts @@ -72,6 +72,7 @@ export const routes = { }, notFoundPage: () => `/404`, logout: () => '/logout', + organismSelectorPage: (redirectTo: string) => `/organism-selector/${redirectTo}`, }; export type ClassOfSearchPageType = 'SEARCH' | 'MY_SEQUENCES'; @@ -177,6 +178,14 @@ export const navigationItems = { function topNavigationItems(organism: string | undefined) { if (organism === undefined) { return [ + { + text: 'Browse', + path: routes.organismSelectorPage('search'), + }, + { + text: 'Submit', + path: routes.organismSelectorPage('submit'), + }, { text: 'User', path: routes.userOverviewPage(), @@ -190,7 +199,7 @@ function topNavigationItems(organism: string | undefined) { return [ { - text: 'Search', + text: 'Browse', path: routes.searchPage(organism), }, {