Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split HTML to make it easier to edit. #106

Merged
merged 2 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
645 changes: 8 additions & 637 deletions index.html

Large diffs are not rendered by default.

131 changes: 129 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bookbinder",
"version": "1.3.6",
"version": "1.3.7",
"description": "An app to rearrange PDF pages for printing for bookbinding",
"type": "module",
"scripts": {
Expand All @@ -27,6 +27,7 @@
"@cantoo/pdf-lib": "^1.21.0",
"file-saver": "^2.0.5",
"jszip": "^3.7.1",
"vite-plugin-html-inject": "^1.1.2",
"zod": "^3.22.4"
}
}
28 changes: 28 additions & 0 deletions src/html/buttons.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<div class="space_out">
<button
type="button"
class="medium_btn"
name="preview"
id="preview"
disabled
data-balloon-length="medium"
aria-label="Will not show previews if 'Signature Files Only' is selected. Only shows one side for 'Single Sided' printing. Not tested on all browsers (or any browsers other than Chrome really...)"
data-balloon-pos="up"
>
Preview PDF
</button>
<button type="button" class="large_btn" name="generate" id="generate" disabled>
Generate PDF Output
</button>
<button
type="button"
class="medium_btn"
name="reset_settings"
id="reset_settings"
data-balloon-length="medium"
aria-label="The page is able to save and load your current settings via the site URL. Clicking this button will reset those to the default settings"
data-balloon-pos="up"
>
Reset Settings
</button>
</div>
21 changes: 21 additions & 0 deletions src/html/file.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div class="section" id="input">
<h2>File Info</h2>
<span class="row"
><label>Input File: <input type="file" name="input_file" accept=".pdf" id="input_file" /></label
></span>
<!-- <span class="row"><label>Page Size: <span id="page_size"></span></span> -->
<!-- <span class="row">Page Ratio: <span id="input_ratio"></span></span> -->
<span class="row" style="padding: 10px; font-style: italic"
>While some PDF viewers display the first two pages as a spread, be aware the first page, which
is odd, will be on the right when printed. The first printed spread are pages 2 & 3 of your PDF
document. Evens always on the left, odds always on the right.</span
>
<span class="row"
><label for="print_file">Generated Files</label>
<select name="print_file" id="print_file">
<option value="aggregated">Aggregated File Only</option>
<option value="both" selected>Both aggregated & per signature files</option>
<option value="signatures">Signature Files Only</option>
</select>
</span>
</div>
12 changes: 12 additions & 0 deletions src/html/flyleaf.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="section" id="flyleaf_info">
<h2>Flyleafs</h2>
<span class="row">
<label>Add flyleafs <input type="number" name="flyleafs" value="1" /></label>
<span
data-balloon-length="medium"
aria-label="Extra blank pages at the start and end of the book"
data-balloon-pos="up"
>ℹ️</span
>
</span>
</div>
Loading
Loading