Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f75178916 | ||
|
|
100c9af72d |
@@ -49,7 +49,7 @@ for _d in (UPLOAD_DIR, OUTPUT_DIR, WORK_DIR):
|
|||||||
MAX_UPLOAD_MB = 400
|
MAX_UPLOAD_MB = 400
|
||||||
|
|
||||||
# Semantic version exposed by /health so the UI can show "vX.Y.Z" in the footer.
|
# Semantic version exposed by /health so the UI can show "vX.Y.Z" in the footer.
|
||||||
APP_VERSION = "2.0.0"
|
APP_VERSION = "2.1.1"
|
||||||
|
|
||||||
# req 3 (health): supported formats advertised to clients. Additive key — the
|
# req 3 (health): supported formats advertised to clients. Additive key — the
|
||||||
# existing /health contract asserts only status + max_upload_mb.
|
# existing /health contract asserts only status + max_upload_mb.
|
||||||
|
|||||||
+18
-9
@@ -177,6 +177,8 @@
|
|||||||
.drop.over { border-color: transparent; transform: translateY(-2px); background: rgba(139, 92, 246, 0.08); }
|
.drop.over { border-color: transparent; transform: translateY(-2px); background: rgba(139, 92, 246, 0.08); }
|
||||||
.drop.over::before { opacity: 1; }
|
.drop.over::before { opacity: 1; }
|
||||||
.drop input { display: none; }
|
.drop input { display: none; }
|
||||||
|
.render-control { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 26px auto 0; }
|
||||||
|
.render-caption { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
|
||||||
|
|
||||||
.drop-visual {
|
.drop-visual {
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -346,13 +348,11 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<section id="drop" class="drop" role="button" tabindex="0" aria-label="Upload a document">
|
<div class="render-control">
|
||||||
<div class="drop-visual" aria-hidden="true">
|
<div class="render-caption">
|
||||||
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v12"/><path d="m7 8 5-5 5 5"/><path d="M5 21h14"/></svg>
|
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
|
||||||
|
<span>Rendering style</span>
|
||||||
</div>
|
</div>
|
||||||
<h1>Drop a file to set it in type</h1>
|
|
||||||
<p class="drop-note">or <span class="browse">browse your files</span> · up to <span id="maxmb">400</span> MB · <code>.epub .docx .odt .md .html .txt .csv .svg .png .pdf</code></p>
|
|
||||||
<p id="droperr" class="drop-err" role="alert"></p>
|
|
||||||
<div class="render-modes" role="radiogroup" aria-label="Rendering mode">
|
<div class="render-modes" role="radiogroup" aria-label="Rendering mode">
|
||||||
<label class="mode-seg">
|
<label class="mode-seg">
|
||||||
<input type="radio" name="render_mode" value="rich" checked>
|
<input type="radio" name="render_mode" value="rich" checked>
|
||||||
@@ -370,6 +370,15 @@
|
|||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section id="drop" class="drop" role="button" tabindex="0" aria-label="Upload a document">
|
||||||
|
<div class="drop-visual" aria-hidden="true">
|
||||||
|
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v12"/><path d="m7 8 5-5 5 5"/><path d="M5 21h14"/></svg>
|
||||||
|
</div>
|
||||||
|
<h1>Drop a file to set it in type</h1>
|
||||||
|
<p class="drop-note">or <span class="browse">browse your files</span> · up to <span id="maxmb">400</span> MB · <code>.epub .docx .odt .md .html .txt .csv .svg .png .pdf</code></p>
|
||||||
|
<p id="droperr" class="drop-err" role="alert"></p>
|
||||||
<input type="file" id="file" accept=".epub,.html,.htm,.txt,.log,.md,.markdown,.csv,.tsv,.json,.xml,.svg,.png,.jpg,.jpeg,.webp,.tiff,.bmp,.pdf,.docx,.odt,.rtf,.tex,.latex,.org,.adoc,.rst">
|
<input type="file" id="file" accept=".epub,.html,.htm,.txt,.log,.md,.markdown,.csv,.tsv,.json,.xml,.svg,.png,.jpg,.jpeg,.webp,.tiff,.bmp,.pdf,.docx,.odt,.rtf,.tex,.latex,.org,.adoc,.rst">
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -397,7 +406,7 @@
|
|||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<span>Bindery · EPUB → PDF · WeasyPress engine</span>
|
<span>Bindery · EPUB → PDF · WeasyPress engine</span>
|
||||||
<span class="version">v<span id="foot">—</span></span>
|
<span class="version"><span id="foot">—</span></span>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -431,7 +440,7 @@
|
|||||||
.catch(function () {
|
.catch(function () {
|
||||||
healthDot.classList.add('offline');
|
healthDot.classList.add('offline');
|
||||||
healthState.textContent = 'Offline';
|
healthState.textContent = 'Offline';
|
||||||
foot.textContent = 'v';
|
foot.textContent = '—';
|
||||||
});
|
});
|
||||||
|
|
||||||
function openPicker() { fileInput.click(); }
|
function openPicker() { fileInput.click(); }
|
||||||
@@ -480,7 +489,7 @@
|
|||||||
if (!OKEXT.test(f.name)) { flashError('Unsupported file type — accepted: .epub .html .htm .txt .log .md .markdown .csv .tsv .json .xml .svg .png .jpg .jpeg .webp .tiff .bmp .pdf .docx .odt .rtf .tex .latex .org .adoc .rst'); return; }
|
if (!OKEXT.test(f.name)) { flashError('Unsupported file type — accepted: .epub .html .htm .txt .log .md .markdown .csv .tsv .json .xml .svg .png .jpg .jpeg .webp .tiff .bmp .pdf .docx .odt .rtf .tex .latex .org .adoc .rst'); return; }
|
||||||
// STEP 3: progressive disclosure — toggle only for the office trio (.docx/.odt/.rtf)
|
// STEP 3: progressive disclosure — toggle only for the office trio (.docx/.odt/.rtf)
|
||||||
const isOffice = /\.(docx|odt|rtf)$/i.test(f.name);
|
const isOffice = /\.(docx|odt|rtf)$/i.test(f.name);
|
||||||
const toggle = document.querySelector('.render-modes');
|
const toggle = document.querySelector('.render-control');
|
||||||
if (toggle) toggle.style.display = isOffice ? '' : 'none';
|
if (toggle) toggle.style.display = isOffice ? '' : 'none';
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
form.append('file', f);
|
form.append('file', f);
|
||||||
|
|||||||
Reference in New Issue
Block a user