|
@@ -1,20 +1,29 @@
|
|
|
import React from 'react';
|
|
|
|
|
|
import './home.scss';
|
|
|
+import logo from '../../assets/img/logo.png';
|
|
|
+import videoBg from '../../assets/img/video-bg.mp4';
|
|
|
|
|
|
import Sidebar from '../../components/sidebar/Sidebar';
|
|
|
+import EventInfoShort from '../../components/eventInfoShort/EventInfoShort';
|
|
|
|
|
|
export default class Home extends React.Component {
|
|
|
state = {
|
|
|
- videoURL: 'https://gcs-vimeo.akamaized.net/exp=1562893179~acl=%2A%2F1021052489.mp4%2A~hmac=6ef33efd6a7867f05a06d888e576e87a48b2f33f42ca65ed7e78cd0d7a5cf3b0/vimeo-prod-skyfire-std-us/01/2799/9/238996987/1021052489.mp4'
|
|
|
+ videoURL: 'https://gcs-vimeo.akamaized.net/exp=1564520542~acl=%2A%2F1021052489.mp4%2A~hmac=faf2d737dfcc461ab05364a37b61f39c7e8afda27ec51769eb01027130e159be/vimeo-prod-skyfire-std-us/01/2799/9/238996987/1021052489.mp4'
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
+ const { events } = this.props;
|
|
|
+ console.log(events);
|
|
|
return (
|
|
|
<>
|
|
|
<Sidebar history={this.props.history}/>
|
|
|
<div className="hero">
|
|
|
- <div className="container-wrap">
|
|
|
+ <div className="container-wrap hero-wrap">
|
|
|
+ <div className="hero-logo">
|
|
|
+ <img src={logo} alt="logo" />
|
|
|
+ <h3><span>Just</span>tri it</h3>
|
|
|
+ </div>
|
|
|
<h1>International competitions among professionals and amateurs</h1>
|
|
|
</div>
|
|
|
|
|
@@ -22,11 +31,32 @@ export default class Home extends React.Component {
|
|
|
<div className="bg-img"></div>
|
|
|
|
|
|
<video id="background-video" loop autoPlay>
|
|
|
- <source src={this.state.videoURL} type="video/mp4" />
|
|
|
- <source src={this.state.videoURL} type="video/ogg" />
|
|
|
+ <source src={videoBg} type="video/mp4" />
|
|
|
+ <source src={videoBg} type="video/ogg" />
|
|
|
Your browser does not support the video tag.
|
|
|
</video>
|
|
|
</div>
|
|
|
+ <div className="container-wrap home events">
|
|
|
+ <div className="events-content">
|
|
|
+ <h4>Last Events</h4>
|
|
|
+
|
|
|
+ <div className="events-list">
|
|
|
+ {
|
|
|
+ events.reverse().map((event, ind) =>
|
|
|
+ ind < 4 && <EventInfoShort
|
|
|
+ key={event._id}
|
|
|
+ title={event.title}
|
|
|
+ country={event.country}
|
|
|
+ city={event.city}
|
|
|
+ id={event._id}
|
|
|
+ eventDate={event.eventDate}
|
|
|
+ imgSrc={event.mainBannerPicture}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</>
|
|
|
)
|
|
|
}
|