Skip to content

Commit

Permalink
2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pasqualevitiello committed Mar 28, 2023
1 parent f6604bc commit 5cc848c
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG.md

## [2.0.2] - 2023-03-28

Add self-hosted video

## [2.0.1] - 2023-02-16

Remove header links
12 changes: 10 additions & 2 deletions src/partials/HeroHome.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import React, { useState } from 'react';
import React, { useState, useRef, useEffect } from 'react';
import Modal from '../utils/Modal';

import HeroImage from '../images/hero-image-01.jpg';

function HeroHome() {
const [videoModalOpen, setVideoModalOpen] = useState(false);
const video = useRef(null);

useEffect(() => {
videoModalOpen ? video.current.play() : video.current.pause();
}, [videoModalOpen]);

return (
<section>
@@ -93,7 +98,10 @@ function HeroHome() {
{/* Modal */}
<Modal id="modal" ariaLabel="modal-headline" show={videoModalOpen} handleClose={() => setVideoModalOpen(false)}>
<div className="relative pb-9/16">
<iframe className="absolute w-full h-full" src="https://player.vimeo.com/video/174002812" title="Video" allowFullScreen></iframe>
<video ref={video} className="absolute w-full h-full" width="1920" height="1080" loop autoPlay controls>
<source src="../src/videos/video.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
</div>
</Modal>
</div>
Binary file added src/videos/video.mp4
Binary file not shown.

0 comments on commit 5cc848c

Please sign in to comment.