Skip to content

Commit

Permalink
add aluGeneva
Browse files Browse the repository at this point in the history
  • Loading branch information
zsomborfoldi committed Dec 13, 2024
1 parent 1d3f501 commit cfd83a1
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 0 deletions.
80 changes: 80 additions & 0 deletions src/research-projects/subpages/aluGeneva/Home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import React from 'react'
import { Container } from 'react-bootstrap'
import SearchForm, { SearchFormProps } from 'fragmentarium/ui/SearchForm'
import { SearchResult } from 'fragmentarium/ui/search/FragmentariumSearchResult'
import PageContent from 'research-projects/subpages/aluGeneva/PageContent'
import ExternalLink from 'common/ExternalLink'

export default function Home({
fragmentService,
fragmentSearchService,
bibliographyService,
wordService,
fragmentQuery,
}: Pick<
SearchFormProps,
| 'fragmentService'
| 'fragmentSearchService'
| 'bibliographyService'
| 'wordService'
| 'fragmentQuery'
>): JSX.Element {
return (
<PageContent title={'Introduction'} menuTitle={'Home'}>
<p>
The editions of *Šumma ālu* presented here were prepared in the context
of the projects “Edition of the Omen Series Šumma Alu” (2017–2021;{' '}
<ExternalLink href={'http://p3.snf.ch/project-175970'}>
http://p3.snf.ch/project-175970
</ExternalLink>{' '}
), “Edition of Nabû-zuqup-kēnu’s Šumma Alu series” (2024–2028;{' '}
<ExternalLink href={'https://data.snf.ch/grants/grant/10000955'}>
https://data.snf.ch/grants/grant/10000955
</ExternalLink>{' '}
), and “Typology and potential of the excerpt tablets of Šumma alu”
(2022–2023;{' '}
<ExternalLink href={'http://p3.snf.ch/project-205122'}>
http://p3.snf.ch/project-205122
</ExternalLink>{' '}
), directed by Prof. Catherine Mittermayer at the University of Geneva
and funded by the Swiss National Science Foundation. The complete score
editions can be downloaded (PDF) at the “Archive ouverte” of the
University of Geneva ({' '}
<ExternalLink href={'https://archive-ouverte.unige.ch/'}>
https://archive-ouverte.unige.ch/
</ExternalLink>{' '}
; search for “Shumma alu”).
</p>
<p>
Search for Ālu Geneva texts below or{' '}
<ExternalLink
href={
'https://www.unige.ch/lettres/antic/unites/mesopotamie/projets/projet-fns-10000955-edition-de-la-version-nabu-zuqup-kenu-de-summa-alu'
}
>
click here
</ExternalLink>{' '}
to learn more about the project.
</p>
<div className={'project-page__search'}>
<h3>Search in Ālu Geneva</h3>
<Container>
<SearchForm
fragmentSearchService={fragmentSearchService}
fragmentService={fragmentService}
wordService={wordService}
bibliographyService={bibliographyService}
fragmentQuery={fragmentQuery}
project={'aluGeneva'}
/>
</Container>
</div>
{fragmentQuery && (
<SearchResult
fragmentService={fragmentService}
fragmentQuery={fragmentQuery}
/>
)}
</PageContent>
)
}
39 changes: 39 additions & 0 deletions src/research-projects/subpages/aluGeneva/PageContent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React, { PropsWithChildren } from 'react'
import AppContent from 'common/AppContent'
import { ProjectCrumb, SectionCrumb, TextCrumb } from 'common/Breadcrumbs'
import { Container, Row, Col } from 'react-bootstrap'
import { ResearchProjects } from 'research-projects/researchProject'
import TableOfContents from 'research-projects/subpages/aluGeneva/TableOfContents'

export default function PageContent({
title,
menuTitle,
children,
}: { title: string; menuTitle?: string } & PropsWithChildren<
unknown
>): JSX.Element {
return (
<AppContent
title={ResearchProjects.aluGeneva.name}
crumbs={[
new SectionCrumb('Projects'),
new ProjectCrumb(ResearchProjects.aluGeneva),
new TextCrumb(menuTitle || title),
]}
>
<Container fluid>
<Row>
<Col>
<h3>{title}</h3>
</Col>
</Row>
<Row>
<Col>{children}</Col>
<Col sm={2}>
<TableOfContents />
</Col>
</Row>
</Container>
</AppContent>
)
}
43 changes: 43 additions & 0 deletions src/research-projects/subpages/aluGeneva/Search.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React from 'react'
import { Container } from 'react-bootstrap'
import SearchForm, { SearchFormProps } from 'fragmentarium/ui/SearchForm'
import { SearchResult } from 'fragmentarium/ui/search/FragmentariumSearchResult'
import PageContent from 'research-projects/subpages/aluGeneva/PageContent'

export default function Search({
fragmentService,
fragmentSearchService,
bibliographyService,
wordService,
fragmentQuery,
}: Pick<
SearchFormProps,
| 'fragmentService'
| 'fragmentSearchService'
| 'bibliographyService'
| 'wordService'
| 'fragmentQuery'
>): JSX.Element {
return (
<PageContent title={'Search'}>
<div className={'project-page__search'}>
<Container>
<SearchForm
fragmentSearchService={fragmentSearchService}
fragmentService={fragmentService}
wordService={wordService}
bibliographyService={bibliographyService}
fragmentQuery={fragmentQuery}
project={'aluGeneva'}
/>
</Container>
</div>
{fragmentQuery && (
<SearchResult
fragmentService={fragmentService}
fragmentQuery={fragmentQuery}
/>
)}
</PageContent>
)
}
33 changes: 33 additions & 0 deletions src/research-projects/subpages/aluGeneva/TableOfContents.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import _ from 'lodash'
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/ResearchProjects.sass'

function AluGenevaTocLink({
isHome,
path,
...props
}: { isHome?: boolean; path?: string } & React.ComponentProps<
typeof Nav.Link
>): JSX.Element {
const suffix = isHome ? '' : path || props.children?.toString().toLowerCase()
const href = _.compact([
'/projects',
ResearchProjects.aluGeneva.abbreviation,
suffix,
]).join('/')
return <TocLink {...props} href={href} />
}

export default function TableOfContents(): JSX.Element {
return (
<Nav className={'project-page__sidebar'}>
<AluGenevaTocLink isHome>Home</AluGenevaTocLink>
<AluGenevaTocLink path={'search'}>
Search Ālu Geneva Texts
</AluGenevaTocLink>
</Nav>
)
}

0 comments on commit cfd83a1

Please sign in to comment.