@@ -7,7 +7,6 @@ import Constants from "./transcriber/Constants";
77import { Spinner } from "./ui/Spinner" ;
88import { LandingDropzone } from "./screens/LandingDropzone" ;
99import { Progress } from "./ui/Progress" ;
10- import { Editor } from "./screens/editor/Editor.gen" ;
1110import { makeEditorContextComponent } from "./screens/editor/EditorContext.gen" ;
1211import { Transition } from "@headlessui/react" ;
1312import type {
@@ -24,6 +23,7 @@ import { ShowErrorContext, UserFacingError } from "./ErrorBoundary";
2423import { log } from "./hooks/useAnalytics" ;
2524import HeartIcon from "@heroicons/react/20/solid/HeartIcon" ;
2625import { ProductHuntIcon } from "./ui/Icons.res.mjs" ;
26+ import { Editor } from "./screens/editor/Editor.gen" ;
2727
2828type VideoFile = {
2929 name : string ;
@@ -339,12 +339,14 @@ export default function LolApp() {
339339 videoCodec : validVideoCodec ,
340340 audioCodec : validAudioCodec ,
341341 // Pass word animation data if word animation is enabled
342- wordAnimationData : style . showWordAnimation && subtitlesManager . transcriptionState !== "TranscriptionInProgress"
343- ? {
344- wordChunks : subtitlesManager . transcriptionState . wordChunks ,
345- cueRanges : subtitlesManager . transcriptionState . cueRanges ,
346- }
347- : undefined ,
342+ wordAnimationData :
343+ style . showWordAnimation &&
344+ subtitlesManager . transcriptionState !== "TranscriptionInProgress"
345+ ? {
346+ wordChunks : subtitlesManager . transcriptionState . wordChunks ,
347+ cueRanges : subtitlesManager . transcriptionState . cueRanges ,
348+ }
349+ : undefined ,
348350 } ,
349351 } as RenderWorkerMessage ,
350352 [ offscreenCanvas ] ,
@@ -502,7 +504,7 @@ export default function LolApp() {
502504
503505 if ( file && ! transcriber . output ) {
504506 return (
505- < div className = "container mx-auto flex items-center justify-center pt-[25%] flex-col" >
507+ < div className = "container mx-auto flex items-center justify-center px-4 flex-col h-dvh md:h-screen " >
506508 < svg
507509 className = "absolute inset-0 -z-10 h-full w-full stroke-white/10 [mask-image:radial-gradient(100%_100%_at_top_right,white,transparent)]"
508510 aria-hidden = "true"
@@ -533,14 +535,19 @@ export default function LolApp() {
533535 />
534536 </ svg >
535537
536- < div className = "flex items-center justify-center gap-4" >
537- < Spinner sizeRem = { 3 } />
538- < h1 className = "text-5xl" > { status } </ h1 >
538+ < div className = "flex flex-col md:flex-row items-center justify-center gap-3 md:gap-4" >
539+ < div className = "md:hidden" >
540+ < Spinner sizeRem = { 2 } />
541+ </ div >
542+ < div className = "hidden md:block" >
543+ < Spinner sizeRem = { 3 } />
544+ </ div >
545+ < h1 className = "text-2xl md:text-5xl text-center" > { status } </ h1 >
539546 </ div >
540- < p className = "text-center text-balance text-gray-400 mt-4" >
547+ < p className = "text-center text-balance text-gray-400 text-sm md:text-base mt-4 px-2 " >
541548 { description }
542549 </ p >
543- < div className = "w-full flex flex-col gap-y-2 mt-12 max-w-[34rem]" >
550+ < div className = "w-full flex flex-col gap-y-2 mt-8 md:mt- 12 max-w-[34rem] px-4 " >
544551 { progressItems
545552 ? progressItems . map ( ( item ) => (
546553 < Progress
@@ -592,23 +599,23 @@ export default function LolApp() {
592599 < Transition show = { renderState !== "idle" } >
593600 < div
594601 className = { clsx (
595- "transition flex-col absolute z-[60] w-screen h-screen bg-white/10 backdrop-blur-xl inset-0 duration-300 ease-in data-[closed]:opacity-0 flex items-center justify-center" ,
602+ "transition flex-col absolute z-[60] w-screen h-dvh md:h- screen bg-white/10 backdrop-blur-xl inset-0 duration-300 ease-in data-[closed]:opacity-0 flex items-center justify-center px-4 " ,
596603 renderState === "done" && "!bg-green-600/10 !backdrop-blur-2xl" ,
597604 renderState === "error" && "!bg-red-600/10 !backdrop-blur-2xl" ,
598605 ) }
599606 >
600607 { renderState === "rendering" && (
601608 < >
602- < h2 className = "text-5xl tracking-wide font-bold" >
609+ < h2 className = "text-2xl md:text- 5xl text-center tracking-wide font-bold" >
603610 Rendering your video
604611 </ h2 >
605- < p className = "text-gray-300 text-balance text-center text-lg max-w-screen-sm mt-4" >
612+ < p className = "text-gray-300 text-balance text-center text-sm md:text- lg max-w-screen-sm mt-4" >
606613 In a moment you'll get your video with subtitles created at the
607614 selected location. Feel free to move to the other tab, the
608615 render will continue in the background.
609616 </ p >
610617
611- < div className = "w-full flex flex-col gap-y-2 mt-8 max-w-[34rem]" >
618+ < div className = "w-full flex flex-col gap-y-2 mt-6 md:mt- 8 max-w-[34rem]" >
612619 { progressItems
613620 ? progressItems . map ( ( item ) => (
614621 < Progress
@@ -624,13 +631,13 @@ export default function LolApp() {
624631
625632 { renderState === "error" && (
626633 < >
627- < h2 className = "text-5xl tracking-wide font-bold text-red-400" >
634+ < h2 className = "text-2xl md:text- 5xl text-center tracking-wide font-bold text-red-400" >
628635 Rendering Failed
629636 </ h2 >
630- < p className = "text-gray-200 text-balance text-center max-w-screen-sm text-lg mt-4" >
637+ < p className = "text-gray-200 text-balance text-center max-w-screen-sm text-sm md:text- lg mt-4" >
631638 { renderError || "An unknown error occurred during rendering." }
632639 </ p >
633- < p className = "text-gray-400 text-balance text-center max-w-screen-md text-sm mt-2" >
640+ < p className = "text-gray-400 text-balance text-center max-w-screen-md text-xs md:text- sm mt-2" >
634641 Try selecting a different video codec or format. Some codec
635642 combinations may not be supported by your browser.
636643 </ p >
@@ -646,10 +653,10 @@ export default function LolApp() {
646653
647654 { renderState === "done" && (
648655 < >
649- < h2 className = "text-5xl tracking-wide font-bold" >
656+ < h2 className = "text-2xl md:text- 5xl text-center tracking-wide font-bold" >
650657 Video Rendered!
651658 </ h2 >
652- < p className = "text-gray-200 text-balance text-center max-w-screen-sm text-lg mt-4" >
659+ < p className = "text-gray-200 text-balance text-center max-w-screen-sm text-sm md:text- lg mt-4" >
653660 You'll find your video in the location you selected a moment
654661 before. Time for publishing but before you do that ... just know
655662 ... your video is amazing!
@@ -659,25 +666,25 @@ export default function LolApp() {
659666 < a
660667 href = "https://www.producthunt.com/products/fframes-subtitles/reviews/new"
661668 rel = "noopener noreferrer"
662- className = "mx-auto outline-none focus-visible:ring ring-orange-500 ring-offset-zinc-900 ring-offset-2 hover:bg-orange-400 transition rounded-lg gap-2 bg-orange-600 inline-flex items-center px-4 py-3 font-medium"
669+ className = "mx-auto outline-none focus-visible:ring ring-orange-500 ring-offset-zinc-900 ring-offset-2 hover:bg-orange-400 transition rounded-lg gap-2 bg-orange-600 inline-flex items-center px-4 py-3 font-medium text-sm md:text-base "
663670 >
664- < ProductHuntIcon . make className = "size-6 text-orange-500" />
671+ < ProductHuntIcon . make className = "size-5 md:size- 6 text-orange-500" />
665672 Leave a Review
666673 </ a >
667674
668675 < a
669676 href = "https://github.com/sponsors/dmtrKovalenko"
670677 rel = "noopener noreferrer"
671- className = "mx-auto outline-none focus-visible:ring ring-rose-500 ring-offset-zinc-900 ring-offset-2 hover:bg-rose-400 transition rounded-lg bg-rose-600 gap-2 inline-flex items-center px-4 py-3 font-medium"
678+ className = "mx-auto outline-none focus-visible:ring ring-rose-500 ring-offset-zinc-900 ring-offset-2 hover:bg-rose-400 transition rounded-lg bg-rose-600 gap-2 inline-flex items-center px-4 py-3 font-medium text-sm md:text-base "
672679 >
673- < HeartIcon className = "size-6" />
680+ < HeartIcon className = "size-5 md:size- 6" />
674681 Support Author
675682 </ a >
676683 </ div >
677684
678685 < button
679686 onClick = { handleBackToEditor }
680- className = "mt-6 text-gray-300 hover:text-white underline underline-offset-4 transition"
687+ className = "mt-6 text-gray-300 hover:text-white underline underline-offset-4 transition text-sm md:text-base "
681688 >
682689 ← Back to editor
683690 </ button >
0 commit comments