mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-17 15:15:17 +00:00
vst cta panel hover click
This commit is contained in:
1 parent
5b7f67b04c
commit
46989e7b10
1 file changed
+77
-55
+77
-55
@@ -1,70 +1,92 @@
|
||||
import { Button, Panel } from "components/common";
|
||||
import React from "react";
|
||||
import React, { useState } from "react";
|
||||
import "./VstSectionV3.scss";
|
||||
import "swiper/css";
|
||||
import "swiper/css/free-mode";
|
||||
import "swiper/css/navigation";
|
||||
import "swiper/css/thumbs";
|
||||
import { faArrowRight } from "@fortawesome/pro-solid-svg-icons";
|
||||
import { useHistory } from "react-router-dom";
|
||||
|
||||
interface VstSectionV3Props {}
|
||||
|
||||
export default function VstSectionV3(props: VstSectionV3Props) {
|
||||
return (
|
||||
<Panel className="mt-5">
|
||||
<div
|
||||
className="d-flex gap-0"
|
||||
style={{
|
||||
marginTop: "22px",
|
||||
marginLeft: "22px",
|
||||
marginRight: "22px",
|
||||
marginBottom: "16px",
|
||||
}}
|
||||
>
|
||||
<div className="flex-grow-1 text-nowrap">
|
||||
<h5 className="mb-0 fw-bold d-block d-md-none">
|
||||
Video Style Transfer
|
||||
</h5>
|
||||
<h2 className="mb-0 fw-bold d-none d-md-block">
|
||||
Video Style Transfer
|
||||
</h2>
|
||||
<p className="opacity-75">Turn your video into any style</p>
|
||||
</div>
|
||||
<div className="ms-3" style={{ width: "126px" }}>
|
||||
<Button
|
||||
icon={faArrowRight}
|
||||
iconFlip={true}
|
||||
label="Style Video"
|
||||
to="/style-video"
|
||||
className="text-nowrap"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
const history = useHistory();
|
||||
const [isHovered, setIsHovered] = useState(false);
|
||||
|
||||
<div>
|
||||
<video
|
||||
preload="metadata"
|
||||
autoPlay={true}
|
||||
controls={false}
|
||||
muted={true}
|
||||
loop={true}
|
||||
playsInline={true}
|
||||
className="w-100 d-none d-md-block"
|
||||
const handleLink = () => {
|
||||
history.push("/style-video");
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
onClick={handleLink}
|
||||
onPointerEnter={() => setIsHovered(true)}
|
||||
onPointerLeave={() => setIsHovered(false)}
|
||||
style={{
|
||||
cursor: "pointer",
|
||||
border: isHovered
|
||||
? "2px solid #E66462"
|
||||
: "2px solid rgba(255, 255, 255, 0.04)",
|
||||
transition: "border 0.2s",
|
||||
}}
|
||||
className="mt-5 rounded"
|
||||
>
|
||||
<Panel>
|
||||
<div
|
||||
className="d-flex gap-0"
|
||||
style={{
|
||||
marginTop: "22px",
|
||||
marginLeft: "22px",
|
||||
marginRight: "22px",
|
||||
marginBottom: "16px",
|
||||
}}
|
||||
>
|
||||
<source src="/videos/vst_banner_desktop.mp4" type="video/mp4" />
|
||||
</video>
|
||||
<video
|
||||
preload="metadata"
|
||||
autoPlay={true}
|
||||
controls={false}
|
||||
muted={true}
|
||||
loop={true}
|
||||
playsInline={true}
|
||||
className="w-100 d-block d-md-none px-3 pb-2"
|
||||
>
|
||||
<source src="/videos/vst_banner_mobile.mp4" type="video/mp4" />
|
||||
</video>
|
||||
</div>
|
||||
</Panel>
|
||||
<div className="flex-grow-1 text-nowrap user-select-none">
|
||||
<h5 className="mb-0 fw-bold d-block d-md-none">
|
||||
Video Style Transfer
|
||||
</h5>
|
||||
<h2 className="mb-0 fw-bold d-none d-md-block">
|
||||
Video Style Transfer
|
||||
</h2>
|
||||
<p className="opacity-75">Turn your video into any style</p>
|
||||
</div>
|
||||
<div className="ms-3" style={{ width: "126px" }}>
|
||||
<Button
|
||||
icon={faArrowRight}
|
||||
iconFlip={true}
|
||||
label="Style Video"
|
||||
to="/style-video"
|
||||
className="text-nowrap"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<video
|
||||
preload="metadata"
|
||||
autoPlay={true}
|
||||
controls={false}
|
||||
muted={true}
|
||||
loop={true}
|
||||
playsInline={true}
|
||||
className="w-100 d-none d-md-block"
|
||||
>
|
||||
<source src="/videos/vst_banner_desktop.mp4" type="video/mp4" />
|
||||
</video>
|
||||
<video
|
||||
preload="metadata"
|
||||
autoPlay={true}
|
||||
controls={false}
|
||||
muted={true}
|
||||
loop={true}
|
||||
playsInline={true}
|
||||
className="w-100 d-block d-md-none px-3 pb-2"
|
||||
>
|
||||
<source src="/videos/vst_banner_mobile.mp4" type="video/mp4" />
|
||||
</video>
|
||||
</div>
|
||||
</Panel>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user