-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from MikeCheek/dev
Performance improvements
- Loading branch information
Showing
46 changed files
with
584 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,7 @@ | |
width: 100vw; | ||
height: 100vh; | ||
overflow: hidden; | ||
|
||
span { | ||
position: absolute; | ||
top: 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.wrap { | ||
ul { | ||
z-index: 2; | ||
bottom: 20px; | ||
li { | ||
button { | ||
&::before { | ||
color: var(--nt-orange) !important; | ||
background-color: var(--nt-orange) !important; | ||
border-radius: 50%; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from 'react'; | ||
import CarouselProps from './index.types'; | ||
import * as styles from './index.module.scss'; | ||
import Slider from 'react-slick'; | ||
|
||
const Carousel = ({ | ||
children, | ||
className, | ||
dots = true, | ||
infinite = true, | ||
touchMove = true, | ||
autoplay = true, | ||
arrows = true, | ||
...settings | ||
}: CarouselProps) => { | ||
return ( | ||
<Slider | ||
dots={dots} | ||
infinite={infinite} | ||
slidesToShow={1} | ||
slidesToScroll={1} | ||
touchMove={touchMove} | ||
autoplay={autoplay} | ||
autoplaySpeed={5000} | ||
className={className ? [className, styles.wrap] : styles.wrap} | ||
arrows={arrows} | ||
responsive={[ | ||
{ | ||
breakpoint: 850, | ||
settings: { | ||
dots: false, | ||
}, | ||
}, | ||
{ | ||
breakpoint: 300, | ||
settings: 'unslick', // destroys slick | ||
}, | ||
]} | ||
{...settings} | ||
> | ||
{children} | ||
</Slider> | ||
); | ||
}; | ||
|
||
export default Carousel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { Settings } from 'react-slick'; | ||
|
||
export default interface CarouselProps extends Settings {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.videoWrap { | ||
position: relative; | ||
width: 80vw; | ||
height: auto; | ||
margin: 0; | ||
mask-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0i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uNiAyMy42MDEgQSA4LjgwNiA4LjgwNiAwIDAgMCAyNjMuNDkyIDIyLjE3NiBRIDI2My4yNjQgMjAuNzg0IDI2Mi41NSAxOS45MDEgUSAyNjEuNSAxOC42MDEgMjU5LjggMTguNjAxIEEgMy4yNTggMy4yNTggMCAwIDAgMjU3LjE5NCAxOS44NTIgQSA1LjI2MyA1LjI2MyAwIDAgMCAyNTYuNjUgMjAuNjUxIFEgMjU1LjUgMjIuNzAxIDI1NS44IDI2LjkwMSBaIE0gMTcxLjIgMy45MDEgTCAyMzAuOCAzLjkwMSBMIDIzMC44IDIxLjUwMSBMIDIxMiAyMS41MDEgTCAyMTIgNzQuNzAxIEwgMTg5LjggNzQuNzAxIEwgMTg5LjggMjEuNTAxIEwgMTcxLjIgMjEuNTAxIEwgMTcxLjIgMy45MDEgWiBNIDMyNC45IDYzLjcwMSBMIDI5My42IDYzLjcwMSBMIDI5My42IDQ1LjIwMSBMIDMyMy40IDIuNzAxIEwgMzQ3LjMgMi43MDEgTCAzNDcuMyA0NC41MDEgTCAzNTQuNSA0NC41MDEgTCAzNTQuNSA2My43MDEgTCAzNDcuMyA2My43MDEgTCAzNDcuMyA3NC43MDEgTCAzMjQuOSA3NC43MDEgTCAzMjQuOSA2My43MDEgWiBNIDUyLjkgNDIuMTAxIEwgNTQuOSAzMi42MDEgTCA0MSAzMi42MDEgTCAzOSA0Mi4xMDEgTCA1Mi45IDQyLjEwMSBaIE0gMzI2LjcgNDQuNTAxIEwgMzI2LjcgMjguMDAxIEwgMzE1LjkgNDQuNTAxIEwgMzI2LjcgNDQuNTAxIFoiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIvPjwvZz48L3N2Zz4=); | ||
mask-repeat: no-repeat; | ||
mask-size: contain; | ||
mask-position: center; | ||
|
||
animation: morph 10s infinite alternate; | ||
|
||
video { | ||
object-fit: cover; | ||
width: 100%; | ||
height: 100%; | ||
max-height: 45vh; | ||
transition: transform 200ms ease; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React, { useEffect, useRef, useState } from 'react'; | ||
import VideoMaskedProps from './index.types'; | ||
import * as styles from './index.module.scss'; | ||
import BoscoCoste from '../../../assets/video/bosco_coste_forward.mp4'; | ||
import ShowOnView from '../ShowOnView'; | ||
|
||
const VideoMasked = ({}: VideoMaskedProps) => { | ||
const [loadVideo, setLoadVideo] = useState<boolean>(false); | ||
|
||
useEffect(() => { | ||
setLoadVideo(true); | ||
}, []); | ||
|
||
return ( | ||
<ShowOnView className={styles.videoWrap}> | ||
<video height={500} muted autoPlay controls={false} loop playsInline> | ||
{loadVideo ? <source src={BoscoCoste} type="video/mp4" /> : <></>} | ||
Your browser doesn't support video tag | ||
</video> | ||
</ShowOnView> | ||
); | ||
}; | ||
|
||
export default VideoMasked; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default interface VideoMaskedProps { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
overflow-y: hidden; | ||
width: 100vw; | ||
height: 100vh; | ||
z-index: -1; | ||
// z-index: -1; | ||
} | ||
|
||
.zen { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.