modified: app.py deleted: output/.gitkeep modified: static/css/style.css modified: static/js/pdf-tools.js modified: templates/pdf_tools.html deleted: uploads/.gitkeep
580 lines
11 KiB
CSS
580 lines
11 KiB
CSS
/* PDF Editor Web App - Custom Styles */
|
|
|
|
:root {
|
|
--primary-color: #007bff;
|
|
--secondary-color: #6c757d;
|
|
--success-color: #28a745;
|
|
--warning-color: #ffc107;
|
|
--danger-color: #dc3545;
|
|
--info-color: #17a2b8;
|
|
--light-color: #f8f9fa;
|
|
--dark-color: #343a40;
|
|
--border-radius: 0.5rem;
|
|
--box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
|
--box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
/* General Styles */
|
|
body {
|
|
background-color: #f5f7fa;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
}
|
|
|
|
/* Navigation */
|
|
.navbar-brand {
|
|
font-weight: 600;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.navbar-nav .nav-link {
|
|
font-weight: 500;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.navbar-nav .nav-link:hover {
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* Hero Section */
|
|
.jumbotron {
|
|
background: linear-gradient(135deg, var(--primary-color), #0056b3);
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--box-shadow-lg);
|
|
}
|
|
|
|
/* Cards */
|
|
.card {
|
|
border: none;
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--box-shadow);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--box-shadow-lg);
|
|
}
|
|
|
|
.feature-card {
|
|
height: 100%;
|
|
}
|
|
|
|
.feature-card .card-body {
|
|
padding: 2rem;
|
|
}
|
|
|
|
.feature-card .icon-wrapper {
|
|
display: inline-block;
|
|
padding: 1rem;
|
|
background-color: rgba(0, 123, 255, 0.1);
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.step-icon {
|
|
display: inline-block;
|
|
padding: 1rem;
|
|
background-color: rgba(0, 0, 0, 0.05);
|
|
border-radius: 50%;
|
|
}
|
|
|
|
/* Upload Areas */
|
|
.upload-area {
|
|
border: 2px dashed #dee2e6;
|
|
border-radius: var(--border-radius);
|
|
background-color: #fafbfc;
|
|
transition: all 0.3s ease;
|
|
cursor: pointer;
|
|
min-height: 200px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.upload-area:hover {
|
|
border-color: var(--primary-color);
|
|
background-color: rgba(0, 123, 255, 0.05);
|
|
}
|
|
|
|
.upload-area.dragover {
|
|
border-color: var(--success-color);
|
|
background-color: rgba(40, 167, 69, 0.1);
|
|
transform: scale(1.02);
|
|
}
|
|
|
|
.upload-content {
|
|
text-align: center;
|
|
padding: 1rem;
|
|
}
|
|
|
|
/* File List */
|
|
.list-group-item {
|
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
border-radius: var(--border-radius);
|
|
margin-bottom: 0.5rem;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.list-group-item:hover {
|
|
background-color: #f8f9fa;
|
|
transform: translateX(5px);
|
|
}
|
|
|
|
.sortable-list .list-group-item {
|
|
cursor: move;
|
|
}
|
|
|
|
.sortable-list .list-group-item:hover {
|
|
background-color: rgba(0, 123, 255, 0.05);
|
|
}
|
|
|
|
.file-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0.75rem;
|
|
}
|
|
|
|
.file-icon {
|
|
width: 40px;
|
|
height: 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: rgba(0, 123, 255, 0.1);
|
|
border-radius: var(--border-radius);
|
|
margin-right: 1rem;
|
|
}
|
|
|
|
.file-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.file-name {
|
|
font-weight: 500;
|
|
margin-bottom: 0.25rem;
|
|
}
|
|
|
|
.file-details {
|
|
font-size: 0.875rem;
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
.file-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
/* Progress Bars */
|
|
.progress {
|
|
height: 8px;
|
|
border-radius: 4px;
|
|
background-color: #e9ecef;
|
|
}
|
|
|
|
.progress-bar {
|
|
background: linear-gradient(90deg, var(--primary-color), #0056b3);
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
border-radius: var(--border-radius);
|
|
font-weight: 500;
|
|
transition: all 0.3s ease;
|
|
border: none;
|
|
}
|
|
|
|
.btn:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, var(--primary-color), #0056b3);
|
|
}
|
|
|
|
.btn-success {
|
|
background: linear-gradient(135deg, var(--success-color), #1e7e34);
|
|
}
|
|
|
|
.btn-warning {
|
|
background: linear-gradient(135deg, var(--warning-color), #e0a800);
|
|
color: #212529;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: linear-gradient(135deg, var(--danger-color), #bd2130);
|
|
}
|
|
|
|
.btn-outline-secondary {
|
|
border: 2px solid var(--secondary-color);
|
|
color: var(--secondary-color);
|
|
}
|
|
|
|
.btn-outline-secondary:hover {
|
|
background-color: var(--secondary-color);
|
|
color: white;
|
|
}
|
|
|
|
/* Alerts */
|
|
.alert {
|
|
border: none;
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--box-shadow);
|
|
}
|
|
|
|
.alert-success {
|
|
background-color: rgba(40, 167, 69, 0.1);
|
|
color: #155724;
|
|
border-left: 4px solid var(--success-color);
|
|
}
|
|
|
|
.alert-danger {
|
|
background-color: rgba(220, 53, 69, 0.1);
|
|
color: #721c24;
|
|
border-left: 4px solid var(--danger-color);
|
|
}
|
|
|
|
.alert-info {
|
|
background-color: rgba(23, 162, 184, 0.1);
|
|
color: #0c5460;
|
|
border-left: 4px solid var(--info-color);
|
|
}
|
|
|
|
/* Tabs */
|
|
.nav-pills .nav-link {
|
|
border-radius: var(--border-radius);
|
|
margin: 0 0.25rem;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.nav-pills .nav-link.active {
|
|
background: linear-gradient(135deg, var(--primary-color), #0056b3);
|
|
}
|
|
|
|
/* Page Headers */
|
|
.page-header {
|
|
border-bottom: 2px solid #e9ecef;
|
|
padding-bottom: 1rem;
|
|
}
|
|
|
|
.page-header h2 {
|
|
color: var(--dark-color);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Forms */
|
|
.form-control, .form-select {
|
|
border-radius: var(--border-radius);
|
|
border: 2px solid #e9ecef;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.form-control:focus, .form-select:focus {
|
|
border-color: var(--primary-color);
|
|
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
|
|
}
|
|
|
|
.form-check-input:checked {
|
|
background-color: var(--primary-color);
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
/* Loading Spinner */
|
|
.spinner-border {
|
|
width: 3rem;
|
|
height: 3rem;
|
|
}
|
|
|
|
/* Modal */
|
|
.modal-content {
|
|
border: none;
|
|
border-radius: var(--border-radius);
|
|
box-shadow: var(--box-shadow-lg);
|
|
}
|
|
|
|
/* Footer */
|
|
footer {
|
|
background-color: white !important;
|
|
border-top: 1px solid #e9ecef;
|
|
}
|
|
|
|
/* Responsive Adjustments */
|
|
@media (max-width: 768px) {
|
|
.jumbotron {
|
|
padding: 2rem 1rem !important;
|
|
}
|
|
|
|
.jumbotron .display-4 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.feature-card .card-body {
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
.upload-area {
|
|
min-height: 150px;
|
|
}
|
|
|
|
.file-item {
|
|
flex-direction: column;
|
|
text-align: center;
|
|
}
|
|
|
|
.file-icon {
|
|
margin-right: 0;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.file-actions {
|
|
margin-top: 0.5rem;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
|
|
/* Dark mode support */
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--light-color: #343a40;
|
|
--dark-color: #f8f9fa;
|
|
}
|
|
|
|
body {
|
|
background-color: #1a1d20;
|
|
color: #f8f9fa;
|
|
}
|
|
|
|
.card {
|
|
background-color: #2d3338;
|
|
color: #f8f9fa;
|
|
}
|
|
|
|
.upload-area {
|
|
background-color: #343a40;
|
|
border-color: #495057;
|
|
}
|
|
|
|
.list-group-item {
|
|
background-color: #2d3338;
|
|
border-color: #495057;
|
|
color: #f8f9fa;
|
|
}
|
|
}
|
|
|
|
/* Animation Classes */
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(20px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
@keyframes slideIn {
|
|
from { opacity: 0; transform: translateX(-20px); }
|
|
to { opacity: 1; transform: translateX(0); }
|
|
}
|
|
|
|
.fade-in {
|
|
animation: fadeIn 0.5s ease-out;
|
|
}
|
|
|
|
.slide-in {
|
|
animation: slideIn 0.5s ease-out;
|
|
}
|
|
|
|
/* Utility Classes */
|
|
.border-dashed {
|
|
border-style: dashed !important;
|
|
}
|
|
|
|
.bg-gradient {
|
|
background: linear-gradient(135deg, var(--primary-color), #0056b3);
|
|
}
|
|
|
|
.text-gradient {
|
|
background: linear-gradient(135deg, var(--primary-color), #0056b3);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
}
|
|
|
|
.shadow-hover {
|
|
transition: box-shadow 0.3s ease;
|
|
}
|
|
|
|
.shadow-hover:hover {
|
|
box-shadow: var(--box-shadow-lg);
|
|
}
|
|
|
|
/* File Type Icons */
|
|
.file-type-pdf { color: #dc3545; }
|
|
.file-type-image { color: #28a745; }
|
|
.file-type-zip { color: #ffc107; }
|
|
|
|
/* Image Preview */
|
|
.image-preview {
|
|
max-width: 120px;
|
|
max-height: 120px;
|
|
object-fit: cover;
|
|
border-radius: var(--border-radius);
|
|
border: 2px solid #e9ecef;
|
|
transition: all 0.3s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.image-preview:hover {
|
|
border-color: var(--primary-color);
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.image-preview.size-small {
|
|
max-width: 80px;
|
|
max-height: 80px;
|
|
}
|
|
|
|
.image-preview.size-medium {
|
|
max-width: 120px;
|
|
max-height: 120px;
|
|
}
|
|
|
|
.image-preview.size-large {
|
|
max-width: 160px;
|
|
max-height: 160px;
|
|
}
|
|
|
|
.image-preview-large {
|
|
max-width: 200px;
|
|
max-height: 200px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Rotation controls */
|
|
.rotation-controls {
|
|
display: flex;
|
|
gap: 0.25rem;
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.rotation-btn {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
/* Image rotation classes */
|
|
.rotate-0 { transform: rotate(0deg); }
|
|
.rotate-90 { transform: rotate(90deg); }
|
|
.rotate-180 { transform: rotate(180deg); }
|
|
.rotate-270 { transform: rotate(270deg); }
|
|
|
|
/* Image modal */
|
|
.image-modal .modal-body {
|
|
padding: 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.image-modal .modal-body img {
|
|
max-width: 100%;
|
|
max-height: 80vh;
|
|
object-fit: contain;
|
|
}
|
|
|
|
/* PDF Preview */
|
|
.pdf-preview {
|
|
max-width: 120px;
|
|
max-height: 120px;
|
|
object-fit: cover;
|
|
border-radius: var(--border-radius);
|
|
border: 2px solid #e9ecef;
|
|
transition: all 0.3s ease;
|
|
cursor: pointer;
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
.pdf-preview:hover {
|
|
border-color: var(--danger-color);
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.pdf-preview.size-small {
|
|
max-width: 80px;
|
|
max-height: 80px;
|
|
}
|
|
|
|
.pdf-preview.size-medium {
|
|
max-width: 120px;
|
|
max-height: 120px;
|
|
}
|
|
|
|
.pdf-preview.size-large {
|
|
max-width: 160px;
|
|
max-height: 160px;
|
|
}
|
|
|
|
/* PDF item enhanced */
|
|
.pdf-item-enhanced {
|
|
padding: 1rem;
|
|
border-radius: var(--border-radius);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.pdf-item-enhanced:hover {
|
|
background-color: rgba(220, 53, 69, 0.05);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--box-shadow-lg);
|
|
}
|
|
|
|
.pdf-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.pdf-controls {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
align-items: flex-end;
|
|
}
|
|
|
|
/* PDF no-preview fallback */
|
|
.pdf-no-preview {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: #f8f9fa;
|
|
border: 2px dashed #dee2e6;
|
|
border-radius: var(--border-radius);
|
|
color: var(--danger-color);
|
|
font-size: 2rem;
|
|
}
|
|
|
|
/* File item enhanced */
|
|
.file-item-enhanced {
|
|
padding: 1rem;
|
|
border-radius: var(--border-radius);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.file-item-enhanced:hover {
|
|
background-color: rgba(0, 123, 255, 0.05);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--box-shadow-lg);
|
|
}
|
|
|
|
.image-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.image-controls {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
align-items: flex-end;
|
|
} |