@@ -49,9 +49,19 @@ const CoursePageLayout: React.FunctionComponent<CoursePageLayoutProps> = ({
4949 const firstLessonURL = get ( first ( lessons ) , 'path' )
5050 const { name : tagName , image_url : tagImage , slug : tagSlug } = primary_tag
5151
52+ const PlayButton = ( ) => {
53+ return (
54+ < Link href = { firstLessonURL } >
55+ < a className = "inline-flex justify-center items-center px-5 py-3 rounded-md bg-blue-600 text-white transition-all hover:bg-blue-700 ease-in-out duration-200" >
56+ < PlayIcon className = "text-blue-100 mr-2" />
57+ Start Watching
58+ </ a >
59+ </ Link >
60+ )
61+ }
62+
5263 return (
5364 < >
54- { ' ' }
5565 < NextSeo
5666 description = { removeMarkdown ( description ) }
5767 canonical = { http_url }
@@ -74,8 +84,8 @@ const CoursePageLayout: React.FunctionComponent<CoursePageLayoutProps> = ({
7484 ] ,
7585 } }
7686 />
77- < div className = "max-w-screen-lg mx-auto" >
78- < div className = "md:mt-10 mt-5 grid md:grid-cols-5 grid-cols-1 md:gap-16 gap-5 rounded-md w-full left-0 mb-4" >
87+ < div className = "max-w-screen-xl mx-auto sm:pb-16 pb-8 " >
88+ < div className = "mt-5 grid md:grid-cols-5 grid-cols-1 md:gap-16 gap-5 rounded-md w-full left-0 mb-4" >
7989 < div className = "md:col-span-3 md:row-start-auto row-start-2 flex flex-col h-full justify-center max-w-screen-2xl w-full mx-auto" >
8090 < header >
8191 < h1 className = "md:text-3xl text-2xl font-bold leading-tight md:text-left text-center" >
@@ -100,6 +110,9 @@ const CoursePageLayout: React.FunctionComponent<CoursePageLayoutProps> = ({
100110 </ Link >
101111 </ UserRating >
102112 </ div >
113+ < div className = "md:hidden flex items-center justify-center w-full mt-5" >
114+ < PlayButton />
115+ </ div >
103116 < Markdown className = "prose md:prose-lg text-gray-900 mt-6" >
104117 { description }
105118 </ Markdown >
@@ -137,7 +150,6 @@ const CoursePageLayout: React.FunctionComponent<CoursePageLayoutProps> = ({
137150 </ div >
138151 ) }
139152 </ header >
140-
141153 < main >
142154 < section className = "mt-8" >
143155 < div className = "mb-2 flex justify-between items-center" >
@@ -183,16 +195,11 @@ const CoursePageLayout: React.FunctionComponent<CoursePageLayoutProps> = ({
183195 height = { 256 }
184196 width = { 256 }
185197 />
186- < div className = "md:block hidden" >
187- < div className = "py-6 border-b border-gray-200 w-full flex justify-center" >
188- < Link href = { firstLessonURL } >
189- < a className = "inline-flex justify-center items-center px-5 py-3 rounded-md bg-blue-600 text-white transition-all hover:bg-blue-700 ease-in-out duration-200" >
190- < PlayIcon className = "text-blue-100 mr-2" />
191- Start Watching
192- </ a >
193- </ Link >
198+ < div className = "md:block hidden space-y-10" >
199+ < div className = "w-full flex justify-center mt-10" >
200+ < PlayButton />
194201 </ div >
195- < div className = "py-6 border-b border-gray-200 " >
202+ < div className = "" >
196203 < InstructorProfile
197204 name = { full_name }
198205 avatar_url = { avatar_64_url }
@@ -202,7 +209,7 @@ const CoursePageLayout: React.FunctionComponent<CoursePageLayoutProps> = ({
202209 />
203210 </ div >
204211 { illustrator && (
205- < div className = "w-full py-6 border-b border-gray-200 " >
212+ < div className = "w-full" >
206213 < h4 className = "font-semibold" > Credits</ h4 >
207214 < span className = "text-sm" >
208215 { illustrator ?. name } (illustration)
0 commit comments