mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-05 12:50:20 +03:00
Add next/image
component to Universe
This commit is contained in:
parent
e599a13247
commit
d5d02f46ff
|
@ -1,6 +1,7 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
|
import ImageNext from 'next/image'
|
||||||
|
|
||||||
import Link from './link'
|
import Link from './link'
|
||||||
import { H5 } from './typography'
|
import { H5 } from './typography'
|
||||||
|
@ -18,8 +19,7 @@ export default function Card({ title, to, image, header, small, onClick, childre
|
||||||
<H5 className={classes.title}>
|
<H5 className={classes.title}>
|
||||||
{image && (
|
{image && (
|
||||||
<div className={classes.image}>
|
<div className={classes.image}>
|
||||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
<ImageNext src={image} height={35} width={35} alt="" />
|
||||||
<img src={image} width={35} alt="" />
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{title && (
|
{title && (
|
||||||
|
|
|
@ -51,8 +51,7 @@ export default function Title({
|
||||||
|
|
||||||
{image && (
|
{image && (
|
||||||
<div className={classes.image}>
|
<div className={classes.image}>
|
||||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
<Image src={image} width={100} height={100} alt="" />
|
||||||
<img src={image} width={100} height={100} alt="" />
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -81,10 +81,11 @@ const UniverseContent = ({ content = [], categories, theme, pageContext, mdxComp
|
||||||
}
|
}
|
||||||
const url = `/universe/project/${id}`
|
const url = `/universe/project/${id}`
|
||||||
const header = youtube && (
|
const header = youtube && (
|
||||||
// eslint-disable-next-line @next/next/no-img-element
|
<Image
|
||||||
<img
|
|
||||||
src={`https://img.youtube.com/vi/${youtube}/0.jpg`}
|
src={`https://img.youtube.com/vi/${youtube}/0.jpg`}
|
||||||
alt=""
|
alt=""
|
||||||
|
width="480"
|
||||||
|
height="360"
|
||||||
style={{
|
style={{
|
||||||
clipPath: 'inset(12.9% 0)',
|
clipPath: 'inset(12.9% 0)',
|
||||||
marginBottom: 'calc(-12.9% + 1rem)',
|
marginBottom: 'calc(-12.9% + 1rem)',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user