Skip to content

Commit

Permalink
Add notes to display
Browse files Browse the repository at this point in the history
  • Loading branch information
ejimsan committed Nov 14, 2024
1 parent ba1393f commit ce3d481
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/fragmentarium/ui/info/Details.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
margin-bottom: 0.4em;
}

.Details__item--provenance {
list-style-position: inside;
list-style-type: disc;
}

.Details__item--extra-margin {
margin-bottom: 1em;
}
Expand Down
14 changes: 9 additions & 5 deletions src/fragmentarium/ui/info/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ function Provenance({ fragment }: Props): JSX.Element {
function ExcavationDate({ fragment }: Props): JSX.Element {
const isRegularExcavation = fragment.archaeology?.isRegularExcavation
const date = fragment.archaeology?.date
const dateNotes = date?.notes

const formatDate = (date: DateRange) => {
const locale = navigator.language
Expand All @@ -135,6 +136,7 @@ function ExcavationDate({ fragment }: Props): JSX.Element {
<>
Regular Excavation
{date && <> ({formatDate(date)})</>}
{dateNotes && <>, {dateNotes}</>}
</>
)}
</>
Expand Down Expand Up @@ -178,16 +180,18 @@ function Details({
<li className="Details__item">
<Accession fragment={fragment} />
</li>
<li className="Details__item">
<Excavation fragment={fragment} />
</li>
<li className="Details__item">
<Provenance fragment={fragment} />
</li>
<li className="Details__item">
<li className="Details__item--provenance">
<Excavation fragment={fragment} />
</li>
<li className="Details__item--provenance">
<ExcavationDate fragment={fragment} />
</li>
<li className="Details__item">{`Findspot: ${findspotString || '-'}`}</li>
<li className="Details__item--provenance">{`Findspot: ${
findspotString || '-'
}`}</li>
<li className="Details__item">
<GenreSelection
fragment={fragment}
Expand Down

0 comments on commit ce3d481

Please sign in to comment.