Skip to content

Commit

Permalink
Remove logos, show numbers as list
Browse files Browse the repository at this point in the history
  • Loading branch information
fsimonjetz committed Oct 23, 2023
1 parent e8cf898 commit 077a64c
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 33 deletions.
16 changes: 1 addition & 15 deletions src/fragmentarium/ui/info/ExternalNumberLink.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
import ExternalLink from 'common/ExternalLink'
import cdliLogo from './logos/cdli.png'
import bdtnsLogo from './logos/bdtns.png'
import archibabLogo from './logos/archibab.jpeg'
import urOnlineLogo from './logos/ur-online.jpeg'
import hilprechtJenaLogo from './logos/hilprecht-jena.png'
import hilprechtHeidelbergLogo from './logos/hilprecht-heidelberg.png'
import React from 'react'

interface Props {
externalNumber: string
baseUrl: string
label: string
logo: string
}
function ExternalNumberLink({
baseUrl,
externalNumber,
label,
logo,
}: Props): JSX.Element {
const url = `${baseUrl}${encodeURIComponent(externalNumber)}`
return (
<ExternalLink href={url} aria-label={`${label} text ${externalNumber}`}>
<img className="ExternalResources__image" src={logo} alt={label} />
{`${label} (${externalNumber})`}
</ExternalLink>
)
}
Expand All @@ -33,7 +25,6 @@ export function CdliLink({ number }: { number: string }): JSX.Element {
externalNumber={number}
baseUrl={'https://cdli.mpiwg-berlin.mpg.de/'}
label={'CDLI'}
logo={cdliLogo}
/>
)
}
Expand All @@ -43,7 +34,6 @@ export function BdtnsLink({ number }: { number: string }): JSX.Element {
externalNumber={number}
baseUrl={'http://bdtns.filol.csic.es/'}
label={'BDTNS'}
logo={bdtnsLogo}
/>
)
}
Expand All @@ -53,7 +43,6 @@ export function ArchibabLink({ number }: { number: string }): JSX.Element {
externalNumber={number}
baseUrl={'http://www.archibab.fr/'}
label={'Archibab'}
logo={archibabLogo}
/>
)
}
Expand All @@ -63,7 +52,6 @@ export function UrOnlineLink({ number }: { number: string }): JSX.Element {
externalNumber={number}
baseUrl={'http://www.ur-online.org/subject/'}
label={'Ur Online'}
logo={urOnlineLogo}
/>
)
}
Expand All @@ -73,7 +61,6 @@ export function HilprechtJenaLink({ number }: { number: string }): JSX.Element {
externalNumber={number}
baseUrl={'https://hilprecht.mpiwg-berlin.mpg.de/object3d/'}
label={'Hilprecht Collection'}
logo={hilprechtJenaLogo}
/>
)
}
Expand All @@ -87,7 +74,6 @@ export function HilprechtHeidelbergLink({
externalNumber={number}
baseUrl={'https://doi.org/10.11588/heidicon/'}
label={'Hilprecht Collection – HeiCuBeDa'}
logo={hilprechtHeidelbergLogo}
/>
)
}
14 changes: 0 additions & 14 deletions src/fragmentarium/ui/info/ExternalResources.css

This file was deleted.

10 changes: 10 additions & 0 deletions src/fragmentarium/ui/info/ExternalResources.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.ExternalResources
&__image
height: auto
max-height: 3.5em
max-width: 100%
margin: 0.2em

&__items
padding: 0
list-style-position: inside
12 changes: 8 additions & 4 deletions src/fragmentarium/ui/info/ExternalResources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ExternalLink from 'common/ExternalLink'
import { Fragment } from 'fragmentarium/domain/fragment'
import { FragmentLink } from 'fragmentarium/domain/museum'

import './ExternalResources.css'
import './ExternalResources.sass'
import {
BdtnsLink,
CdliLink,
Expand Down Expand Up @@ -43,12 +43,16 @@ export default function ExternalResources({
[fragment.hilprechtHeidelbergNumber, HilprechtHeidelbergLink],
]
return (
<p className="ExternalResources">
<ul className="ExternalResources__items">
{fragment.hasLink && <MuseumLink link={fragment.getLink()} />}
{externalNumbers.map(
([number, LinkComponent], index) =>
number && <LinkComponent number={number} key={index} />
number && (
<li>
<LinkComponent number={number} key={index} />
</li>
)
)}
</p>
</ul>
)
}
Binary file removed src/fragmentarium/ui/info/logos/archibab.jpeg
Binary file not shown.
Binary file removed src/fragmentarium/ui/info/logos/bdtns.png
Binary file not shown.
Binary file removed src/fragmentarium/ui/info/logos/cdli.png
Binary file not shown.
Binary file not shown.
Binary file removed src/fragmentarium/ui/info/logos/hilprecht-jena.png
Binary file not shown.
Binary file removed src/fragmentarium/ui/info/logos/ur-online.jpeg
Binary file not shown.

0 comments on commit 077a64c

Please sign in to comment.