@@ -10,9 +10,7 @@ import {
1010 links as youTubeEmbedLinks ,
1111} from '#app/components/fullscreen-yt-embed.tsx'
1212import { Grid } from '#app/components/grid.tsx'
13- import { HeroSection } from '#app/components/sections/hero-section.tsx'
1413import { Paragraph } from '#app/components/typography.tsx'
15- import { images } from '#app/images.tsx'
1614
1715const DEFAULT_PLAYLIST_ID = 'PLV5CVI1eNcJgNqzNwcs4UKrlJdhfDjshf'
1816
@@ -72,57 +70,50 @@ export default function YouTubePage() {
7270 ) } `
7371
7472 return (
75- < >
76- < HeroSection
77- title = "Watch YouTube videos here."
78- subtitle = "Use semantic search to jump straight to a specific video."
79- imageBuilder = { images . microphoneWithHands }
80- />
73+ < Grid as = "main" className = "mb-24 lg:mb-48" >
74+ < div className = "col-span-full space-y-4" >
75+ { selectedVideoId ? (
76+ < div className = "overflow-hidden rounded-lg bg-black" >
77+ < LiteYouTubeEmbed
78+ id = { selectedVideoId }
79+ title = { `YouTube video ${ selectedVideoId } ` }
80+ announce = "Play video"
81+ params = { new URLSearchParams ( {
82+ rel : '0' ,
83+ modestbranding : '1' ,
84+ list : playlistId ,
85+ } ) . toString ( ) }
86+ />
87+ </ div >
88+ ) : (
89+ < div className = "aspect-video overflow-hidden rounded-lg bg-black" >
90+ < iframe
91+ title = "YouTube playlist"
92+ src = { playlistEmbedUrl }
93+ className = "h-full w-full"
94+ allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
95+ referrerPolicy = "strict-origin-when-cross-origin"
96+ allowFullScreen
97+ />
98+ </ div >
99+ ) }
81100
82- < Grid as = "main" className = "mb-24 lg:mb-48" >
83- < div className = "col-span-full space-y-4" >
84- { selectedVideoId ? (
85- < div className = "overflow-hidden rounded-lg bg-black" >
86- < LiteYouTubeEmbed
87- id = { selectedVideoId }
88- title = { `YouTube video ${ selectedVideoId } ` }
89- announce = "Play video"
90- params = { new URLSearchParams ( {
91- rel : '0' ,
92- modestbranding : '1' ,
93- } ) . toString ( ) }
94- />
95- </ div >
96- ) : (
97- < div className = "aspect-video overflow-hidden rounded-lg bg-black" >
98- < iframe
99- title = "YouTube playlist"
100- src = { playlistEmbedUrl }
101- className = "h-full w-full"
102- allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
103- referrerPolicy = "strict-origin-when-cross-origin"
104- allowFullScreen
105- />
106- </ div >
107- ) }
108-
109- < Paragraph >
110- { selectedVideoId
111- ? 'Showing the selected video from semantic search results.'
112- : 'Showing the configured playlist.' }
113- </ Paragraph >
114- < Paragraph >
115- < a
116- href = { playlistUrl }
117- className = "underlined"
118- target = "_blank"
119- rel = "noreferrer noopener"
120- >
121- Open this playlist on YouTube
122- </ a >
123- </ Paragraph >
124- </ div >
125- </ Grid >
126- </ >
101+ < Paragraph >
102+ { selectedVideoId
103+ ? 'Showing the selected video from semantic search results.'
104+ : 'Showing the configured playlist.' }
105+ </ Paragraph >
106+ < Paragraph >
107+ < a
108+ href = { playlistUrl }
109+ className = "underlined"
110+ target = "_blank"
111+ rel = "noreferrer noopener"
112+ >
113+ Open this playlist on YouTube
114+ </ a >
115+ </ Paragraph >
116+ </ div >
117+ </ Grid >
127118 )
128119}
0 commit comments