forked from newthuhole/hole_thu_frontend
取消图片链接
This commit is contained in:
@@ -59,14 +59,11 @@
|
|||||||
margin-left: .15rem;
|
margin-left: .15rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-link {
|
.ext-img {
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.img-link img {
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 2000px;
|
max-height: 2000px;
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-container .img-link img {
|
.left-container .img-link img {
|
||||||
|
|||||||
@@ -132,19 +132,12 @@ export class HighlightedMarkdown extends Component {
|
|||||||
shouldProcessNode: (node) => node.name === 'img',
|
shouldProcessNode: (node) => node.name === 'img',
|
||||||
processNode(node, index) {
|
processNode(node, index) {
|
||||||
return (
|
return (
|
||||||
<a
|
<img
|
||||||
href={normalize_url(node.attribs.src)}
|
src={normalize_url(node.attribs.src)}
|
||||||
target="_blank"
|
alt={node.alt}
|
||||||
rel="noopenner noreferrer"
|
className="ext-img"
|
||||||
className="ext-link img-link"
|
referrerPolicy="no-referrer"
|
||||||
key={index}
|
/>
|
||||||
>
|
|
||||||
<img
|
|
||||||
src={normalize_url(node.attribs.src)}
|
|
||||||
alt={node.alt}
|
|
||||||
referrerPolicy="no-referrer"
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user