Compare commits
No commits in common. "main" and "dev" have entirely different histories.
|
@ -1,6 +1,6 @@
|
||||||
# PDF Web Toolkit
|
# PDF Web Toolkit
|
||||||
|
|
||||||
A Web-Application allowing you to split and merge PDF-Files.
|
A Web-Application allowing you to splitt and merge PDF-Files.
|
||||||
|
|
||||||
## Deploy
|
## Deploy
|
||||||
|
|
||||||
|
|
2
app.py
2
app.py
|
@ -37,7 +37,7 @@ def project():
|
||||||
|
|
||||||
|
|
||||||
@app.route('/split')
|
@app.route('/split')
|
||||||
def split():
|
def splitt():
|
||||||
return render_template('base.html', page='split', settings='set', error=False)
|
return render_template('base.html', page='split', settings='set', error=False)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,6 @@
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
.download-button-icons {
|
|
||||||
margin-left: 0.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* The snackbar - position it at the bottom and in the middle of the screen */
|
/* The snackbar - position it at the bottom and in the middle of the screen */
|
||||||
#snackbar {
|
#snackbar {
|
||||||
visibility: hidden; /* Hidden by default. Visible on click */
|
visibility: hidden; /* Hidden by default. Visible on click */
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-square" viewBox="0 0 16 16">
|
|
||||||
<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/>
|
|
||||||
<path d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 433 B |
|
@ -1,4 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-square" viewBox="0 0 16 16">
|
|
||||||
<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/>
|
|
||||||
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 491 B |
|
@ -75,17 +75,9 @@ const vueInstance = new Vue({
|
||||||
});
|
});
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
dropzone.on('success', (file, xhr, formData) => {
|
dropzone.on('complete', (file, xhr, formData) => {
|
||||||
pdf_uploaded = true;
|
pdf_uploaded = true;
|
||||||
document.getElementById('btn-group-download').style.display = 'flex';
|
document.getElementById('btn-group-download').style.display = 'flex';
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('success-upload-toast')).show();
|
|
||||||
});
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
dropzone.on('error', (file, xhr, formData) => {
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('warn-upload-toast')).show();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -56,7 +56,6 @@ const vueInstance = new Vue({
|
||||||
}
|
}
|
||||||
console.debug('page_overview_margin_bottom: ', page_overview_margin_bottom);
|
console.debug('page_overview_margin_bottom: ', page_overview_margin_bottom);
|
||||||
page_overview.style['margin-bottom'] = page_overview_margin_bottom;
|
page_overview.style['margin-bottom'] = page_overview_margin_bottom;
|
||||||
document.getElementById('overview-wrapper').style['border-bottom'] = '1px solid #fff';
|
|
||||||
},
|
},
|
||||||
display_pages() {
|
display_pages() {
|
||||||
const div_overview = document.getElementById('page_overview');
|
const div_overview = document.getElementById('page_overview');
|
||||||
|
@ -151,14 +150,6 @@ const vueInstance = new Vue({
|
||||||
pdf_uploaded = true;
|
pdf_uploaded = true;
|
||||||
document.getElementById('btn-group-download').style.display = 'flex';
|
document.getElementById('btn-group-download').style.display = 'flex';
|
||||||
this.display_pages();
|
this.display_pages();
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('success-upload-toast')).show();
|
|
||||||
});
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
dropzone.on('error', (file, xhr, formData) => {
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('warn-upload-toast')).show();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -75,17 +75,9 @@ const vueInstance = new Vue({
|
||||||
});
|
});
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
dropzone.on('success', (file, xhr, formData) => {
|
dropzone.on('complete', (file, xhr, formData) => {
|
||||||
pdf_uploaded = true;
|
pdf_uploaded = true;
|
||||||
document.getElementById('btn-group-download').style.display = 'flex';
|
document.getElementById('btn-group-download').style.display = 'flex';
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('success-upload-toast')).show();
|
|
||||||
});
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
dropzone.on('error', (file, xhr, formData) => {
|
|
||||||
// eslint-disable-next-line no-undef
|
|
||||||
bootstrap.Toast.getOrCreateInstance(document.getElementById('warn-upload-toast')).show();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -62,40 +62,10 @@
|
||||||
<!-- https://getbootstrap.com/docs/5.3/examples/footers/# -->
|
<!-- https://getbootstrap.com/docs/5.3/examples/footers/# -->
|
||||||
<footer class="py-3 my-4 border-top">
|
<footer class="py-3 my-4 border-top">
|
||||||
<div class="container py-3">
|
<div class="container py-3">
|
||||||
<p class="text-center text-body-secondary fw-light text-muted">Developed with ♥ by <a href="https://github.com/tidoni/pdf-web-toolkit" target="_blank">Tidoni</a></p>
|
<p class="text-center text-body-secondary text-muted">Developed with ♥ by <a href="https://github.com/tidoni/pdf-web-toolkit" target="_blank">Tidoni</a> (Niklas Müller)</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||||
<!-- Toasts -->
|
|
||||||
<div class="toast-container position-fixed top-0 end-0 p-3">
|
|
||||||
<!-- Success uploading PDF -->
|
|
||||||
<div id="success-upload-toast" class="toast text-bg-success" role="alert" aria-live="assertive" aria-atomic="true">
|
|
||||||
<div class="toast-header">
|
|
||||||
<img src="{{ url_for('static', filename='img/check-square.svg') }}" class="rounded me-2" alt="Success">
|
|
||||||
<strong class="me-auto">Upload Success</strong>
|
|
||||||
<small></small>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div class="toast-body">
|
|
||||||
The File was successfully uploaded.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Warning uploading PDF -->
|
|
||||||
<div id="warn-upload-toast" class="toast text-bg-warning" role="alert" aria-live="assertive" aria-atomic="true">
|
|
||||||
<div class="toast-header">
|
|
||||||
<img src="{{ url_for('static', filename='img/x-square.svg') }}" class="rounded me-2" alt="Success">
|
|
||||||
<strong class="me-auto">Upload Failed</strong>
|
|
||||||
<small></small>
|
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
|
||||||
</div>
|
|
||||||
<div class="toast-body">
|
|
||||||
There was a problem uploading the file. Please reload the page and try again.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="toast-container position-fixed top-0 end-0 p-3">
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -12,11 +12,5 @@
|
||||||
<link href="{{ url_for('static', filename='css/merge.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='css/merge.css') }}" rel="stylesheet">
|
||||||
|
|
||||||
<div id="btn-group-download" class="btn-group" role="group" aria-label="Download outlined buttons">
|
<div id="btn-group-download" class="btn-group" role="group" aria-label="Download outlined buttons">
|
||||||
<button type="button" class="btn btn-outline-dark" id="btn_download_complete">
|
<button type="button" class="btn btn-outline-dark" id="btn_download_complete">Download merged PDFs</button>
|
||||||
Download merged PDFs
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-download download-button-icons" viewBox="0 0 16 16">
|
|
||||||
<path d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5"/>
|
|
||||||
<path d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z"/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="page_description_div" id="splitt_description_div">
|
<div class="page_description_div" id="splitt_description_div">
|
||||||
<p class="page_description_p" id="splitt_description_p">
|
<p class="page_description_p" id="splitt_description_p">
|
||||||
Upload a PDF that you want to be split into seperate pages.
|
Upload a PDF that you want to be splitt into seperate pages.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -12,11 +12,5 @@
|
||||||
<link href="{{ url_for('static', filename='css/split.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='css/split.css') }}" rel="stylesheet">
|
||||||
|
|
||||||
<div id="btn-group-download" class="btn-group" role="group" aria-label="Download outlined buttons">
|
<div id="btn-group-download" class="btn-group" role="group" aria-label="Download outlined buttons">
|
||||||
<button type="button" class="btn btn-outline-dark" id="btn_download_singel_pages">
|
<button type="button" class="btn btn-outline-dark" id="btn_download_singel_pages">Download Project as single Pages</button>
|
||||||
Download split PDF
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-download download-button-icons" viewBox="0 0 16 16">
|
|
||||||
<path d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5"/>
|
|
||||||
<path d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z"/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue