diff --git a/static/css/upload.css b/static/css/upload.css index 766050a..2696a23 100644 --- a/static/css/upload.css +++ b/static/css/upload.css @@ -151,6 +151,7 @@ color: var(--content-text); } +/* Original Spinner - used for general loading indicators */ .spinner { border: 3px solid rgba(0, 0, 0, 0.1); border-radius: 50%; @@ -160,6 +161,17 @@ animation: spin 1s linear infinite; } +/* Larger spinner specifically for overlays */ +.overlay-spinner { + width: 50px; + height: 50px; + margin: 0 auto; + border: 3px solid rgba(255, 255, 255, 0.3); + border-radius: 50%; + border-top-color: white; + animation: spin 1s ease-in-out infinite; +} + @keyframes spin { 0% { transform: rotate(0deg); @@ -252,16 +264,16 @@ /* HTMX indicator styles */ .htmx-indicator { + display: none; opacity: 0; transition: opacity 200ms ease-in; } .htmx-request .htmx-indicator { opacity: 1; -} - -.htmx-request.htmx-indicator { - opacity: 1; + display: flex; + align-items: center; + justify-content: center; } .loading-indicator { @@ -349,4 +361,83 @@ margin: 0.5rem 0; font-size: 0.9rem; color: var(--soft-text); +} + +/* Upload Overlay */ +.upload-container { + position: relative; + min-height: 200px; + width: 100%; +} + +.upload-overlay { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 240, 0.95)); + display: none; + justify-content: center; + align-items: center; + z-index: 1000; + border-radius: inherit; +} + +.upload-overlay.htmx-request { + display: flex; +} + +.upload-overlay-content { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-align: center; + max-width: 80%; +} + +.upload-overlay h3 { + margin-bottom: 0.5rem; + color: #333; +} + +.upload-overlay p { + margin-top: 0.5rem; + color: #555; +} + +.upload-overlay .overlay-spinner { + width: 50px; + height: 50px; + border: 5px solid #f3f3f3; + border-top: 5px solid #3498db; + border-radius: 50%; + animation: spin 1s linear infinite; + margin-bottom: 1rem; +} + +/* Dark theme support */ +@media (prefers-color-scheme: dark) { + .upload-overlay { + background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.95)); + } + + .upload-overlay h3 { + color: #fff; + } + + .upload-overlay p { + color: #ccc; + } +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } } \ No newline at end of file diff --git a/templates/partials/document_upload.html b/templates/partials/document_upload.html index 19ab302..dbdf092 100644 --- a/templates/partials/document_upload.html +++ b/templates/partials/document_upload.html @@ -2,22 +2,96 @@

Document Uploads

- - - + hx-indicator=".upload-overlay">
+ +
+
+
+

Uploading Documents

+

Please wait while your documents are being uploaded...

+
+
+ + + + - {{template "csv_upload" .}} +
+ +
+ + + + + + +
+ + +
- {{template "document_upload_form" .}} + -
+ + + +
+ + {{end}} \ No newline at end of file