Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2020-02-05 11:28:52 +01:00
parent 02234220e4
commit 32e09522bc
13 changed files with 3796 additions and 138 deletions

View File

@ -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>
)}

View File

@ -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)
}