diff --git a/CHANGELOG.md b/CHANGELOG.md index 33e3ece70..6e48548e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG.md +## [1.3.2] - 2023-03-28 + +- Add self-hosted video + ## [1.3.1] - 2023-02-13 - Update dependencies diff --git a/src/partials/HeroHome.jsx b/src/partials/HeroHome.jsx index 9bf77297f..e2481d639 100755 --- a/src/partials/HeroHome.jsx +++ b/src/partials/HeroHome.jsx @@ -1,15 +1,18 @@ -import React, { useState } from 'react'; +import React, { useState, useRef, useEffect } from 'react'; import Modal from '../utils/Modal'; import HeroImage from '../images/hero-image.png'; function HeroHome() { - const [videoModalOpen, setVideoModalOpen] = useState(false); + const video = useRef(null); + + useEffect(() => { + videoModalOpen ? video.current.play() : video.current.pause(); + }, [videoModalOpen]); return (
- {/* Illustration behind hero content */}
- {/* Hero content */}
- {/* Section header */}
-

Make your website wonderful

+

+ Make your website wonderful +

-

Our landing page template works on all devices, so you only have to set it up once, and get beautiful results forever.

+

+ Our landing page template works on all devices, so you only have to set it up once, and get beautiful results forever. +

@@ -53,7 +62,14 @@ function HeroHome() {
Hero - + @@ -82,8 +98,20 @@ function HeroHome() {
-
-
-
); } -export default HeroHome; \ No newline at end of file +export default HeroHome; diff --git a/src/videos/video.mp4 b/src/videos/video.mp4 new file mode 100644 index 000000000..92686932f Binary files /dev/null and b/src/videos/video.mp4 differ