mirror of
https://github.com/dzeiocom/markblog.git
synced 2025-06-19 14:09:18 +00:00
@ -37,7 +37,11 @@ export default class Element extends React.Component<Props, {}> {
|
||||
<div>
|
||||
<Link href="/[category]/[slug]" as={this.props.link}>
|
||||
{this.props.image ? (
|
||||
<a><img src={this.props.image} alt={this.props.alt}/></a>
|
||||
<a><picture>
|
||||
<source srcSet={require(`../images${this.props.image}?webp`)} type="image/webp" />
|
||||
<source srcSet={require(`../images${this.props.image}`)} type="image/png" />
|
||||
<img src={require(`../images${this.props.image}`)} />
|
||||
</picture></a> //<img src={require(`../images${this.props.image}`/*this.props.image*/)} alt={this.props.alt}/>
|
||||
) : (
|
||||
<div></div>
|
||||
)}
|
||||
|
@ -27,9 +27,6 @@ export default class Navbar extends React.Component<Props, States> {
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
if (window.location.origin !== config.domain) {
|
||||
window.location.replace(`${config.domain}${window.location.pathname}`)
|
||||
}
|
||||
window.addEventListener('scroll', this.onScroll)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user