@@ -177,9 +177,9 @@ export function Editor() {
177177 } , [ ] ) ;
178178
179179 return (
180- < section id = "editor" className = "mx-auto max-w-[1600px] px-4 py-16 2xl:px-6" >
181- < div className = "mb-8 text-center" >
182- < h2 className = "mb-3 text-3xl font-bold tracking-tight md:text-4xl" >
180+ < section id = "editor" className = "mx-auto max-w-[1600px] px-3 py-8 sm:px-4 lg: py-16 2xl:px-6" >
181+ < div className = "mb-6 text-center lg:mb-8 " >
182+ < h2 className = "mb-2 text-2xl font-bold tracking-tight sm:text-3xl md:text-4xl lg:mb-3 " >
183183 < span className = "gradient-text" > Live Editor</ span >
184184 </ h2 >
185185 < p className = "text-sc-fg-muted" >
@@ -191,12 +191,12 @@ export function Editor() {
191191 < ThemeSelector activeTheme = { activeTheme } onSelect = { setActiveTheme } />
192192
193193 { /* Editor / Preview split */ }
194- < div className = "glow-border grid grid-cols-1 overflow-hidden rounded-2xl bg-sc-bg-dark lg:grid-cols-2" >
194+ < div className = "glow-border grid grid-cols-1 overflow-hidden rounded-xl bg-sc-bg-dark sm:rounded-2xl lg:grid-cols-2" >
195195 { /* Markdown input */ }
196196 < div className = "flex flex-col border-b border-sc-cyan/10 lg:border-b-0 lg:border-r" >
197- < div className = "flex items-center justify-between border-b border-sc-cyan/10 px-4 py-2.5" >
197+ < div className = "flex items-center justify-between border-b border-sc-cyan/10 px-3 py-2 sm:px-4 sm: py-2.5" >
198198 < div className = "flex items-center gap-2" >
199- < div className = "flex gap-1.5" >
199+ < div className = "hidden gap-1.5 sm:flex " >
200200 < span className = "h-3 w-3 rounded-full bg-sc-error/60" />
201201 < span className = "h-3 w-3 rounded-full bg-sc-warning/60" />
202202 < span className = "h-3 w-3 rounded-full bg-sc-success/60" />
@@ -232,28 +232,28 @@ export function Editor() {
232232 onChange = { handleFileUpload }
233233 className = "hidden"
234234 />
235- < span className = "font-mono text-xs text-sc-fg-dim" > Markdown</ span >
235+ < span className = "hidden font-mono text-xs text-sc-fg-dim sm:inline " > Markdown</ span >
236236 </ div >
237237 </ div >
238238 < textarea
239239 value = { markdown }
240240 onChange = { e => setMarkdown ( e . target . value ) }
241- className = "editor-scrollbar h-[700px ] w-full resize-none bg-transparent p-4 font-mono text-sm leading-relaxed text-sc-fg placeholder:text-sc-fg-dim focus:outline-none"
241+ className = "editor-scrollbar h-[40vh ] w-full resize-none bg-transparent p-3 font-mono text-sm leading-relaxed text-sc-fg placeholder:text-sc-fg-dim focus:outline-none sm:p-4 md:h-[50vh] lg:h-[70vh] "
242242 placeholder = "Paste your Markdown here..."
243243 spellCheck = { false }
244244 />
245245 </ div >
246246
247247 { /* Preview panel */ }
248248 < div className = "flex flex-col" >
249- < div className = "flex items-center justify-between border-b border-sc-cyan/10 px-4 py-2.5" >
250- < div className = "flex items-center gap-2" >
251- < span className = "text-xs font-medium text-sc-fg-dim" > Preview</ span >
252- < span className = "rounded bg-sc-purple/15 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-sc-purple" >
249+ < div className = "flex items-center justify-between border-b border-sc-cyan/10 px-3 py-2 sm:px-4 sm: py-2.5" >
250+ < div className = "flex min-w-0 items-center gap-1.5 sm: gap-2" >
251+ < span className = "shrink-0 text-xs font-medium text-sc-fg-dim" > Preview</ span >
252+ < span className = "truncate rounded bg-sc-purple/15 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-sc-purple sm:px-2 " >
253253 { activeTheme }
254254 </ span >
255255 { engineState . status === 'rendering' && (
256- < span className = "animate-pulse rounded bg-sc-cyan/15 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-sc-cyan" >
256+ < span className = "hidden animate-pulse rounded bg-sc-cyan/15 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-sc-cyan sm:inline " >
257257 Rendering...
258258 </ span >
259259 ) }
@@ -262,7 +262,7 @@ export function Editor() {
262262 type = "button"
263263 onClick = { handleDownload }
264264 disabled = { ! pdfBytes || pdfBytes . length === 0 }
265- className = "group flex items-center gap-1.5 rounded-lg bg-gradient-to-r from-sc-purple to-sc-coral px-3 py-1.5 text-xs font-semibold text-white transition-all hover:-translate-y-0.5 hover:shadow-[0_4px_15px_rgba(225,53,255,0.3)] disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:translate-y-0 disabled:hover:shadow-none"
265+ className = "group flex shrink-0 items-center gap-1 rounded-lg bg-gradient-to-r from-sc-purple to-sc-coral px-2.5 py-1.5 text-xs font-semibold text-white transition-all hover:-translate-y-0.5 hover:shadow-[0_4px_15px_rgba(225,53,255,0.3)] disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:translate-y-0 disabled:hover:shadow-none sm:gap-1.5 sm:px-3 "
266266 >
267267 < svg
268268 aria-hidden = "true"
@@ -283,7 +283,7 @@ export function Editor() {
283283 </ div >
284284
285285 { /* Preview content */ }
286- < div className = "editor-scrollbar h-[700px ] overflow-y-auto" >
286+ < div className = "editor-scrollbar h-[40vh ] overflow-y-auto md:h-[50vh] lg:h-[70vh] " >
287287 { engineState . status === 'loading' && (
288288 < div className = "flex h-full flex-col items-center justify-center gap-4 p-8" >
289289 < LoadingSpinner />
@@ -313,7 +313,7 @@ export function Editor() {
313313 </ div >
314314 ) }
315315 { pdfBytes && pdfBytes . length > 0 ? (
316- < PdfPreview pdfBytes = { pdfBytes } className = "p-4" />
316+ < PdfPreview pdfBytes = { pdfBytes } className = "p-2 sm:p- 4" />
317317 ) : (
318318 < div className = "flex h-full items-center justify-center p-8" >
319319 < LoadingSpinner />
0 commit comments