Skip to content

Commit

Permalink
rename Introduction to Home; add menuTitle
Browse files Browse the repository at this point in the history
  • Loading branch information
fsimonjetz committed Apr 23, 2024
1 parent aa1017a commit cfecfa5
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/research-projects/subpages/ResearchProjects.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.project-page__sidebar
flex-direction: column
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SearchForm, { SearchFormProps } from 'fragmentarium/ui/SearchForm'
import { SearchResult } from 'fragmentarium/ui/search/FragmentariumSearchResult'
import PageContent from 'research-projects/subpages/caic/PageContent'

export default function Introduction({
export default function Home({
fragmentService,
fragmentSearchService,
bibliographyService,
Expand All @@ -19,7 +19,7 @@ export default function Introduction({
| 'fragmentQuery'
>): JSX.Element {
return (
<PageContent title={'Introduction'}>
<PageContent title={'Introduction'} menuTitle={'Home'}>
<p>
The cuneiform artifacts of the Iraq Museum in Baghdad are a central part
of the cultural heritage of Mesopotamia, which is of great importance to
Expand Down
7 changes: 5 additions & 2 deletions src/research-projects/subpages/caic/PageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ import TableOfContents from 'research-projects/subpages/caic/TableOfContents'

export default function PageContent({
title,
menuTitle,
children,
}: { title: string } & PropsWithChildren<unknown>): JSX.Element {
}: { title: string; menuTitle?: string } & PropsWithChildren<
unknown
>): JSX.Element {
return (
<AppContent
title={ResearchProjects.CAIC.name}
crumbs={[
new TextCrumb('Projects'),
new TextCrumb(ResearchProjects.CAIC.abbreviation),
new TextCrumb(title),
new TextCrumb(menuTitle || title),
]}
>
<Container fluid>
Expand Down
5 changes: 3 additions & 2 deletions src/research-projects/subpages/caic/TableOfContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react'
import { Nav } from 'react-bootstrap'
import { ResearchProjects } from 'research-projects/researchProject'
import TocLink from 'research-projects/subpages/TocLink'
import 'research-projects/subpages/ResearchProjects.sass'

function CaicTocLink({
isHome,
Expand All @@ -19,8 +20,8 @@ function CaicTocLink({

export default function TableOfContents(): JSX.Element {
return (
<Nav>
<CaicTocLink isHome>Introduction</CaicTocLink>
<Nav className={'project-page__sidebar'}>
<CaicTocLink isHome>Home</CaicTocLink>
<CaicTocLink>Search</CaicTocLink>
<CaicTocLink>Publications</CaicTocLink>
<CaicTocLink>Contact</CaicTocLink>
Expand Down
2 changes: 1 addition & 1 deletion src/research-projects/subpages/subpages.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Promise from 'bluebird'
import WordService from 'dictionary/application/WordService'
import FragmentSearchService from 'fragmentarium/application/FragmentSearchService'
import FragmentService from 'fragmentarium/application/FragmentService'
import Introduction from './caic/Introduction'
import Introduction from './caic/Home'
import BibliographyService from 'bibliography/application/BibliographyService'
import { act, render } from '@testing-library/react'
import { createMemoryHistory, MemoryHistory } from 'history'
Expand Down
6 changes: 3 additions & 3 deletions src/router/researchProjectRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import WordService from 'dictionary/application/WordService'
import FragmentSearchService from 'fragmentarium/application/FragmentSearchService'
import FragmentService from 'fragmentarium/application/FragmentService'
import ResearchProjectsOverview from 'research-projects/ResearchProjectsOverview'
import CaicIntroduction from 'research-projects/subpages/caic/Introduction'
import CaicHome from 'research-projects/subpages/caic/Home'
import CaicSearch from 'research-projects/subpages/caic/Search'
import CaicPublications from 'research-projects/subpages/caic/Publications'
import CaicContact from 'research-projects/subpages/caic/Contact'
Expand All @@ -33,14 +33,14 @@ export default function ResearchProjectRoutes({
exact
path={[
`/projects/${ResearchProjects.CAIC.abbreviation}`,
`/projects/${ResearchProjects.CAIC.abbreviation}/introduction`,
`/projects/${ResearchProjects.CAIC.abbreviation}/home`,
]}
render={(): ReactNode => (
<HeadTagsService
title={`${ResearchProjects.CAIC.abbreviation} in eBL`}
description={ResearchProjects.CAIC.name}
>
<CaicIntroduction
<CaicHome
fragmentService={fragmentService}
fragmentSearchService={fragmentSearchService}
wordService={wordService}
Expand Down

0 comments on commit cfecfa5

Please sign in to comment.