File tree Expand file tree Collapse file tree
components/stateless/InteractiveBook Expand file tree Collapse file tree Original file line number Diff line number Diff line change 366366 border-radius : 0 4px 4px 0 ;
367367 box-shadow : 0 10px 30px rgba (0 , 0 , 0 , 0.2 );
368368 border : 1px solid #e5e5e5 ;
369- transform : translateZ (-1px );
370- z-index : -1 ;
371369 display : flex ;
372370 flex-direction : column ;
373371 align-items : center ;
374372 justify-content : center ;
375373 text-align : center ;
376- opacity : 0.4 ;
374+ opacity : 0.6 ;
377375}
378376
379377.endText {
406404 position : absolute ;
407405 bottom : 20px ;
408406 left : 50% ;
409- transform : translateX (-50% );
410407 display : flex ;
411408 align-items : center ;
412409 gap : 24px ;
Original file line number Diff line number Diff line change @@ -229,7 +229,12 @@ export default function InteractiveBook({
229229 } ) }
230230
231231 { /* Back Cover (Static) */ }
232- < div className = { styles . backCover } style = { { transform : 'translateZ(-1px)' , zIndex : - 1 } } >
232+ < div
233+ className = { styles . backCover }
234+ style = { {
235+ zIndex : currentPageIndex === pages . length - 1 ? 50 : - 1 ,
236+ } }
237+ >
233238 < div className = { styles . backCover } >
234239 < p className = { styles . endText } > The End</ p >
235240 < motion . button
@@ -249,9 +254,9 @@ export default function InteractiveBook({
249254 < AnimatePresence >
250255 { isOpen && (
251256 < motion . div
252- initial = { { opacity : 0 , y : 20 , transform : 'translateX( -50%) ' } }
253- animate = { { opacity : 1 , y : 0 , transform : 'translateX( -50%) ' } }
254- exit = { { opacity : 0 , y : 20 , transform : 'translateX( -50%) ' } }
257+ initial = { { opacity : 0 , y : 20 , x : '-50%' } }
258+ animate = { { opacity : 1 , y : 0 , x : '-50%' } }
259+ exit = { { opacity : 0 , y : 20 , x : '-50%' } }
255260 transition = { { duration : 0.4 , ease : 'easeOut' } }
256261 className = { cn ( styles . navigation ) }
257262 >
Original file line number Diff line number Diff line change @@ -564,6 +564,9 @@ const Home = () => {
564564 ]
565565 return (
566566 < FixTabPanel ref = { scrollRef } >
567+ < section className = { styles . avatar } style = { { margin : '10px 0' , fontSize : 24 } } >
568+ < ColorfulText text = { `React version: ${ version } ` } />
569+ </ section >
567570 < InteractiveBook
568571 coverImage = "https://images.unsplash.com/photo-1544947950-fa07a98d237f?auto=format& fit = crop & q = 80 & w = 800 "
569572 bookTitle = "The Design of Everyday Things"
@@ -572,9 +575,6 @@ const Home = () => {
572575 width = { 350 }
573576 height = { 500 }
574577 />
575- < section className = { styles . avatar } style = { { margin : '10px 0' , fontSize : 24 } } >
576- < ColorfulText text = { `React version: ${ version } ` } />
577- </ section >
578578 < section style = { { width : '320px' , margin : '30px 0' } } >
579579 < Input defaultValue = { apiKey } placeholder = "api key" onChange = { changeApiKey } style = { { marginBottom : 20 } } />
580580 < Flex align = "center" >
You can’t perform that action at this time.
0 commit comments