diff --git a/website/src/templates/universe.js b/website/src/templates/universe.js index fcd433823..e68acfad2 100644 --- a/website/src/templates/universe.js +++ b/website/src/templates/universe.js @@ -195,6 +195,19 @@ const SpaCyVersion = ({ version }) => { )) } +const ImageGitHub = ({ url, isRounded, title }) => ( + // eslint-disable-next-line @next/next/no-img-element + {`${title} +) + const Project = ({ data, components }) => ( <> @@ -203,23 +216,20 @@ const Project = ({ data, components }) => ( {data.spacy_version && <SpaCyVersion version={data.spacy_version} />} {data.github && ( <Link to={`https://github.com/${data.github}`} hidden> - {[ - `release/${data.github}/all.svg?style=flat-square`, - `license/${data.github}.svg?style=flat-square`, - `stars/${data.github}.svg?style=social&label=Stars`, - ].map((url, i) => ( - // eslint-disable-next-line @next/next/no-img-element - <img - style={{ - borderRadius: '1em', - marginRight: '0.5rem', - verticalAlign: 'middle', - }} - key={i} - src={`https://img.shields.io/github/${url}`} - alt="" - /> - ))} + <ImageGitHub + title={data.title || data.id} + url={`release/${data.github}/all.svg?style=flat-square`} + isRounded + /> + <ImageGitHub + title={data.title || data.id} + url={`license/${data.github}.svg?style=flat-square`} + isRounded + /> + <ImageGitHub + title={data.title || data.id} + url={`stars/${data.github}.svg?style=social&label=Stars`} + /> </Link> )} </p>