@@ -231,56 +231,66 @@ defineExpose(
231231 </script >
232232
233233<template >
234- <div class =" min-h-dvh bg-slate-50 text-slate-900 " >
234+ <div class =" min-h-dvh bg-[var(--bg)] text-[var(--text)] " >
235235 <header
236- class =" z-10 bg-white /90 backdrop-blur border-b border-slate-200 transition-all lg:sticky lg:top-0"
236+ class =" z-10 bg-[var(--bg)] /90 backdrop-blur border-b border-[var(--border)] transition-all lg:sticky lg:top-0"
237237 :class =" isFocused ? 'hidden lg:block' : 'sticky top-0'"
238238 >
239- <div class =" max-w-6xl mx-auto px-3 py-2 flex flex-wrap gap-2 items-center" >
239+ <div class =" max-w-6xl mx-auto px-3 py-4 flex flex-wrap gap-4 items-center" >
240+ <h1 class =" text-xl font-bold tracking-tight" >md2img</h1 >
241+
240242 <div class =" flex gap-2 flex-wrap" >
241243 <button
242244 v-for =" (preset, key) in imagePresets"
243245 :key =" key"
244- class =" px-3 py-2 rounded-lg text-sm border transition-colors "
245- :class =" presetKey === key ? 'bg-slate-900 text-white border-slate-900 ' : 'bg-white border-slate-200 hover:bg-slate-50 '"
246+ class =" px-3 py-1.5 rounded-lg text-sm font-semibold border transition-all "
247+ :class =" presetKey === key ? 'bg-[var(--primary)] text-white border-[var(--primary)] shadow-sm ' : 'bg-[var(--surface-elevated)] border-[var(--border)] text-[var(--link)] hover:border-[var(--link)] hover:text-[var(--link-active)] '"
246248 @click =" presetKey = key"
247249 >
248250 {{ preset.label }}
249251 </button >
250252 </div >
251253
252- <div class =" flex items-center gap-2 ml-auto flex-wrap" >
253- <label class =" text-xs text-slate-600" >{{ uiText.backgroundLabel }}</label >
254- <input
255- type =" color"
256- v-model =" backgroundColor"
257- class =" h-9 w-10 rounded border border-slate-200 cursor-pointer"
258- />
259-
260- <label class =" text-xs text-slate-600 ml-2" >{{ uiText.textColorLabel }}</label >
261- <div class =" flex gap-1" >
262- <button
263- v-for =" option in textColorPresets"
264- :key =" option.value"
265- class =" h-9 px-2 rounded-lg text-xs border flex items-center gap-2 transition-colors"
266- :class =" textColor === option.value ? 'border-slate-900 bg-slate-50' : 'border-slate-200 bg-white hover:bg-slate-50'"
267- @click =" textColor = option.value"
268- >
269- <span class =" inline-block h-4 w-4 rounded-full border border-slate-200" :style =" { background: option.value }" ></span >
270- {{ option.label }}
271- </button >
254+ <div class =" flex items-center gap-3 ml-auto flex-wrap" >
255+ <div class =" flex items-center gap-2" >
256+ <label class =" text-xs text-[var(--muted)]" >{{ uiText.backgroundLabel }}</label >
257+ <input
258+ type =" color"
259+ v-model =" backgroundColor"
260+ class =" h-8 w-8 rounded border border-[var(--border)] cursor-pointer bg-transparent"
261+ />
272262 </div >
273263
274- <label class =" text-xs text-slate-600 ml-2" >{{ uiText.textSizeLabel }}</label >
275- <input type =" range" min =" 16" max =" 30" step =" 1" v-model.number =" fontSize" class =" cursor-pointer" />
276- <span class =" text-xs w-8 text-right font-mono" >{{ fontSize }}px</span >
264+ <div class =" flex items-center gap-2" >
265+ <label class =" text-xs text-[var(--muted)]" >{{ uiText.textColorLabel }}</label >
266+ <div class =" flex gap-1" >
267+ <button
268+ v-for =" option in textColorPresets"
269+ :key =" option.value"
270+ class =" h-8 px-2 rounded-lg text-xs font-semibold border flex items-center gap-2 transition-all"
271+ :class =" textColor === option.value ? 'bg-[var(--primary)] text-white border-[var(--primary)]' : 'bg-[var(--surface-elevated)] border-[var(--border)] text-[var(--link)] hover:border-[var(--link)] hover:text-[var(--link-active)]'"
272+ @click =" textColor = option.value"
273+ >
274+ <span class =" inline-block h-3 w-3 rounded-full border border-white/20" :style =" { background: option.value }" ></span >
275+ <span class =" hidden sm:inline" >{{ option.label }}</span >
276+ </button >
277+ </div >
278+ </div >
277279
278- <label class =" text-xs text-slate-600 ml-2" >{{ uiText.lineHeightLabel }}</label >
279- <input type =" range" min =" 1.2" max =" 1.9" step =" 0.05" v-model.number =" lineHeight" class =" cursor-pointer" />
280- <span class =" text-xs w-10 text-right font-mono" >{{ lineHeight.toFixed(2) }}</span >
280+ <div class =" flex items-center gap-2" >
281+ <label class =" text-xs text-[var(--muted)]" >{{ uiText.textSizeLabel }}</label >
282+ <input type =" range" min =" 16" max =" 30" step =" 1" v-model.number =" fontSize" class =" cursor-pointer accent-[var(--primary)]" />
283+ <span class =" text-xs w-8 text-right font-mono text-[var(--muted)]" >{{ fontSize }}px</span >
284+ </div >
285+
286+ <div class =" flex items-center gap-2" >
287+ <label class =" text-xs text-[var(--muted)]" >{{ uiText.lineHeightLabel }}</label >
288+ <input type =" range" min =" 1.2" max =" 1.9" step =" 0.05" v-model.number =" lineHeight" class =" cursor-pointer accent-[var(--primary)]" />
289+ <span class =" text-xs w-10 text-right font-mono text-[var(--muted)]" >{{ lineHeight.toFixed(2) }}</span >
290+ </div >
281291
282292 <button
283- class =" ml-2 px-4 py-2 rounded-xl bg-emerald-600 text-white font-semibold shadow-sm hover:bg-emerald-700 disabled:opacity-60 disabled:cursor-not-allowed transition-all"
293+ class =" ml-2 px-4 py-2 rounded-lg bg-[var(--primary)] text-white font-bold shadow-lg hover:brightness-110 active:scale-95 disabled:opacity-50 disabled:scale-100 disabled:cursor-not-allowed transition-all"
284294 :disabled =" exporting"
285295 @click =" exportAllPng"
286296 >
@@ -292,11 +302,11 @@ defineExpose(
292302
293303 <main class =" max-w-6xl mx-auto p-3 grid grid-cols-1 lg:grid-cols-2 gap-4 min-w-0" >
294304 <!-- Editor -->
295- <section class =" bg-white rounded-2xl border border-slate-200 overflow-hidden min-w-0 shadow-sm" >
296- <div class =" px-4 py-2 border-b border-slate-200 bg-slate-50/50 text-sm font-semibold flex items-center justify-between" >
305+ <section class =" bg-[var(--surface)] rounded-xl border border-[var(--border)] overflow-hidden min-w-0 shadow-sm" >
306+ <div class =" px-4 py-2 border-b border-[var(--border)] bg-[var(--surface-elevated)] text-sm font-semibold flex items-center justify-between" >
297307 <span >{{ uiText.markdownLabel }}</span >
298308 <button
299- class =" text-xs px-2 py-1 rounded border border-slate-200 bg-white hover:bg-slate-50 transition-colors"
309+ class =" text-xs px-2 py-1 rounded border border-[var(--border)] bg-[var(--surface)] text-[var(--link)] hover:text-[var(--link-active)] hover:border-[var(--link)] transition-colors"
300310 @click =" markdownInput = ''"
301311 >
302312 {{ uiText.clearMarkdownLabel }}
@@ -307,14 +317,14 @@ defineExpose(
307317 v-model =" markdownInput"
308318 @focus =" isFocused = true"
309319 @blur =" isFocused = false"
310- class =" w-full h-[45dvh] lg:h-[75dvh] p-4 font-mono text-sm outline-none resize-none bg-transparent transition-all"
320+ class =" w-full h-[45dvh] lg:h-[75dvh] p-4 font-mono text-sm outline-none resize-none bg-transparent transition-all caret-[var(--primary)] "
311321 :class =" isFocused ? 'h-[80dvh] lg:h-[75dvh] pb-[40dvh] lg:pb-4' : ''"
312322 />
313323 </section >
314324
315325 <!-- Preview -->
316- <section class =" bg-white rounded-2xl border border-slate-200 overflow-hidden min-w-0 shadow-sm" >
317- <div class =" px-4 py-2 border-b border-slate-200 bg-slate-50/50 text-sm font-semibold" >
326+ <section class =" bg-[var(--surface)] rounded-xl border border-[var(--border)] overflow-hidden min-w-0 shadow-sm" >
327+ <div class =" px-4 py-2 border-b border-[var(--border)] bg-[var(--surface-elevated)] text-sm font-semibold" >
318328 {{ uiText.previewLabel }} / {{ uiText.pageCountLabel(pagesHtml.length) }}
319329 </div >
320330
@@ -329,7 +339,7 @@ defineExpose(
329339 </div >
330340 </div >
331341
332- <p class =" mt-4 text-xs text-slate-500 text-center" >
342+ <p class =" mt-4 text-xs text-[var(--muted)] text-center" >
333343 {{ uiText.splitHint }}
334344 </p >
335345 </div >
@@ -348,7 +358,7 @@ defineExpose(
348358 <!-- Mobile save button at the bottom. -->
349359 <div class =" lg:hidden fixed bottom-24 left-4 right-4 z-20" v-if =" !isFocused" >
350360 <button
351- class =" w-full py-4 rounded-2xl bg-emerald-600 text-white font-bold shadow-xl hover:bg-emerald-700 disabled:opacity-60 transition-all"
361+ class =" w-full py-4 rounded-xl bg-[var(--primary)] text-white font-bold shadow-2xl hover:brightness-110 active:scale-95 disabled:opacity-50 transition-all"
352362 :disabled =" exporting"
353363 @click =" exportAllPng"
354364 >
0 commit comments