From 911b67d5695eca8d1d718fec2bb33ed02ea5766e Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Sat, 15 May 2021 17:35:08 -0500 Subject: [PATCH] Add video coverBottomHtml --- components-eleventy/video/player.js | 13 ++++++------- pages-eleventy/tv.11ty.js | 10 +++++++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/components-eleventy/video/player.js b/components-eleventy/video/player.js index 52954be..39658fa 100644 --- a/components-eleventy/video/player.js +++ b/components-eleventy/video/player.js @@ -19,8 +19,8 @@ function renderTimestamps ( video ) { export default async function ( video, options = {} ) { const { - width = '325px', - classes = 'w-full flex-shrink-0 flex-grow-0 border-2 border-transparent rounded-2xl overflow-hidden' + coverBottomHtml = '' + // classes = 'w-full flex-shrink-0 flex-grow-0 border-2 border-transparent rounded-2xl overflow-hidden' } = options // Setup inline player script @@ -43,14 +43,17 @@ export default async function ( video, options = {} ) { +
+ M1 Macs + Windows 10 GAMING and PERFORMANCE Improvements with Parallels 16.5! +
@@ -58,11 +61,7 @@ export default async function ( video, options = {} ) {
-
-
-

M1 Macs + Windows 10 GAMING and PERFORMANCE Improvements with Parallels 16.5!

-
-
+
${ coverBottomHtml }
diff --git a/pages-eleventy/tv.11ty.js b/pages-eleventy/tv.11ty.js index ed71896..0c40a29 100644 --- a/pages-eleventy/tv.11ty.js +++ b/pages-eleventy/tv.11ty.js @@ -92,7 +92,15 @@ class TV { // console.log('video.payload', Object.keys(video.payload)) - const playerHtml = await this.boundComponent(VideoPlayer)( video ) + const coverBottomHtml = /* html */` +
+

${ video.name }

+
+ ` + + const playerHtml = await this.boundComponent(VideoPlayer)( video, { + coverBottomHtml + } ) const rowHtml = await this.boundComponent(VideoRow)( relatedVideos )