mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-05 12:50:20 +03:00
Merge branch 'master' into fix-aria-hidden-element
This commit is contained in:
commit
6d64b7d481
|
@ -88,10 +88,16 @@ const Image = ({ src, alt, title, href, ...props }) => {
|
||||||
const markdownComponents = { code: InlineCode, p: Fragment, a: Link }
|
const markdownComponents = { code: InlineCode, p: Fragment, a: Link }
|
||||||
return (
|
return (
|
||||||
<figure className="gatsby-resp-image-figure">
|
<figure className="gatsby-resp-image-figure">
|
||||||
<Link className={linkClassNames} href={href ?? src} noLinkLayout forceExternal>
|
{href ? (
|
||||||
|
<Link className={linkClassNames} href={href} noLinkLayout forceExternal>
|
||||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||||
<img className={classes.image} src={src} alt={alt} width={650} height="auto" />
|
<img className={classes.image} src={src} alt={alt} width={650} height="auto" />
|
||||||
</Link>
|
</Link>
|
||||||
|
) : (
|
||||||
|
/* eslint-disable-next-line @next/next/no-img-element */
|
||||||
|
<img className={classes.image} src={src} alt={alt} width={650} height="auto" />
|
||||||
|
)}
|
||||||
|
|
||||||
{title && (
|
{title && (
|
||||||
<figcaption className="gatsby-resp-image-figcaption">
|
<figcaption className="gatsby-resp-image-figcaption">
|
||||||
<MarkdownToReact markdown={title} />
|
<MarkdownToReact markdown={title} />
|
||||||
|
@ -104,7 +110,7 @@ const Image = ({ src, alt, title, href, ...props }) => {
|
||||||
const ImageFill = ({ image, ...props }) => {
|
const ImageFill = ({ image, ...props }) => {
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
class={classes['figure-fill']}
|
className={classes['figure-fill']}
|
||||||
style={{ paddingBottom: `${(image.height / image.width) * 100}%` }}
|
style={{ paddingBottom: `${(image.height / image.width) * 100}%` }}
|
||||||
>
|
>
|
||||||
<ImageNext src={image.src} {...props} fill />
|
<ImageNext src={image.src} {...props} fill />
|
||||||
|
|
Loading…
Reference in New Issue
Block a user