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