From ea05f64b8d0d9a21981c2a642dc0b08d76845305 Mon Sep 17 00:00:00 2001 From: Johnny Richardson Date: Tue, 21 May 2024 16:43:38 -0400 Subject: [PATCH] refactor(apps): elab - WIP changes for trailer/video on projects. --- .../pages/initiatives/[initiative]/index.tsx | 3 +- apps/elab/pages/studios/projects/[key].tsx | 265 ++++++++++-------- 2 files changed, 151 insertions(+), 117 deletions(-) diff --git a/apps/elab/pages/initiatives/[initiative]/index.tsx b/apps/elab/pages/initiatives/[initiative]/index.tsx index 070b9fff..e41965c5 100644 --- a/apps/elab/pages/initiatives/[initiative]/index.tsx +++ b/apps/elab/pages/initiatives/[initiative]/index.tsx @@ -78,7 +78,8 @@ export default function InitIndex({ const subHeadClass = `${Theming[initiative].heading} text-3xl my-7 font-extrabold uppercase`; const videoColor = { stroke: Theming[initiative].arrow, - fill: Theming[initiative].fillRgb, + fill: Theming[initiative].fill, + fillRgb: Theming[initiative].fillRgb, bg: Theming[initiative].videoBg || Theming[initiative].secondaryBg, seekbar: Theming[initiative].fillVideo || Theming[initiative].arrowHex, buttons: '#fff', diff --git a/apps/elab/pages/studios/projects/[key].tsx b/apps/elab/pages/studios/projects/[key].tsx index 672cea2f..b106774f 100644 --- a/apps/elab/pages/studios/projects/[key].tsx +++ b/apps/elab/pages/studios/projects/[key].tsx @@ -91,7 +91,8 @@ export default function Project({ Theming[item.initiative === 'gunviolence' ? 'tngv' : 'tnej']; const videoColor = { stroke: theming.arrow, - fill: theming.fillRgb, + fill: theming.fill, + fillRgb: theming.fillRgb, bg: theming.videoBg || theming.secondaryBg, seekbar: theming.fillVideo || theming.arrowHex, buttons: '#fff', @@ -149,84 +150,34 @@ export default function Project({ }; const Media = () => { - if (item.video) { - let videoFile = item.video.file; - if (item.trailerVideo && !videoOpen) videoFile = item.trailerVideo.file; - console.log('fiLe', videoFile); + if (item.video) return (
-
-
toggleVideo()} + className={`transition-all duration-500 ${CustomEase} absolute right-0 mr-2 mt-2 z-50 inline-block w-12 h-12 hover:scale-125`} + > + - - {!videoOpen && !item.trailerThumbnail && ( - - )} -
- {!videoOpen && - !trailerOpen && - (item.trailerVideo || item.trailerId) && ( - - )} -
-
- ); - } - - if (item.videoId) - return ( -
+ + + + ){/* Close full movie */} + {/* {videoOpen &&}
-
- {!videoOpen && !trailerOpen && item.trailerId && ( - + {item.trailerVideo && ( +
+ + {!trailerOpen && ( + + )} +
)} -
+
*/} ); - return ( -
- {item.thumbAltText} -
- ); + // if (item.videoId) + // return ( + //
+ //
+ //
+ //
+ // {!videoOpen && !trailerOpen && item.trailerId && ( + // + // )} + //
+ //
+ // ); + + // return ( + //
+ // {item.thumbAltText} + //
+ // ); }; + return (