|
|
@ -1,6 +1,9 @@ |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import _ from "lodash"; |
|
|
|
|
|
|
|
|
|
|
|
//components
|
|
|
|
import Mobile from "./Mobile"; |
|
|
|
import Mobile from "./Mobile"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//assets
|
|
|
|
import qrImage from "../../../../assets/images/qrImage.png"; |
|
|
|
import qrImage from "../../../../assets/images/qrImage.png"; |
|
|
|
import rightBg from "../../../../assets/images/page-bg.png"; |
|
|
|
import rightBg from "../../../../assets/images/page-bg.png"; |
|
|
|
import leftBg from "../../../../assets/images/page-bg-1.png"; |
|
|
|
import leftBg from "../../../../assets/images/page-bg-1.png"; |
|
|
@ -8,30 +11,22 @@ import leftBg from "../../../../assets/images/page-bg-1.png"; |
|
|
|
function Page2({ top, rotateX, boxPosition }) { |
|
|
|
function Page2({ top, rotateX, boxPosition }) { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
className={_.join(["h-screen w-full fixed left-0 overflow-hidden"], " ")} |
|
|
|
className="h-screen w-full fixed left-0 overflow-hidden" |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
top: top, |
|
|
|
top, |
|
|
|
perspective: "400px", |
|
|
|
perspective: "400px", |
|
|
|
}} |
|
|
|
}} |
|
|
|
onClick={(e) => e.stopPropagation()} |
|
|
|
onClick={(e) => e.stopPropagation()} |
|
|
|
> |
|
|
|
> |
|
|
|
<div |
|
|
|
<div |
|
|
|
className={_.join( |
|
|
|
className="home-page2 h-full w-full origin-bottom overflow-hidden" |
|
|
|
[" home-page2 h-full w-full origin-bottom overflow-hidden"], |
|
|
|
|
|
|
|
" " |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
transformStyle: "preserve-3d", |
|
|
|
transformStyle: "preserve-3d", |
|
|
|
transform: `rotateX(${rotateX}deg)`, |
|
|
|
transform: `rotateX(${rotateX}deg)`, |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
<div |
|
|
|
<div |
|
|
|
className={_.join( |
|
|
|
className="relative shadow-2xl transform flex bg-white text-center overflow-hidden" |
|
|
|
[ |
|
|
|
|
|
|
|
"relative shadow-2xl transform flex bg-white text-center overflow-hidden", |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
" " |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
transform: `translateX(${boxPosition.translateX}%) rotate(${boxPosition.rotate}deg) translateY(${boxPosition.translateY}%)`, |
|
|
|
transform: `translateX(${boxPosition.translateX}%) rotate(${boxPosition.rotate}deg) translateY(${boxPosition.translateY}%)`, |
|
|
|
width: "140%", |
|
|
|
width: "140%", |
|
|
@ -48,12 +43,7 @@ function Page2({ top, rotateX, boxPosition }) { |
|
|
|
className="w-full" |
|
|
|
className="w-full" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<video |
|
|
|
<video |
|
|
|
className={_.join( |
|
|
|
className="video outline-none w-1/2 absolute left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2 rounded-lg cursor-pointer" |
|
|
|
[ |
|
|
|
|
|
|
|
"video outline-none w-1/2 absolute left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2 rounded-lg cursor-pointer", |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
" " |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
controls |
|
|
|
controls |
|
|
|
> |
|
|
|
> |
|
|
|
<source |
|
|
|
<source |
|
|
@ -82,8 +72,7 @@ function Page2({ top, rotateX, boxPosition }) { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* mobile phone */} |
|
|
|
{/* mobile phone */} |
|
|
|
<Mobile |
|
|
|
<Mobile /> |
|
|
|
/> |
|
|
|
|
|
|
|
{/* video */} |
|
|
|
{/* video */} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -92,10 +81,10 @@ function Page2({ top, rotateX, boxPosition }) { |
|
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => ({ |
|
|
|
const mapStateToProps = (state) => ({ |
|
|
|
top: state.scrollAction.page2TopPosition, |
|
|
|
top: state.scrollAction.page2TopPosition, |
|
|
|
rotateX : state.scrollAction.page2RotateX, |
|
|
|
rotateX: state.scrollAction.page2RotateX, |
|
|
|
boxPosition : state.scrollAction.page2BoxPosition, |
|
|
|
boxPosition: state.scrollAction.page2BoxPosition, |
|
|
|
mobilePosition : state.scrollAction.page2MobilePosition, |
|
|
|
mobilePosition: state.scrollAction.page2MobilePosition, |
|
|
|
videoPosition : state.scrollAction.page2VideoPosition |
|
|
|
videoPosition: state.scrollAction.page2VideoPosition, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, {})(Page2); |
|
|
|
export default connect(mapStateToProps, {})(Page2); |
|
|
|