Add optional nursery roster composition

This commit is contained in:
Media
2026-08-30 20:04:00 -05:00
parent 3eab672c6c
commit 7651a3ed9d
12 changed files with 1578 additions and 116 deletions
+49 -7
View File
@@ -33,8 +33,8 @@
<p class="eyebrow">Roster formatter</p>
<h1 id="page-title">From current roster to ready-to-share PNG.</h1>
<p class="lede">
Upload the one-page PDF, confirm its month, and download the formatted image.
The current layout is preserved unless you intentionally change an advanced value.
Upload your main roster and, when needed, its nursery-only roster. Confirm the month,
then download one formatted image—the PDFs are identified automatically.
</p>
<div class="format-facts" aria-label="Output details">
<span>PNG</span>
@@ -55,10 +55,12 @@
<form id="roster-form" action="/format" method="post" enctype="multipart/form-data">
<label class="drop-zone" id="drop-zone" for="roster-file">
<input id="roster-file" name="roster" type="file" accept="application/pdf,.pdf">
<input id="roster-file" name="roster" type="file" accept="application/pdf,.pdf" multiple>
<span class="upload-mark" aria-hidden="true">↑</span>
<span class="drop-title" id="drop-title">Choose your roster PDF</span>
<span class="drop-copy" id="drop-copy">or drag it here · one-page landscape Letter · up to __MAX_UPLOAD_MB__ MB</span>
<span class="drop-title" id="drop-title">Choose your roster PDFs</span>
<span class="drop-copy" id="drop-copy">or drag them here · one main roster, optional nursery roster</span>
<span class="drop-requirements">One-page landscape Letter PDFs · up to __MAX_UPLOAD_MB__ MB each</span>
<span class="selected-files" id="selected-files" aria-live="polite" hidden></span>
</label>
<div class="field-block">
@@ -80,7 +82,7 @@
</summary>
<div class="advanced-body">
<div class="advanced-heading">
<p>Values use PDF points. Saved defaults prefill every new roster.</p>
<p>Positions use PDF points; scales are multipliers. Saved defaults prefill every new roster.</p>
<div class="layout-actions">
<button class="text-button" id="reset-layout" type="button">Reset changes</button>
<button class="text-button" id="factory-layout" type="button">Use original values</button>
@@ -88,7 +90,7 @@
</div>
<fieldset>
<legend>Roster content</legend>
<legend>Single-PDF roster</legend>
<div class="setting-grid">
<label>
Vertical shift
@@ -101,6 +103,46 @@
</div>
</fieldset>
<p class="combined-settings-note">
The section controls below apply when two PDFs are combined. Each roster can be moved or scaled independently.
</p>
<fieldset>
<legend>Main roster</legend>
<div class="setting-grid setting-grid--three">
<label>
X position
<input name="main_x" type="number" value="__MAIN_X__" data-default="__MAIN_X__" data-factory="__FACTORY_MAIN_X__" data-layout-input step="1" min="-1000" max="2000" required>
</label>
<label>
Y position
<input name="main_y" type="number" value="__MAIN_Y__" data-default="__MAIN_Y__" data-factory="__FACTORY_MAIN_Y__" data-layout-input step="1" min="-1000" max="2000" required>
</label>
<label>
Scale
<input name="main_scale" type="number" value="__MAIN_SCALE__" data-default="__MAIN_SCALE__" data-factory="__FACTORY_MAIN_SCALE__" data-layout-input step="0.01" min="0.1" max="2" required>
</label>
</div>
</fieldset>
<fieldset>
<legend>Nursery-only roster</legend>
<div class="setting-grid setting-grid--three">
<label>
X position
<input name="nursery_x" type="number" value="__NURSERY_X__" data-default="__NURSERY_X__" data-factory="__FACTORY_NURSERY_X__" data-layout-input step="1" min="-1000" max="2000" required>
</label>
<label>
Y position
<input name="nursery_y" type="number" value="__NURSERY_Y__" data-default="__NURSERY_Y__" data-factory="__FACTORY_NURSERY_Y__" data-layout-input step="1" min="-1000" max="2000" required>
</label>
<label>
Scale
<input name="nursery_scale" type="number" value="__NURSERY_SCALE__" data-default="__NURSERY_SCALE__" data-factory="__FACTORY_NURSERY_SCALE__" data-layout-input step="0.01" min="0.1" max="2" required>
</label>
</div>
</fieldset>
<fieldset>
<legend>Logo</legend>
<div class="setting-grid setting-grid--three">