-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
83 changed files
with
6,467 additions
and
2,768 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:18-alpine | ||
FROM node:20-alpine | ||
WORKDIR /app | ||
COPY package*.json ./ | ||
COPY server ./server | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
VITE_API=/api | ||
VITE_APP_MATOMO_BASE_URL=https://piwik.enseignementsup-recherche.pro | ||
VITE_APP_NAME="Works magnet 🧲" | ||
VITE_APP_NAME="Works-magnet 🧲" | ||
VITE_APP_TAG_LIMIT=3 | ||
VITE_DESCRIPTION="Retrieve the scholarly works of your institution" | ||
VITE_GIT_REPOSITORY_URL=https://github.com/dataesr/works-magnet | ||
VITE_HEADER_TAG= | ||
VITE_HEADER_TAG_COLOR=new | ||
VITE_MINISTER_NAME="Ministère<br>chargé<br>de l'enseignement<br>supérieur<br>et de la recherche" | ||
VITE_VERSION=$npm_package_version | ||
VITE_WS_HOST=wss://works-magnet.dataesr.ovh | ||
VITE_WS_HOST=wss://works-magnet.esr.gouv.fr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
import { Badge, Button, Col, Row, Text } from '@dataesr/dsfr-plus'; | ||
import PropTypes from 'prop-types'; | ||
import { useState } from 'react'; | ||
|
||
import { getIdLink } from '../../utils/works'; | ||
|
||
export default function MentionListItem({ mention }) { | ||
const [expanded, setExpanded] = useState(false); | ||
|
||
const getIdLinkDisplay = (idType, idValue) => { | ||
const idLink = getIdLink(idType, idValue); | ||
const html = idLink | ||
? `<a href="${idLink}" target="_blank">${idValue}</a>` | ||
: `<span>${idValue}</span>`; | ||
return html; | ||
}; | ||
|
||
return ( | ||
<li key={mention.id}> | ||
<Row> | ||
<Col> | ||
<input type="checkbox" selected={mention.selected} /> | ||
</Col> | ||
<Col md={8}> | ||
<strong> | ||
<span title="raw form">{mention.rawForm}</span> | ||
</strong> | ||
<Badge size="sm" color="blue-cumulus">{mention.type}</Badge> | ||
<div style={{ maxWidth: '90%' }} className="fr-mt-1w"> | ||
<span className="fr-icon-quote-fill fr-icon--sm fr-mr-1w" aria-hidden="true" title="context" /> | ||
<span dangerouslySetInnerHTML={{ __html: mention.context }} /> | ||
</div> | ||
{ | ||
!expanded && ( | ||
<Button onClick={() => setExpanded(!expanded)} variant="text"> | ||
view details | ||
</Button> | ||
) | ||
} | ||
{expanded && ( | ||
<div style={{ borderLeft: '2px solid #000', paddingLeft: '8px' }}> | ||
<div className="fr-mt-1w"> | ||
<Text size="xs" className="fr-my-0"> | ||
<b>DOI</b> | ||
<span | ||
className="fr-ml-1w" | ||
dangerouslySetInnerHTML={{ __html: getIdLinkDisplay('doi', mention.doi) }} | ||
/> | ||
</Text> | ||
</div> | ||
<div className="fr-mt-1w"> | ||
<span className="fr-icon-team-fill fr-icon--sm fr-mr-2w" aria-hidden="true" title="authors" /> | ||
<i> | ||
{mention.authors.slice(0, 5).join(', ')} | ||
{mention.authors.length > 5 ? '...' : ''} | ||
</i> | ||
</div> | ||
{ | ||
mention.affiliations && mention.affiliations.length > 0 && ( | ||
<div className="fr-mt-1w"> | ||
<span className="fr-icon-building-fill fr-icon--sm fr-mr-2w" aria-hidden="true" title="authors" /> | ||
<i> | ||
{mention.affiliations.slice(0, 5).join(', ')} | ||
{mention.affiliations.length > 5 ? '...' : ''} | ||
</i> | ||
</div> | ||
) | ||
} | ||
<Button onClick={() => setExpanded(!expanded)} variant="text"> | ||
hide details | ||
</Button> | ||
</div> | ||
)} | ||
</Col> | ||
<Col className="text-center"> | ||
{(mention.mention_context.created) ? ( | ||
<Badge className="fr-mr-1w" size="" color="green-bourgeon"> | ||
created | ||
</Badge> | ||
) : ( | ||
<Badge className="fr-mr-1w" size=""> | ||
not created | ||
</Badge> | ||
)} | ||
</Col> | ||
<Col className="text-center"> | ||
{(mention.mention_context.used) ? ( | ||
<Badge className="fr-mr-1w" size="" color="green-bourgeon"> | ||
used | ||
</Badge> | ||
) : ( | ||
<Badge className="fr-mr-1w" size=""> | ||
not used | ||
</Badge> | ||
)} | ||
</Col> | ||
<Col className="text-center"> | ||
{(mention.mention_context.shared) ? ( | ||
<Badge className="fr-mr-1w" size="" color="green-bourgeon"> | ||
shared | ||
</Badge> | ||
) : ( | ||
<Badge className="fr-mr-1w" size=""> | ||
not shared | ||
</Badge> | ||
)} | ||
</Col> | ||
</Row> | ||
</li> | ||
); | ||
} | ||
|
||
MentionListItem.propTypes = { | ||
mention: PropTypes.object.isRequired, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
.ribbon { | ||
left: -60px; | ||
left: -85px; | ||
position: absolute; | ||
top: 10px; | ||
top: 2px; | ||
z-index: calc(var(--ground) + 600); | ||
|
||
.badge { | ||
background: #e1000f; | ||
box-shadow: inset 0px 0px 0px 4px rgba(255, 255, 255, 0.34); | ||
color: #FFF; | ||
font-family: sans-serif; | ||
font-size: 20px; | ||
height: 50px; | ||
line-height: 50px; | ||
font-size: 10px; | ||
height: 25px; | ||
line-height: 25px; | ||
text-align: center; | ||
transform: rotate(-45deg); | ||
width: 200px; | ||
} | ||
} | ||
|
||
.sticky { | ||
.expanded { | ||
.ribbon { | ||
left: -80px; | ||
top: 3px; | ||
left: -60px; | ||
top: 10px; | ||
|
||
.badge { | ||
font-size: 14px; | ||
height: 30px; | ||
line-height: 30px; | ||
font-size: 20px; | ||
height: 50px; | ||
line-height: 50px; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.